[Math] Matrix multiplication: row x column vs. column x row

linear algebramatrices

I am wondering if there is any inherent difference between multiplying two matrices row by column (standard way to multiply) vs. column by row.

Asking specifically relating to a question in a textbook which asks: Express each column matrix of AB as a linear combination of the columns of A

I realise that the standard way to find the column matrices of AB would be to multiply the matrix A with each column of B, but I cannot see how to relate this to the column matrices of A, not B.

(Question is from page 35 of Elementary Linear Algebra by Howard Anton)

Best Answer

Multiplying column-by-row is the same as multiplying row-by-column in reverse order$^\ast$. So if you invent a new matrix multiplication denoted by, say, $\rtimes$, where $A\rtimes B$ is multiplication column-by-row, then $A\rtimes B=BA$, where $BA$ is the standard row-by-column multiplication.

Okay, now let us answer your main question (we will not need any of this column-by-row business). Let us look at the entries of $AB$. Let $AB=C$, and denote the entries of $C$ as $c_{ij}$ for the entry in the $i$th row and the $j$th column. Also, suppose these are $n\times n$ matrices. We have that $$c_{11}=a_{11}b_{11}+a_{12}b_{21}+\cdots+a_{1n}b_{n1},$$ $$c_{21}=a_{21}b_{11}+a_{22}b_{21}+\cdots+a_{2n}b_{n1},$$ $$\vdots$$ $$c_{n1}=a_{n1}b_{11}+a_{n2}b_{21}+\cdots+a_{nn}b_{n1}.$$ We can rewrite these equations as a single vector equation: $$\begin{pmatrix} c_{11}\\c_{21}\\ \vdots\\ c_{n1}\end{pmatrix}=\begin{pmatrix} a_{11}\\a_{21}\\ \vdots\\ a_{n1}\end{pmatrix}b_{11}+\begin{pmatrix} a_{12}\\a_{22}\\ \vdots\\ a_{n2}\end{pmatrix}b_{21}+\cdots+\begin{pmatrix} a_{1n}\\a_{2n}\\ \vdots\\ a_{nn}\end{pmatrix}b_{n1}.$$ This is a linear combination of the columns of $A$. Can you take it from here? (i.e., find all the other columns of $C$ as a linear combination of the columns of $A$)

$^\ast$This is true as long as the entries in your matrix come from a set where multiplication is commutative, meaning $ab=ba$ if $a$ and $b$ are entries in the matrix. Of course this property holds if you matrices have real or complex numbers as entries.