[Math] Matrix Multiplication – Product of [Row or Column Vector] and Matrix [Lay P94, Strang P59]

linear algebramatrices

From P59 of Intro to Lin Alg, 4th Ed by Strang & P94-95 of Linear Algebra and its Apps by Lay

For relief, I denote all row vectors with superscripts and column with subscripts. Define $\mathbf{A} = \left[\begin{matrix}
\vec{a^1} \\
\vdots \\
\vec{a^i} \\
\vdots \\
\vec{a^m}
\end{matrix}\right]_{m \times n}
\& \quad
\mathbf{B} =
\left[\vec{b_1} \cdots \vec{b_i} \cdots \vec{b_p}\right]_{n \times p}$ ,
where each of the $m$ $\vec{a^i}$s has size $(1 \times n)$ and each of the $p$ $\vec{b_i}$s size $(n \times 1)$. Then:

$\mathbf{AB} = \mathbf{A}\left[\vec{b_1} \cdots \vec{b_i} \cdots \vec{b_p}\right]_{n \times p} = \left[\mathbf{A}\vec{b_1} \cdots \mathbf{A}\vec{b_i} \cdots \mathbf{A}\vec{b_p}\right]_{m \times p}. \tag{Row}$

$\text{ Also, } \qquad \mathbf{AB} = \left[\begin{matrix}
\vec{a^1} \\
\vdots \\
\vec{a^i} \\
\vdots \\
\vec{a^m}
\end{matrix}\right]\mathbf{B}
= \left[\begin{matrix}
\vec{a^1}\mathbf{B} \\
\vdots \\
\vec{a^i}\mathbf{B} \\
\vdots \\
\vec{a^m}\mathbf{B}
\end{matrix}\right]_{m \times p}. \tag{Coln}$

$1.$ In (Row), how and why can $\mathbf{A}$ left-multiply into the column vector form of $\mathbf{B}$ ?
In (Coln), how and why can $\mathbf{B}$ right-multiply the row vector form of $\mathbf{A}$ ?

$2.$ Would someone please explain how $\mathbf{A}$ can be rewritten as a row vector?

Best Answer

The verification is trivial. But to give an intuitive explanation, remember this:

Left multiplication of $B$ by matrix $A$ is equivalent to perform a row transformation on $B$. Thus we have to guarantee $B$ contains enough rows to be transformed. Consider matrix is actually multilinear, to arrive at your equation $(Row)$.

With the similar reason, right-multiplication of $B$ by matrix $B$ is equivalent to performing a column transformation on $A$. Thus we must guarantee $A$ contains enough columns to be transformed. This effects your equation $(Column)$.


To see this, take a set of orthonormal basis $e_i,\ldots,e_n$. Remark the following facts.

  • $Be_i=\begin{pmatrix}b(1, i)\\\vdots\\b_(n,i)\end{pmatrix}$ selects the $i$th column of matrix $B$
  • $e_j^TA=\begin{bmatrix} A(j,1) & \cdots & A(j,n) \\ \end{bmatrix}$ selects the $j$th row of matrix $A$

Next write $\text{ $i$th column of AB } = (AB)e_i=A(Be_i)=Ab_i$.
This means $i$th column of $AB$ is obtained from left-multiplying $A$ by the $i$th column of $B$.
So all the other columns ($\neq i$) of $B$ and $AB$ are unaffected.
Or we could say the left multiplication (by $\mathbf{A}$) is independent of the other columns of $B$.
Hence $A$ is actually a row transformation.

Similarly $\text{ $j$th row of AB } = e_j^TAB = (e_j^TA)B = \begin{bmatrix} A(j,1) & \cdots & A(j,n) \\ \end{bmatrix}B = (\mathbf{A^j})^TB $.

Related Question