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

In[67]:=

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

Out[67]=

  a11   a12   a13
  
  a21   a22   a23
  
  a31   a32   a33

Out[68]=

  x1
  
  x2
  
  x3

In[69]:=

  MatrixForm[a.x]

Out[69]=

  a11 x1 + a12 x2 + a13 x3
  
  a21 x1 + a22 x2 + a23 x3
  
  a31 x1 + a32 x2 + a33 x3

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.

In[70]:=

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

Out[70]=

  a11   a12   a13
  
  a21   a22   a23
  
  a31   a32   a33

Out[71]=

  b11   b12
  
  b21   b22
  
  b31   b32

In[72]:=

  MatrixForm[a.b]

Out[72]=

  a11 b11 + a12 b21 + a13 b31   a11 b12 + a12 b22 + a13 b32
  
  a21 b11 + a22 b21 + a23 b31   a21 b12 + a22 b22 + a23 b32
  
  a31 b11 + a32 b21 + a33 b31   a31 b12 + a32 b22 + a33 b32

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