'
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
-
Multiply a row by a non-zero constant.
-
Add one row to another.
-
Interchange between rows.
As for systems of equations, you may take short cuts, and combine the first
2 operations, that is you may
-
add a multiple of one row to another.
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:
-
Write the augmented matrix of the system.
-
Row reduce the augmented matrix.
-
Write the new, equivalent, system that is defined by the new, row reduced,
matrix.
-
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:
Write the augmented matrix of the system:

Step #2:
Row reduce the augmented matrix:
The symbols we used above the arrows are short for:
| 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:
Rewrite the system using the row reduced matrix:
x + 2y + z = 0
y + z = -1/4
z = 7/8 |
Step #4:
And the solution is found by going from the bottom equation up:
z = 7/8
y = (-1/4) - (7/8) =
- 9/8
x = 0 - (7/8) - 2(-(9/8))
= 11/8
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 system must have the same number of equations
as variables, that is, the coefficient matrix of the system
must be square.
-
The determinant of the coefficient matrix must
be non-zero. The reason for this will become apparent as we
describe the method.
The steps in applying Cramers rule are:
-
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.
-
Compute the determinant of the coefficient matrix, |A|;
if |A| is not zero you may continue,
otherwise Cramer's rule is not applicable here.
-
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|.
-
The value of x in the solution is now |Ax|
/ |A|.
-
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| |
And the solution is
| (x, y, z) = ( |Ax| / |A|
, |Ay| / |A| , |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:
The coefficient matrix of this system is
Note that the matrix is square (it has 3 rows and 3 columns), and so we
may proceed with the next step of Cramer's rule.
Step #2:
Now find the determinant of the coefficient matrix A;
use the matrix manipulator in the tools box if you would like help in this
computation. You should get |A| = 12.
This is not zero, so Cramer's rule may be applied here.
Step #3:
and its determinant is |Ax| = -20.
Therefore x = |Ax|
/ |A| -20/12 = - 5/4.
Step #4:
Using the same method, the values for the remaining 2 variables, x
and y, are computed below:
and its determinant is |Ay| = 13.
Therefore y = |Ay| / |A| =
13/12.
and its determinant is |Az| = 2.
Therefore z = |Az| / |A| =
2/12 = 1/6.
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
-
The system must have the same number of equations
as variables, that is, the coefficient matrix of the system
must be square.
-
The determinant of the coefficient matrix must
be non-zero. The reason, of course, is that the inverse of a
matrix exists precisely when its determinant is non-zero.
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):
and writing the coefficient matrix as A, we have
.
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.