Linear combination of column vectors

281 Views Asked by At

all. I got confused about the interpretation of multiplication between matrix $\boldsymbol{A\text{, }B}$.

Let $\boldsymbol{A\text{, }B}$ be $n\times n$, $n\times p$ matrix, $\boldsymbol{a}_{1,2,\dots,n}, \boldsymbol{b}_{1,2,\cdots,p}$ be $n\times1$ column vectors, and $a_{i,k}$ be $k^{th}$ element in $i^{th}$ column vector $\boldsymbol{a}_i$, respectively.

Then $\boldsymbol{A\text{, }B}$ can be represented as $$ \boldsymbol{A} = \begin{bmatrix} \vdots& \vdots& & \vdots\\\boldsymbol{a}_1 & \boldsymbol{a}_2 & \dots & \boldsymbol{a}_n \\ \vdots& \vdots& &\vdots \end{bmatrix}\quad\quad \boldsymbol{B}= \begin{bmatrix} \vdots&\vdots&&\vdots\\ \boldsymbol{b}_1 & \boldsymbol{b}_2 & \dots & \boldsymbol{b}_p \\ \vdots&\vdots&&\vdots \end{bmatrix}. $$

Since

$$ \begin{align} \boldsymbol{AB} &= \begin{bmatrix} \vdots& \vdots& & \vdots\\\boldsymbol{a}_1 & \boldsymbol{a}_2 & \dots & \boldsymbol{a}_n \\ \vdots& \vdots& &\vdots \end{bmatrix}\begin{bmatrix} \vdots&\vdots&&\vdots\\\boldsymbol{b}_1 & \boldsymbol{b}_2 & \dots & \boldsymbol{b}_p \\ \vdots&\vdots&&\vdots \end{bmatrix}\\ &= \begin{bmatrix} \sum_{k=1}^{n}{b_{1,k}\boldsymbol{a}_k} & \cdots & \sum_{k=1}^{n}{b_{p,k}\boldsymbol{a}_{k}}\end{bmatrix}\\ &= \sum_{k=1}^{n}\begin{bmatrix} {b_{1,k}\boldsymbol{a}_k} & \cdots & {b_{p,k}\boldsymbol{a}_{k}}\end{bmatrix}, \end{align} $$

I thought that each column in $\boldsymbol{AB}$ can be represented as a linear combination of the columns of $\boldsymbol{A}$ with each weighting $b_{k,p}$. But sometimes I encounter an exactly opposite interpretation to what I thought.

If the above equation is correct, which is the correct interpretation about the multiplication between two matrices?

Thank you in advance.

1

There are 1 best solutions below

1
On BEST ANSWER

You're correct that the $k$-th column in $AB$ is a linear combination of the columns of $A$, using the entries in the $k$-th column of $B$ as weights. A dual interpretation to this is that the $k$-th row in $AB$ is a linear combination of the rows of $B$, using the entries in the $k$-th row of $A$ as weights.

That these two interpretations are compatible can be verified using the element-wise definition of matrix multiplication, where entry $i,j$ in the product is the product of the $j$-th row of $A$ with the $i$-th column of $B$.