'

Solving Systems of Linear Equations Using Matrices

We have seen how to solve certain systems of equations using the substitution method and the elimination method (see  Solving Systems of Linear Equations ). However, these are not the most efficient methods in most cases, and in fact often these methods will not work - the system is too complicated for them. Other, often better, methods use matrices.

In this page we will describe a number of methods of solving systems of linear equations using matrices:


Row Reduction

The principles involved in row reduction of matrices are equivalent to those we used in the elimination method of solving systems of equations. That is, we are allowed to As for systems of equations, you may take short cuts, and combine the first 2 operations, that is you may This, of course, allows you to subtract one row from another, as this is the same as adding negative the row. However, as always - be careful with shortcuts! It is easy to perform an illegal operation with them; until you are very comfortable with this method, you are probably better off avoiding shortcuts.
 
How do we use this system to solve systems of equations? We follow the steps:
  1. Write the augmented matrix of  the system.
  2. Row reduce the augmented matrix.
  3. Write the new, equivalent, system that is defined by the new, row reduced, matrix.
  4. The solution (or lack thereof) is now apparent!
Example Let us use row reduction to solve the system of equations
 
3x + 2y - z = 1 
  x - 2y + z = 0  
2x + y - 3z = -1
Step #1: Step #2:
   
R1 <---> R2  Interchange Rows 1 and 2.
R2 - 3R1
Subtract 3 times (new) Row 1 from Row 2.
R2 / -4 Divide Row 2 by -4.
3R3 / 2 Multiply row 3 by 3/2.
Step #3:  
x + 2y + z = 0 
    y + z = -1/4 
         z = 7/8
Step #4:  Now it's your turn; use the next activity to practice solving systems of linear equations by row reduction of the augmented matrix of the system:
 
 APPLET


Cramer's Rule

Another method of solving systems of linear equations is one using determinants; this is called Cramer's Rule. This  system is more restricted, though: using it requires that 2 prerequisites be met: The steps in applying Cramers rule are:
  1. Write the coefficient matrix of the system (call this matrix A); if it is square, you may continue, otherwise Cramer's rule is not applicable here.
  2. Compute the determinant of the coefficient matrix, |A|; if |A| is not zero you may continue, otherwise Cramer's rule is not applicable here.
  3. Suppose the first variable of the system is x. Then write the matrix Ax as follows: substitute the column of numbers to the right of the equal signs instead of the first (from the left) column of A. Now compute the determinant of Ax, that is |Ax|.
  4. The value of x in the solution is now |Ax| / |A|.
  5. Repeat steps 3, and 4 with the remaining variables. In each case substitute the column of numbers instead of the column of A that corresponds to the variable you are using. If the variables are x, y, and z, then the values will now be:
 
x = |Ax| / |A| y = |Ay| / |A| z = |Az| / |A|
  Example We will demonstrate Cramer's rule with the following system:
 
x + 2y + 3z = 1 
-x        + 2z = 2 
    -2y + z = -2
Step #1: Step #2: Step #3: Step #4: Now use the next activity to practice solving systems of linear equations using Cramer's rule:
APPLET

Inverse Matrix Method

Suppose you are given an equation in one variable such as 4x = 10. Then you will find the value of x that solves this equation by multiplying the equation by the inverse of  4: (1/4) 4 x = (1/4) 10, so the solution will be x = 2.5.

Sometimes we can do something very similar to solve systems of linear equations; in this case, we will use the inverse of the coefficient matrix. But first we must check that this inverse exists! The conditions for the existence of the inverse of the coefficient matrix are the same as those for using Cramer's rule, that is

To use this method follow the steps demonstrated on the following system:
 
 
-x + 3y + z =  1 
2x + 5y     =  3 
3x + y - 2z = -2
 

Step #1: Rewrite the system using  matrix multiplication (click on matrix multiplication to recall how to multiply matrices):

Step #2: FInd the inverse of the coefficient matrix A. In this case the inverse is

Step #3: Multiply both sides of the equation (that you wrote in step #1) by the matrix A-1. On the left you'll get

.
 
And now it's your turn - use the next activity to practice solving systems of linear equations using the inverse of the coefficient matrix.