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)

  • $\begingroup$ take a look at Mr. Strangs' first two lectures in linear algebra on MIT OCW, that should clear the question $\endgroup$ – Kirill Nov 15 '17 at 21:36
  • $\begingroup$ While it is sensible to consider the alternative operation, it is not germane to the problem of understanding each column of $AB$ as linear combinations of columns of $A$. $\endgroup$ – hardmath Nov 15 '17 at 21:39
  • $\begingroup$ ... and each line of AB is a linear combination of lines of B.. $\endgroup$ – Kirill Nov 15 '17 at 21:40

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.

  • $\begingroup$ A slightly longer winded way to get the same basic conclusion is noting $A\rtimes B= (A^T B^T)^T=BA$. But it isn't entirely clear where the $i$th column of $A$ and $j$th row of $B$ should be expressed in the OP's result. $\endgroup$ – hardmath Nov 15 '17 at 21:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.