Lecture 6
Matrix Multiplication

Matrix-vector multiplication was defined earlier, and this operation can be viewed as a transformation of one vector into another. As an example, we considered a vector of input information and a matrix describing the relative influences the components of the vector had on each other, with the vector output the corresponding information at a latertime. If this process is repeated, the result corresponds to repeated multiplication of the vector by (different matrices). (Think for example of a rotation matrix acting on vectors in the plane. Several rotations, one after the other, can also be thought of as the combined total rotation acting on the original vector.) Algebraically, this process can instead be described as multiplication of the matrices together, and matrix multiplication is thus naturally defined.

Def. Let A be an m x nmatrix, and B be an n x p matrix. The matrix product AB is the m x pmatrix AB defined by letting the j'th column of AB equal the matrix-vector product of A and the j'th column of B.

In practice, just as in the case of matrix-vector multiplication, we do not compute the matrix product an entire column at a time, but rather a single entry at a time.

Using the natural notation, we have that the (i, j) entry of AB is ai1 b1j + · · · + ain bnj.

Examples

This matrix product does indeed have the desired result in terms of the multiplication of a vector: multiplying the vector by the product AB yields the same output as first multiplying the vector by the matrix B, and then multiplying the first output vector by A.

Theorem
For any m x n matrix A, any n x p matrix B, and any p x 1 vector v, (AB)v = A(Bv).

This result can easily be directly verified.

Examples

Properties of Matrix Multiplication
Let Aand B be k x m matrices, C be an m xn matrix, and P and Q be n x p matrices. Then the following hold.

(a) s(AC) = (sA)C = A(sC) for any scalar s.
(b) A(CP) = (AC)P (the associative law).
(c) (A + B)C = AC +BC (the right distributive law)
(d) C(P + Q) = CP +CQ (the left distributive law)
(e) Ik A= A = AIm (left and right multiplicative identities).
(f) AO = OA = O (product with the zero matrix).
(g) (AC)T= CTAT.

These properties are easily verified arithmetically. But perhaps most important is something that is missing: notice that there is no commutative law. In general, matrix multiplication is NOT commutative!

Examples

One other note: when it simplifies matters, matrices may be partitioned into "blocks," and the corresponding blocks multiplied together; the over-all product matrix is composed of the outputs corresponding to the individual blocks.

Back 250 Lecture Index