It is important to describe matrix multiplication in terms of entries of the matrices. What is the \(ij^{th}\) entry of \(AB\text{?}\) It would be the \(i^{th}\) entry of the \(j^{th}\) column of \(AB\text{.}\) Thus it would be the \(i^{th}\) entry of \(A\mathbf{b}_j\) . Now
\begin{equation*}
\mathbf{b}_j = \begin{pmatrix}
B_{1j} \\
\vdots\\
B_{nj}\\
\end{pmatrix}
\end{equation*}
and from the above defintion, the \(i^{th}\) entry is
\begin{equation*}
\sum_{k=1}^{n} A_{ik}B_{kj} \equiv A_{i1}B_{1j} + A_{i2}B_{2j} + \dots + A_{in}B_{nj}
\end{equation*}
In terms of pictures of the matrix, you are doing
\begin{equation*}
\begin{pmatrix}
A_{11} & A_{12} & \dots & A_{1n} \\
A_{21} & A_{22} & \dots & A_{2n} \\
\vdots & \vdots & & \vdots\\
A_{m1} & A_{m2} & \dots & A_{mn}\\
\end{pmatrix}
\begin{pmatrix}
B_{11} & B_{12} & \dots & B_{1p} \\
B_{21} & B_{22} & \dots & B_{2p} \\
\vdots & \vdots & & \vdots\\
B_{n1} & B_{n2} & \dots & B_{np}\\
\end{pmatrix}
\end{equation*}
Then as explained above, the \(j^{th}\) column is of the form
\begin{equation*}
\begin{pmatrix}
A_{11} & A_{12} & \dots & A_{1n} \\
A_{21} & A_{22} & \dots & A_{2n} \\
\vdots & \vdots & & \vdots\\
A_{m1} & A_{m2} & \dots & A_{mn}\\
\end{pmatrix}
\begin{pmatrix}
B_{1j}\\
B_{2j} \\
\vdots \\
B_{nj}\\
\end{pmatrix}
\end{equation*}
which is an \(m \times 1\) matrix or column vector which equals
\begin{equation*}
\begin{pmatrix}
A_{11}\\
A_{21} \\
\vdots \\
A_{m1}\\
\end{pmatrix}B_{1j} +
\begin{pmatrix}
A_{12}\\
A_{22} \\
\vdots \\
A_{m2}\\
\end{pmatrix}B_{2j} + \dots +
\begin{pmatrix}
A_{1n}\\
A_{2n} \\
\vdots \\
A_{mn}\\
\end{pmatrix}B_{nj}.
\end{equation*}
The second entry of this \(m \times 1\) matrix is
\begin{equation*}
A_{21}B_{1j} + A_{22}B_{2j} + \dots + A_{2n}B_{nj} = \sum_{k=1}^{m} A_{2k}B_{kj}.
\end{equation*}
Similarly, the \(i^{th}\) entry of this \(m \times 1\) matrix is
\begin{equation*}
A_{i1}B_{1j} + A_{i2}B_{2j} + \dots + A_{in}B_{nj} = \sum_{k=1}^{m} A_{ik}B_{kj}.
\end{equation*}
This shows the following definition for matrix multiplication in terms of the
\(ij^{th}\) entries of the project coincides with
Definition 11.2.11
Definition 11.2.14.
Let \(A = (A_{ij})\) be an \(m \times n\) matrix and let \(B = (B_{ij})\) be an \(n \times p\) matrix. Then \(AB\) is an \(m \times p\) matrix and
\begin{equation*}
\left(AB\right)_{ij} = \sum_{k=1}^{n} A_{ik}B_{kj} \equiv A_{i1}B_{1j} + A_{i2}B_{2j} + \dots + A_{in}B_{nj}
\end{equation*}
Another way to write this is
\begin{equation*}
\left(AB\right)_{ij} = \overset{1 \times n} {\begin{pmatrix}
A_{i1} & A_{i2} & \dots & A_{in}\end{pmatrix}}
\overset{n \times 1}{
\begin{pmatrix}
B_{1j} \\
B_{2j} \\
\vdots \\
B_{nj}\end{pmatrix}}.
\end{equation*}
Note that to get \((AB)_{ij}\) you multiply the \(i^{th}\) row of \(A\) and the \(j^{th}\) column of \(B\text{.}\) In terms of the dot product from calculus, the \(ij^{th}\) entry of \(AB\) is the dot product of the \(i^{th}\) row of \(A\) with the \(j^{th}\) column of \(B\text{.}\)
I will summarize the above discussion in the following proposition which shows that the above definition delivers the earlier one in
Definition 11.2.11 about
\(AB = \begin{pmatrix} A\mathbf{b}_1 & \dots & A\mathbf{b}_p\end{pmatrix}\text{.}\) It is important to realize these two definitions are equivalent.
Example 11.2.16.
Multiply if possible \(\begin{pmatrix}
1 & 2 \\
3 & 1\\
2 & 6\\
\end{pmatrix}
\begin{pmatrix}
2 & 3 & 1\\
7 & 6 & 2\\
\end{pmatrix}\text{.}\)
Solution.
First check to see if this is possible. It is of the form \((3 \times 2) (2 \times 3)\) and since the inside numbers match, the two matrices are conformable and it is possible to do the multiplication. The result should be a \(3 \times 3\) matrix. The answer is of the form
\begin{equation*}
\begin{pmatrix}
\begin{pmatrix}
1 & 2\\
3 & 1\\
2 & 6\\
\end{pmatrix}
\begin{pmatrix}
2 \\
7\\
\end{pmatrix}, &
\begin{pmatrix}
1 & 2\\
3 & 1\\
2 & 6\\
\end{pmatrix}
\begin{pmatrix}
3 \\
6\\
\end{pmatrix}, &
\begin{pmatrix}
1 & 2\\
3 & 1\\
2 & 6\\
\end{pmatrix}
\begin{pmatrix}
1\\
2\\
\end{pmatrix}
\end{pmatrix}
\end{equation*}
where the commas separate the columns in the resulting product. Thus the above product equals
\begin{equation*}
\begin{pmatrix}
16 & 15 & 5\\
13 & 15 & 5\\
46 & 42 & 14\\
\end{pmatrix},
\end{equation*}
a \(3 \times 3\) matrix as desired. In terms of the \(ij^{th}\) entries and the above definition, the entry in the third row and second column of the product should equal
\begin{equation*}
\sum_k a_{3k}b{k2} = a_{31}b{12} + a_{32}b{22} = 2 \times 3 + 6 \times 6 = 42.
\end{equation*}
You should try a few more such examples to verify the above definition in terms of the \(ij^{th}\) entries works for other entries.