Skip to content

Matrix multiplication

  • You can only multiply two matrices together if the number of columns in the first matrix is equal to the number of rows in the second matrix.
  • If A is an m x n matrix and B is a p x q matrix, then A and B can be multiplied together IF n = p.
  • The resulting matrix will have an order of m x q.
  • Matrix multiplication is not commutative.
  • The order in which we multiply matrices matters:
  • IF multiple matrices can be multiplied together (i.e. their orders are compatible), matrix multiplication is associative.
  • We can group matrices in any way when multiplying:
  • Multiply each element of the first row of A by the corresponding element of the column of B:
  • Add them up:
    • The top element of the resulting matrix will be .
  • Now, multiply each element of the second row of A by the corresponding element of the column of B:
  • Add them up:
    • The bottom element of the resulting matrix will be .
  • So,
  • Answer:
  • Multiply each element of the first row of the first matrix by the corresponding element of the column of the second matrix:
  • Add them up:
    • The top-left element of the resulting matrix will be .
  • Now, multiply each element of the first row of the first matrix by the corresponding element of the second column of the second matrix:
  • Add them up:
    • The top-right element of the resulting matrix will be .
  • Next, multiply each element of the second row of the first matrix by the corresponding element of the first column of the second matrix:
  • Add them up:
    • The bottom-left element of the resulting matrix will be .
  • Finally, multiply each element of the second row of the first matrix by the corresponding element of the second column of the second matrix:
  • Add them up:
    • The bottom-right element of the resulting matrix will be .
  • So,
  • Answer: