Understanding Matrix Multiplication: Column-Row Decomposition

inner-productslinear algebramatrices

I recently started reading a college linear algebra class while in middle school. I am reading section 1.3, which states that given matrices $ \mathbf{A} \in \mathbb{R}^{m,k} $ and $ \mathbf{B} \in \mathbb{R}^{k,n} $, and if I have $ \mathbf{a}_i $ as column $ i $ of $ \mathbf{A} $ and $ \mathbf{b}_i $ as row $ i $ of $ \mathbf{B} $, the equation
$ \mathbf{A}\mathbf{B} = \mathbf{a}_1 \mathbf{b}_1 + \mathbf{a}_2 \mathbf{b}_2 + \ldots + \mathbf{a}_k \mathbf{b}_k $
is true where $ k $ is the number of columns of $ \mathbf{A} $ and rows of $ \mathbf{B} $.

I understand the traditional definition of matrix multiplication where each element $ c_{ij} $ of the resulting matrix $ \mathbf{C} = \mathbf{A}\mathbf{B} $ is computed as the dot product of the $ i^{th} $ row of $ \mathbf{A} $ and the $ j^{th} $ column of $ \mathbf{B} $, but I am curious about the intuition and the reasoning behind representing matrix multiplication in the aforementioned column-row form.

The book only says that "Convince yourself that it is true" in a text boble, but it does not say why it is true. I really like math, but I do not understand this. Please help. Sorry if my english is bad, I translated from Polish using google translate.

Best Answer

There are two ways to view a matrix product $C=AB$.

  1. The rows of $C$ are linear combinations of the rows of $B$.
  2. The columns of $C$ are linear combinations of the columns of $A$.

I think the section you are reading is suggesting viewpoint 1.

For consider $$AB = \begin{bmatrix} 1 & 3 \\ 2 & 4 \end{bmatrix} \begin{bmatrix} 1 & 1 & 0 \\ 0 & 3 & -1 \end{bmatrix} = a_1b_1+a_2b_2.$$

$$ a_1b_1+a_2b_2 = \begin{bmatrix} 1 & 1 & 0 \\ 2 & 2 & 0 \end{bmatrix} + \begin{bmatrix} 0 & 9 & -3 \\ 0 & 12 & -4 \end{bmatrix}.$$

$$ a_1b_1+a_2b_2 = \begin{bmatrix} 1b_1 +3b_2 \\ 2b_1 +4b_2 \end{bmatrix}.$$

Note that a term $a_ib_i$ is called an outer product of vectors.

But perhaps viewpoint 2. is equally legitimate here? Let's try it.

$$AB = \begin{bmatrix} 1 & 3 \\ 2 & 4 \end{bmatrix} \begin{bmatrix} 1 & 1 & 0 \\ 0 & 3 & -1 \end{bmatrix} = a_1b_1+a_2b_2.$$

$$ a_1b_1+a_2b_2 = \begin{bmatrix} 1 & 1 & 0 \\ 2 & 2 & 0 \end{bmatrix} + \begin{bmatrix} 0 & 9 & -3 \\ 0 & 12 & -4 \end{bmatrix}.$$

$$ a_1b_1+a_2b_2 = \begin{bmatrix} \vert & \vert& \vert \\ 1a_1+0a_2 & 1a_1+3a_2 & 0a_1-1a_2 \\ \vert & \vert& \vert \end{bmatrix}.$$

I am not sure that what I have written provides any intuition, but my suggestion is to be equally comfortable with each of 1. and 2.