matrix multiplication but column wise

784 Views Asked by At

I am stuck with a definition of an unusual matrix multiplication rule and its use. I drew in a paper the definition and example I am trying to solve using that definition, but the definition does not appear to be correct in my opinion and the dimensions of the result of the multiplication that I am trying to do is 2X2. However, the definition gives me 2X3 matrix. Please help me to understand. Is there anything that I miss?

the definition and the example is below

1

There are 1 best solutions below

0
On BEST ANSWER

As was mentioned in the comments, $b_i^T$ should be a row vector, so in your example, $$a_1 \cdot b_1^T = \begin{bmatrix} 0\\1 \end{bmatrix} \begin{bmatrix} 1 & 1\end{bmatrix}.$$ So you have a $2 \times 1$ matrix multiplied by a $1 \times 2$ matrix, which will give you a $2 \times 2$ matrix, namely the matrix $\begin{bmatrix} 0 & 0 \\ 1 & 1 \end{bmatrix}$.

Often the way matrix multiplication is taught involves taking the dot products of row vectors of the first matrix with column vectors of the second matrix. In other words, with $a_i^T$ row vectors and $b_i$ column vectors, $$AB = \begin{bmatrix}a_1^T\\a_2^T\\\vdots \\a_m^T \end{bmatrix}\begin{bmatrix}b_1 & b_2& \ldots b_k \end{bmatrix} = \begin{bmatrix} a_1^Tb_1 & a_1^Tb_2 & \ldots & a_1^Tb_k\\a_2^Tb_1 & a_2^Tb_2 & \ldots & a_2^Tb_k\\ & \vdots \\ a_m^Tb_1 & a_m^Tb_2 & \ldots & a_m^Tb_k\end{bmatrix}.$$

If you look at what each of those dot products is (as a sum), and regroup in a different way, you'll get the multiplication formula you gave. To make it a bit more precise, if you look at the $1,1$ entry of $AB$ in terms of the entries of $A$ and of $B$, it is

$$a_{11}b_{11}+a_{12}b_{21}+\ldots a_{1n}b_{n1}.$$

Each of these terms will be the $1,1$ entry of one of the matrices in the sum from your way of multiplying matrices. In particular, $a_{1i}b_{i1}$ is the $1,1$ entry of the $i$-th column of $A$ times the $i$-th row of $B$.