Next: Matrix Inverses Up: Matrix Multiplication, Part II Previous: The Definition

## Rules for Matrix Arithmetic

The examples in the preceding section should make clear that matrix multiplication is not completely like multiplication of numbers. In particular, it is important to remember that matrix multiplication is in general not commutative. Even if and are both square ( ) matrices, so the products and are both defined and have the same dimensions ( ), it will usually be the case that .

Another way in which matrix multiplication differs from multiplication of numbers, which we have already seen, is the following: It is possible for some non-zero matrices to have but , or but . In other words, we can't cancel out'' in the equation .

Also, it is possible for neither nor to be zero, but for to be zero.

There's some good news as well. Many of the familiar laws for arithmetic of numbers do hold in the case of matrix arithmetic. In order to say what these are, we will first define two other operations on matrices, which we have not used so far but which will be useful in many contexts.

The sum of two matrices and is defined when and have the same dimensions. To add and , add their corresponding entries:

The product of a scalar (number) and a matrix is computed by multiplying each entry of by :

These operations on matrices are just like the corresponding operations on vectors and obey the same sorts of rules:

Other rules apply to their interaction with matrix multiplication:

Finally, an important property of matrix multiplication: Matrix multiplication is associative:

In fact, the definition of matrix multiplication is designed to make sure that matrix multiplication is associative. This is because the mathematicians who came up with this definition were interested in linear functions of the sort

Suppose we have two such linear functions, given by two matrices and . Let's look now at the composition,

Given that matrix multiplication is associative, we can continue with

In other words, the composition of linear functions is another linear function, and its matrix is the product of the matrices of the original functions.

If you study multivariable calculus, you will see that this gives a nice chain rule'' for derivatives of functions from -dimensional space to -dimensional space.

Next: Matrix Inverses Up: Matrix Multiplication, Part II Previous: The Definition
Peter Kostelec
2000-05-08