Another Look at Matrix Multiplication

A linear combination of row (or column) vectors v1, v2, v3 is an expression of the form c1v1+c2v2+c3v3 where the ci are constants (scalars) and not all of the ci are zero. Matrix multiplication can be viewed in terms of these linear conbinations.

Consider A a 3x3 matrix and x a 3x1 column vector (be careful: Mathematica does not distinguish between row and column vectors; that is why b is entered as a row vector


  Clear[a,x]
  a={{a11,a12,a13},{a21,a22,a23},{a31, a32, a33}};
  x={x1,x2,x3};
  MatrixForm[a]
  MatrixForm[x]


  MatrixForm[a.x]

Look at Ax: Ax is 3x1 column vector (as you should have expected). Rewrite Ax in the following way:
Ax= x1 Column1+ x2 Column2 + x3Column3
Ax is simply a linear combination of the columns of A, where the constants come from x.

Let's try another one. Here A is 3x3 and B is 3x2.


  Clear[b]
  b={{b11, b12},{b21, b22},{b31, b32}};
  MatrixForm[a]
  MatrixForm[b]


  MatrixForm[a.b]

The matrix product AB is 3x2. Rewrite AB as
[b11Column1 + b21Column2 + b31Column3, b12Column1 + b22Column2 + b32Column3],
that is, each column of the product AB is a linear combination of the columns of A.

As you might expect, this generalizes for all matrix multiplication: Each column of the matrix product AB is a linear combination of the columns of A.

Up to Manipulation with Matrices