Matrix cookbook - Part 1
13 January 2008 7:09 by Tomasz KorzeniowskiIn this post I would like to introduce some basic information about matrices and matters relating to them. I do not pretend to make a comprehensive review out of it. Material I have prepared is divided into two parts and limited to what I think will be the most relevant to understand posts about Singular Value Decomposition, Latent Semantic Indexing and Vector Space Model I am going to write in the coming weeks. Goal of this post is just to help readers to grasp fundamental concepts and fully benefit from the future posts.
First of all, let’s go through some one-line definitions and visualizations that will introduce different types of matrices.
- Matrix is a rectangular array composed of rows and columns.
- Square matrix is matrix where the number of rows (m) equals to the number of columns (n).
- Principal of the matrix is diagonal extending from the upper-left to the lower-right corner of a square matrix.

- Trace of the matrix is sum of the all elements on the principal.
- Diagonal matrix is matrix in which all elements that are not located on the principal equal to 0.
- Scalar matrix is a variation of a diagonal matrix where all elements located on the principal are equal.
- Identity matrix also known as unit matrix is special case of scalar matrix where all elements are equal to 1.

- Transpose matrix is matrix that was obtained by converting rows into columns and vice versa.

Your suggestion for additional content or elaboration of some topics is most welcome. Please don’t hesitate to contact with me tomek@codequest.eu.
This entry was posted on Sunday, January 13th, 2008 at 7:09 pm and is filed under Machine learning. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.




























