Method:

  • Multiplication in matrices occur only if the number of columns in matA is same as number of rows in matB.
  • That is if matA is order (m x n) then matB must be (n x k) for matA*matB to be defined.