Matrix
From Math Images
This is a Helper Page for:


Blue Fern 
Summation Notation 
Change of Coordinate Systems 
Math for Computer Graphics and Computer Vision 
A matrix is a rectangular array of real numbers. A matrix may simply be used to store numbers for later access, in which case we may call it an array, but we’re more interested in matrices that describe mathematical operations.
A matrix has one or more dimensions.
 A onedimensional matrix looks identical to a vector, and its dimension would be the same as its length. A shorthand notation for a onedimensional matrix is
 A twodimensional matrix looks like
 A onedimensional matrix looks identical to a vector, and its dimension would be the same as its length. A shorthand notation for a onedimensional matrix is
and its dimension is the pair of numbers that describes its number of rows and columns. So in this example, the dimension would be 3x2 – three rows and two columns. A shorthand notation for a twodimensional matrix is where i is the row number and j is the column number. So in this example, a_{31} = 1.
 A threedimensional matrix looks like ... well, it looks like several twodimensional matrices backtoback, similar to pages of a book. Its dimension is the triple of numbers that describes its number of rows, columns, and pages. Threedimensional matrices are not widely used in computer graphics, but an example is a threedimensional texture. We won’t go into these further here.
 A threedimensional matrix looks like ... well, it looks like several twodimensional matrices backtoback, similar to pages of a book. Its dimension is the triple of numbers that describes its number of rows, columns, and pages. Threedimensional matrices are not widely used in computer graphics, but an example is a threedimensional texture. We won’t go into these further here.
Contents 
Matrix Operations
There are three fundamental matrix operations: addition of matrices, scalar multiplication of matrices, and matrix multiplication. Most of our definitions are given for twodimensional matrices but are generally easy to extend to other dimensions.
Matrix Addition
If two matrices and have the same dimension, then the matrix sum is defined as . That is, each entry in the sum is the sum of the corresponding entries in the separate matrices. For example,
Scalar Multiplication
For a matrix and a scalar value x, the scalar product xA is . For example,
Matrix Multiplication
If matrix A has the same same second dimension as the first dimension of matrix B, then we can multiply the matrices. To be more precise, if A is a matrix and B is a matrix, then the matrix product AB is a matrix. This matrix product is defined by defining each of its component: is the dot product of the i^{th} row of A and the j^{th} column of B. Because of the requirement on the dimensions of the matrices, these two vectors have the same size, so the dot products make sense. But numbers make even more sense, so let’s consider the two matrices
Now A has dimension 2x3 and B has dimension 3x2, so AB will have dimension 2x2. The entries of AB are the dot products of the two rows of A and the two columns of B, as
so the final product is
This animation illustrates the process of matrix multiplication:
The most interesting matrices for computer graphics are square twodimensional matrices, either 2x2, 3x3, or 4x4. When you multiply two square matrices you get another matrix of the same size, so matrices form an algebra as studied in an abstract algebra course.
There are two special matrices. The zero matrix is a square matrix whose entries are all zero. If we call this Z, then clearly Z+A = A+Z = A for all matrices A for which this makes sense, so the zero matrix behaves like the number 0 for addition. The identity matrix is a square matrix that has a_{ii}=1, but a_{ij}=0 if i≠j. That is, the identity matrix is
Matrix multiplication has one other interesting property: it is not commutative. Generally, AB ≠ BA for matrices. You can quickly see this for the matrices A and B above: while AB is a 2x2 matrix, BA is a 3x3 matrix.
Matrix Transposition
There is one other matrix operation that you might sometimes see. Matrix transposition replaces each row of a matrix with the corresponding column of the same matrix. This is written A^{T} and is defined by . To make this a little clearer, look at the example
Matrices Are Functions
The most important reasons to work with matrices is that matrices represent functions from one Cartesian space to another. We can see this if we think of a point as a vector, and then of a vector as a matrix. We have written the vector as , and in this form it is a 3x1 matrix. Then we can multiply a 3x3 matrix times V and get another 3x1 matrix as a result. For example,
 if and , then
 if and , then
So the matrix A represents a function on 3D Cartesian space. It is simple to see that matrix multiplication has the properties we would expect a set of functions to have: they are associative, are linear (that is, if V = V_{1} + V_{2}, then AV = AV_{1} + AV_{2}), and has an identity I. In the later pages on transformations we will see exactly how we use matrices as functions in computer graphics.
References
Page written by Steve Cunningham.
Additional Information
Another explanation of matrix operations: http://www.miislita.com/informationretrievaltutorial/matrixtutorial2matrixoperations.html