3
$\begingroup$

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?

$\endgroup$
  • $\begingroup$ Is $W_{ij}=W_{ji} \ \forall \ i,j \in \{1,2,3\}$ ? $\endgroup$ – callculus Nov 11 '15 at 19:23
  • 1
    $\begingroup$ The first equation looks incorrect to me. It should have $x_1,x_2,x_3$ along the rows, not down the columns. Did you copy it correctly? $\endgroup$ – amd Nov 11 '15 at 19:23
  • $\begingroup$ I literally copied the images from here: tensorflow.org/tutorials/mnist/beginners/…. You'll have to scroll down. $\endgroup$ – theideasmith Nov 11 '15 at 19:27
  • $\begingroup$ The two equations in the picture you posted are not equivalent. The top one is probably a typo. $\endgroup$ – littleO Nov 11 '15 at 20:09
  • $\begingroup$ That's what I thought. How do I mark this question as answered if you answered it in a comment? $\endgroup$ – theideasmith Nov 11 '15 at 20:48
2
$\begingroup$

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

$\endgroup$
-4
$\begingroup$

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.

$\endgroup$

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.