Example 2

Let's look at a system of 3 equations and 4 unknowns, dx=f, where d is 3x4.

In[12]:=

  Clear[d,f]
  d={{1,1,2,3},{1,-2,1,1},{3,1,1,-1}};
  f={{13},{8},{1}};
  MatrixForm[d]
  MatrixForm[f]

Out[12]=

  1    1    2    3
  
  1    -2   1    1
  
  3    1    1    -1

Out[13]=

  13
  
  8
  
  1

In[14]:=

  df=AppendRows[d,f];
  MatrixForm[df]

Out[14]=

  1    1    2    3    13
  
  1    -2   1    1    8
  
  3    1    1    -1   1

In[15]:=

  MatrixForm[RowReduce[df]]

Out[15]=

  1    0    0    -1   -2
  
  0    1    0    0    -1
  
  0    0    1    2    8

To solve this system (which is equivalent to dx=f, remember?), we see that (working from the bottom up)
x3+2x4=8
x2=-1
x1-x4=-2
This means that x4 is a free choice, but then x1 and x3 are fixed by this choice; x2 is already fixed. Let's write this out: Let x4=r be our free choice.

x=Transpose{-2+r, -1, 8-2r, r}=Transpose{-2, -1, 8, 0} + r Transpose{1, 0, -2, 1}. Every solution can be written in this manner (using different r values). This is sometimes called a one parameter family of solutions to dx=f. If we would have two free choices we would have a two parameter family, and so on.

Notice that in the GJSF of the augmented matrix [d,f] there were three pivot columns, and one other column? Did you also notice that there were three fixed variables and one free one? That is no coincidence!

Up to Solving Systems of Linear Equations