You are about to erase your work on this activity. Are you sure you want to do this?
Updated Version Available
There is an updated version of this activity. If you update to the most recent version of this activity, then your current progress on this activity will be erased. Regardless, your record of completion will remain. How would you like to proceed?
Mathematical Expression Editor
Matrix Multiplication
We will introduce matrix multiplication by first considering the special case of a
matrix-vector product. In other words, the first matrix is \(m \times n\) and the second matrix is \(n \times 1\)
for some positive integers \(m,n\).
One way to understand the matrix-vector product \(A\vec {x}\) is by thinking of it as a linear
combination of the columns of \(A\), using the entries in \(\vec {x}\) as our coefficients.
We can now make a couple of observations about the matrix-vector product. The
first observation is part of the definition, but it is still worth pointing out.
In
order for the product \(A\vec {x}\) to exist, \(A\) and \(\vec {x}\) must have compatible dimensions. In
particular, vector \(\vec {x}\) must have as many components as the number of columns of
\(A\). (Otherwise, we would not be have a well-defined linear combination of
the columns.) So, if \(A\) is an \(m\times n\) matrix, \(\vec {x}\) must be an \(n\times 1\) vector. If we write these
dimensions next to each other, we will notice that the inner dimensions (\(n\)) must
match, while the outer dimensions, \(m\) and \(1\), give us the dimensions of the
product.
If you are familiar with the dot product (see Dot Product and its Properties), you
may have noticed that each individual entry in the product matrix \(A\vec {x}\) is the dot
product of a row of \(A\) with \(\vec {x}\). Thus, if the rows of \(A\) are vectors \(\vec {r}_1\), \(\vec {r}_2,\ldots ,\vec {r}_n\) we can restate
Definition 2 as follows:
Matrix-matrix multiplication is simply an extension of the idea of matrix-vector
multiplication. In order for the product definition to work, matrix dimensions must
be compatible. Let \(A\) be an \(m\times n\) matrix, and let \(B\) be an \(n\times p\) matrix, then the product \(AB\) will be
an \(m\times p\) matrix.
Just like with vector products, the inner dimensions must be the same, while the
outer dimensions, \(m\) and \(p\), give us the dimensions of the product.
Let \(A\) be an \(m\times n\) matrix whose rows are vectors \(\vec {r}_1\), \(\vec {r}_2,\ldots ,\vec {r}_n\). Let \(B\) be an \(n\times p\) matrix with columns
\(\vec {b}_1, \vec {b}_2, \ldots , \vec {b}_p\). Then the entries of the matrix product \(AB\) are given by the dot products
It is possible to use linear combinations rather than dot products to compute a
matrix-matrix product. If the columns of matrix \(B\) are given by \(\vec {b}_1, \vec {b}_2, ..., \vec {b}_p\), then the matrix
product consists of \(p\) columns, each of which is a matrix-vector product:
Use this information to express \(\begin{bmatrix} 19\\-13\end{bmatrix}\) as a linear combination of the columns of \(\begin{bmatrix} -2&3\\ 4&-1 \end{bmatrix}\).
\(I_n\) has 1’s along the main diagonal and 0’s everywhere else. It is often useful to think
of \(I_n\) as a matrix whose \(j^{th}\) column (and \(j^{th}\) row) is \(\vec {e}_j\), the \(j^{th}\) standard unit vector of \(\RR ^n\). When the
dimensions of \(I_n\) are clear from the context, or irrelevant, we will omit the subscript \(n\)
and simply refer to this matrix as \(I\).
You can easily convince yourself that \(I\) commutes with all square matrices of
appropriate dimensions. Let
Because \(I\) acts like the multiplicative identity \(1\) in regular multiplication, \(I\) (or \(I_n\)) is called
the identity matrix.
Next we list several important properties of matrix multiplication. These properties
hold only when matrix sizes are such that the products are defined.
Properties of Matrix Multiplication The following hold for matrices \(A,B,\) and \(C\) and for
scalar \(c\),
(a)
Left Distributive Property
\[A\left ( B+C\right ) =AB +AC\]
(b)
Right Distributive Property
\[\left ( B+C\right ) A=BA+CA\]
(c)
Associativity
\[A\left ( BC\right ) =\left ( AB\right ) C\]
(d)
\[c(AB)=(cA)B=A(cB)\]
(e)
Multiplicative Identity
\[AI=IA=A\]
We prove (a) using the expression in (1) for the \((i,j)\)-entry of a matrix product. (The
proof of (b) is similar.) The \((i,j)\)-entry of \(A(B+C)\) is given by
For (e), the \((i,j)\)-entry of the product \(AI\) is given by the dot product of the \(i^{th}\) row of \(A\) with
the standard unit vector \(\vec {e}_j\). Clearly, this dot product is \(a_{ij}\). Because the \((i,j)\)-entry of
the product \(AI\) is equal to the \((i,j)\)-entry \(A\), we conclude that \(AI=A\). The proof that \(IA=A\) is
similar.
Note that we skipped the proof of (c), which is quite cumbersome using sigma
notation. We will easily tackle this proof later in the course when we cover
Composition of Linear Transformations.