Skip to main content
Logo image

Section 1.2 Matrix Multiplication

In this section we define the product of two matrices. As with matrix addition we can only define the product of two matrices if they have compatible sizes. When we begin using matrices to represent transformations of points, matrix multiplication with correspond to the composition of transformations.

Definition 1.2.1. Matrix Multiplication.

Let \(A = [a_{ij}]\in\RR^{m\times p}\) and \(B = [b_{ij}]\in\RR^{p\times n}\text{.}\) The product of \(A\) and \(B\) is the matrix \(C = [c_{ij}]\in\RR^{m\times n}\) with entries given by
\begin{equation*} c_{ij} = \sum_{k = 1}^{p}a_{ik}b_{kj}\text{.} \end{equation*}
We have two important and immediate differences between multiplication of scalars and the product defined in Definition 1.2.1:
  1. The product of two matrices \(A\) and \(B\) only exists if the number of columns of \(A\) is equal to the number of rows of \(B\text{.}\)
  2. Even if \(AB\) and \(BA\) both exist, it's not necessarily true that \(AB = BA\text{.}\)

Example 1.2.2. Finding a Product of Matrices.

Let
\begin{equation*} A = \mqty[1 \amp 2 \\ -1 \amp 3]\text{ and }B = \mqty[1 \amp 3 \amp -1 \\ 0 \amp 2 \amp 0]\text{.} \end{equation*}
Find \(AB\) and \(BA\) if possible.
Solution.
The product \(BA\) is undefined, but \(AB\) exists and is a \(2\times 3\) matrix:
\begin{equation*} AB = \mqty[1 \amp 7 \amp -1 \\ -1 \amp 3 \amp 1]\text{.} \end{equation*}
An important matrix is the identity matrix. This is the matrix \(I\) with \(1\)s down the diagonal and \(0\)s off of the diagonal. We typically denote the \(n\times n\) identity matrix by \(I_n\text{.}\) If \(A\in\RR^{m\times n}\text{,}\) then
\begin{equation*} I_m A = A = AI_n\text{,} \end{equation*}
so the identity matrix is the matrix multiplication analogue to to \(1\text{.}\)
If \(A\) is a square matrix, then we can define nonnegative whole number powers of \(A\) using repeated multiplication. In particular, if \(n > 0\) then \(A^n\) is just \(A\) multiplied with itself \(n\) times. If \(n = 0\text{,}\) then we define \(A^0 = I\text{.}\) With this definition, powers of matrices obey the exponent law
\begin{equation*} A^{m+n} = A^m A^n\text{.} \end{equation*}
We will see how and when we can define negative powers of matrices in Section 1.7.
Although matrix multiplication is not the same as scalar multiplication, it still shares some important properties with scalar multiplication.