## Problem on matrix multiplication

Compute the matrix multiplications $$\begin{pmatrix} 1 & 2 & 3 \end{pmatrix}\begin{pmatrix} 1 \\2\\3\end{pmatrix} \quad \text{and} \quad \begin{pmatrix} 1 \\2\\3\end{pmatrix} \begin{pmatrix} 1 & 2 & 3 \end{pmatrix}.$$
• ## Solution

Recall that
The first matrix product is a $1 \times 3$ matrix multiplied by a $3 \times 1$ matrix. The result will be a $1\times 1$ matrix. $$\begin{pmatrix} 1 & 2 & 3 \end{pmatrix}\begin{pmatrix} 1 \\2\\3\end{pmatrix} = 1 \cdot 1 + 2 \cdot 2 + 3 \cdot 3 = 14.$$
The second matrix product is a $3 \times 1$ matrix multiplied by a $1 \times 3$ matrix. The result will be a $3\times 3$ matrix.
The $(i,j)$ entry of $\begin{pmatrix} 1 \\2\\3\end{pmatrix} \begin{pmatrix} 1 & 2 & 3 \end{pmatrix}$ the $i$th row of $\begin{pmatrix}1\\2\\3\end{pmatrix}$ multiplied by the $j$th column of $\begin{pmatrix} 1 & 2 & 3 \end{pmatrix}.$
For example, the first row of $\begin{pmatrix} 1 \\2\\3\end{pmatrix}$ is 1, and the second column of $\begin{pmatrix}1&2&3\end{pmatrix}$ is 2. Hence, the $(1,2)$ entry of their product is $1\cdot 2$.
Computing all nine values, we get $$\begin{pmatrix} 1 \\2\\3\end{pmatrix} \begin{pmatrix} 1 & 2 & 3 \end{pmatrix} = \begin{pmatrix}1\cdot 1 & 1 \cdot 2 & 1\cdot 3 \\ 2 \cdot 1 & 2\cdot 2 & 2 \cdot 3 \\ 3 \cdot 1 & 3 \cdot 2 & 3 \cdot 3 \end{pmatrix} = \begin{pmatrix}1 & 2 & 3\\ 2 & 4 & 6 \\ 3 & 6 & 9 \end{pmatrix}$$