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$
6
  • $\begingroup$ Is $W_{ij}=W_{ji} \ \forall \ i,j \in \{1,2,3\}$ ? $\endgroup$ Nov 11, 2015 at 19:23
  • 2
    $\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, 2015 at 19:23
  • $\begingroup$ I literally copied the images from here: tensorflow.org/tutorials/mnist/beginners/…. You'll have to scroll down. $\endgroup$ Nov 11, 2015 at 19:27
  • 1
    $\begingroup$ The two equations in the picture you posted are not equivalent. The top one is probably a typo. $\endgroup$
    – littleO
    Nov 11, 2015 at 20:09
  • 1
    $\begingroup$ I made my comment an answer so the question can be marked as answered. $\endgroup$
    – littleO
    Nov 11, 2015 at 21:35

2 Answers 2

3
$\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$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .