# Very very simple matrix multiplication formula, don't go harsh on me please :)

So I'm studying from "Linear algebra and it's applications 3rd edition" - Gilbert Strang.

He gave out this formula to find $$\sum_{j=1}^n a_{i,j}x_j$$

matrix multiplication of the matrices below

$$\left[ \begin{array}{ccc} 1 & 4 & 7\\ 2 & 5 & 8\\ 3 & 6 & 9 \end{array} \right]$$

$$\begin{bmatrix} u\\ v\\ w\\ \end{bmatrix}$$

Let the first matrix be A and second matrix be x and solution be b

$$Ax= B$$

once we apply the summation formula to find

$$Ax$$

We see that for each row of a (i in this case) x is multiplied by its row.

for instance $$a_{i,1}$$

will get us the first column of the A. so here (according to this summation formula) we will multiply the first column with the first row of X.

and wouldn't this produce =

$$6u = b_{1,1}\\ 15v = b_{2,2}\\ 24w = b_{3,3}\\$$

Above is wrong, i know but i believe this would produce the equations above. Equation below should be produced however,

$$u+4v+7w = b_{1,1}\\ 2u+5v+8w= b_{2,2}\\ 3u+6v+9w = b_{3,3}\\$$

So I don't believe this summation formula in the textbook is flawed, but what I'm asking is how it is done?

Normally while multplying matrices I would multiply the first row of the matrix on the left with each column of the matrix on the right, and that would give out that first row of the result matrix.

BUT IN THIS CASE --->

But here something different than that done, first column of the matrix on the left is multiplied with the first row of the matrix on the right?

I've never heard of a matrix multiplication like that, what will be the output of such multiplication and how would be the output produced .

My question is very easy, but I'm really bad on matrices, I'm not bad on math in general but I've always used the way I descriped for multiplying matrices for such a long time. So I got a little confused here, any help will be appreciated :)

## 2 Answers

Example: Take $i = 2$, i.e. row number $2$. Then $$\sum\limits_{j=1}^n a_{i,j} x_j = \sum\limits_{j=1}^3 a_{2,j} x_j = a_{2,1}x_1 + a_{2,2}x_2 + a_{2,3}x_3 = 2u + 5v + 8w.$$

This is because $(x_1,x_2,x_3) = (u,v,w)$ and $n = 3$ is the number of columns of the matrix $A$.

• Thank you, that solved my confusion! Good day. – Xenidia Jun 15 '16 at 11:37
• Ahh, just found out something on the textbook in the preceeding chapter. Is this kind of approach to matrix multiplication called "matrix multiplication by COLUMNS"? – Xenidia Jun 16 '16 at 14:23
• It's just normal matrix multiplication. Let $\mathbf{A}$ and $\mathbf{B}$ be of size $N\times K$ and $K\times M$, respectively. Then the product $\mathbf{AB}$ will be of size $N\times M$, and is elementwise defined by $$(\mathbf{AB})_{i,j} = \sum\limits_{k=1}^K A_{i,k}B_{k,j}.$$ If $\mathbf{B}$ is a vector, i.e. of size $K\times 1$, then the resulting multiplication will be of size $N\times 1$ and $$(\mathbf{AB})_{i,1} = \sum\limits_{k=1}^K A_{i,k}B_{k,1}.$$ – Eff Jun 16 '16 at 14:50

$$\left[ \begin{array}{ccc} 1 & 4 & 7\\ 2 & 5 & 8\\ 3 & 6 & 9 \end{array} \right] \begin{bmatrix} u\\ v\\ w \end{bmatrix} = \begin{bmatrix}u+4v+7w\\ 2u+5v+8w\\ 3u+6v+9w\\ \end{bmatrix}$$

This is standard matrix muliplication. Multiply each row of the matrix on the left by each column of the matrix on the right, and is entirely consistant with

$$\sum_{j=1}^n a_{i,j}x_j$$

• Please be more explicit. Being consisten isn't enough, at least from my point of view. – Xenidia Jun 15 '16 at 8:34
• This is a definition. Consistent is what you want. The $j^{th}$ row of the output matrix is $a_{1,j} x_1 + a_{2,j} x_2 + a_{3,j} x_3...$ or exactly the summation as above. – Doug M Jun 15 '16 at 16:11
• Still not explicit, remove this answer please. – Xenidia Jun 16 '16 at 6:53