3 Ways to Understand Matrix Multiplication

Photo by Markus Spiske on Unsplash
  1. Interpretation: What does this mean?
  2. Why does this work?: How does this interpretation arise from the definition of matrix multiplication?
  3. Check your intuition: A list of facts that you can use to check your intuition for the interpretation we are considering.

The definition of matrix multiplication

  • The number of columns of A must equal the number of rows of B. Otherwise the sums in the definition won’t be defined.
  • The product AB will be a matrix with the same number of columns as A and the same number of rows as B.
  • A zero entry in C means that the correspond row of A and column of B are orthogonal. Orthogonal vectors are linearly independent. But not all pairs of linearly independent vectors are orthogonal.

#1 The column point of view

The first thing to notice about AB = C is that the columns of the matrix C are related to the columns of the matrix A in an important way.

  • A matrix multiplied by a vector, Ax, is simply a linear combination of the columns of a by the entries of x. So the columns of A are linearly independent if and only if equation Ax = 0 has only the zero solution.
  • We can view the columns of C as the results of applying a linear transformation, defined by B, to columns of A.
  • Suppose the columns of A are linearly independent. Then, if C has a column of zeros, B must also have a column of zeros.
  • If the columns of C are linearly dependent and the columns of B are linearly independent, then the columns of A are dependent. This follows from that fact that if x is a non-trivial solution of Cx = 0 then Bx is a non-trivial solution of Ax = 0.
  • If the equation Ax = b has no solution then ABx = Cx = b has no solution. After all, the columns of C are just combinations of columns of A.
  • The span of the columns of C are contained in the span of the columns of A. Therefore, rank(AB) ≤ rank(A).
  • If B is invertible with inverse B’ then the columns of A and AB have the same span. We can prove this from the previous fact, rank(AB) ≤ rank(A), combined with the fact that rank(A) = rank(AI) = rank(ABB’) ≤ rank(AB).

#2 The row point of view

Interpretation The rows of C are rows of A multiplied by the matrix B. Therefore, the rows of C are linear combinations of the rows of B with weights given by rows of A.

  • For AB = C, if the rows of C are linearly independent then so are the rows of B. Warning: the converse is not necessarily true.
  • If A has a row of zeros then AB has a row of zeros.
  • The the span of the rows of B contains the span the rows of C.
  • If E is an invertible n×n matrix and B is any n×m matrix. Then EB has the same row space as E. In particular, elementary row operations preserve the row space.

#3 Columns and rows

Our last interpretation gives us a way to decompose a product of two matrices into a sum of matrices.

  • Each of the matrices in the summand have 1-dimensional column spaces.
  • You can interchange two columns of A and get the same product AB as long as you interchange the corresponding rows of B.

Conclusion

We talked about three different ways to understand matrix multiplication.

  1. A matrix multiplied by columns
  2. A rows multiplied by matrices
  3. And columns multiplied by rows

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store