Properties of Matrix Arithmetic

Matrix arithmetic (matrix addition, subtraction, and multiplication) satisfies many, but not all of the properties of normal arithmetic that you are used to. All of the properties below can be formally proved, and it's not too difficult, but we will not do so here. In what follows, we'll assume that different matrices are represented by upper-case letters: $ M, N, P, \ldots$, and that column vectors are represented by lower-case letters: $ v, w, \ldots$.

We will further assume that all the matrices are square matrices or column vectors, and that all are the same size, either $ n\times n$ or $ n\times 1$. Further, we'll assume that the matrices contain numbers (real or complex). Most of the properties listed below apply equally well to non-square matrices, assuming that the dimensions make the various multiplications and addtions/subtractions valid.

Perhaps the first thing to notice is that we can always multiply two $ n\times n$ matrices, and we can multiply an $ n\times n$ matrix by a column vector, but we cannot multiply a column vector by the matrix, nor a column vector by another. In other words, of the three matrix multiplications below, only the first one makes sense. Be sure you understand why.

$\displaystyle \begin{pmatrix}1&2&3\\ 4&5&6\\ 7&8&9\end{pmatrix}\begin{pmatrix}1...
...d
\begin{pmatrix}10\\ 11\\ 12\end{pmatrix}\begin{pmatrix}7\\ 8\\ 9\end{pmatrix}$

Finally, an extremely useful matrix is called the ``identity matrix'', and it is a square matrix that is filled with zeroes except for ones in the diagonal elements (having the same row and column number). Here, for example, is the $ 4\times 4$ identity matrix:

$\displaystyle \begin{pmatrix}1&0&0&0\\ 0&1&0&0\\ 0&0&1&0\\ 0&0&0&1\end{pmatrix}.
$

The identity matrix is usually called ``$ I$'' for any size square matrix. Usually you can tell the dimensions of the identity matrix from the surrounding context.

Probably the most important thing to notice about the laws above is one that's missing--multiplication of matrices is not in general commutative. It is easy to find examples of matrices $ M$ and $ N$ where $ MN \not= NM$. In fact, matrices almost never commute under multiplication. Here's an example of a pair that don't:

$\displaystyle \begin{pmatrix}1 & 1\\ 0 & 1\end{pmatrix}\begin{pmatrix}1 & 0\\ 1...
...gin{pmatrix}1 & 1\\ 0 & 1\end{pmatrix}=
\begin{pmatrix}1&1\\ 1&2\end{pmatrix}.
$

So the order of multiplication is very important; that's why you may have noticed the care that has been taken so far in describing multiplication of matrices in terms of ``the matrix on the left'', and ``the matrix on the right''.

The associative laws above are extremely useful, and to take one simple example, consider computer graphics. As we'll see later, operations like rotation, translation, scaling, perspective, and so on, can all be represented by a matrix multiplication. Suppose you wish to rotate all the vectors in your drawing and then to translate the results. Suppose $ R$ and $ T$ are the rotation and translation matrices that do these jobs. If your picture has a million points in it, you can take each of those million points $ v$ and rotate them, calculating $ Rv$ for each vector $ v$. Then, the result of that rotation can be translated: $ T(Rv)$, so in total, there are two million matrix multiplications to make your picture. But the associative law tells us we can just multiply $ T$ by $ R$ once to get the matrix $ TR$, and then multiply all million points by $ TR$ to get $ (TR)v$, so all in all, there are only 1,000,001 matrix multiplications-- one to produce $ TR$ and a million multiplications of $ TR$ by the individual vectors. That's quite a savings of time.

The other thing to notice is that the identity matrix behaves just like 1 under multiplication--if you multiply any number by 1, it is unchanged; if you multiply any matrix by the identity matrix, it is unchanged.