Why Does this Example of Matrix Multiplication Work?

153 Views Asked by At

I'm fairly new to matrix multiplication and came across an example which looks wrong and I'm wondering if anyone can clarify. enter image description here Which is said to become the following equation: enter image description here

But if with matrices you multiply row by column, and then sum, why are the two examples equivalent?

Shouldn't the equation evaluate to

$$\begin{bmatrix} W_{1,1}*x_1 + W_{1,2}*x_1 + W_{1,3} +x_1 \\ W_{2,1}*x_2 + W_{2,2}*x_2 + W_{2,3} +x_2 \\ W_{3,1}*x_3 + W_{3,2}*x_3 + W_{3,3} +x_3 \\ \end{bmatrix}$$

and not

$$\begin{bmatrix} W_{1,1}*x_1 + W_{1,2}*x_2 + W_{1,3} +x_3 \\ W_{2,1}*x_1 + W_{2,2}*x_2 + W_{2,3} +x_3 \\ W_{3,1}*x_1 + W_{3,2}*x_2 + W_{3,3} +x_3 \\ \end{bmatrix}$$

as it does

What would the correct equation be?

2

There are 2 best solutions below

0
On BEST ANSWER

The two equations in the picture you posted are not equivalent. The top one is probably a typo.

0
On

It looks OK to me.

To do the matrix product, I would go across the Ws and down the Xs. That gets the WX sums.

Then the Bs are added.