Matrix Multiplication

It might be best explained by showing an example after mentioning the rules briefly:

  • You go across for the first matrix
  • You go down for the second matrix

 \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}  \begin{bmatrix} 5 & 6 \\ 7 & 8 \end{bmatrix} = \begin{bmatrix} 1*5 + 2*7  & 1*6+ 2*8 \\ 3*5+4*7 & 3*6+4*8  \end{bmatrix}

 \begin{bmatrix} 19 & 22 \\ 43 & 50 \end{bmatrix}

The illustration below is intended to highlight the requirements for the shape of matrices that we wish to multiply.

first matrix is 5×3, second matrix is 3×2, the answer is 5×2 (m x n)(n x p)=(m x p)

We will soon be extending the idea Tensors.