Solving systems via Cramer’s Rule
|<< prev chpt||home >>|
1 Cramer's rule for systems of two linear equations
Cramer’s Rule is a way to solve a system of linear equations using determinants. Let’s start with a system of two linear equations in two variables. In the system below, we will use generic letters to represent the coefficients of x and y and the numbers on the right-hand side of the equation.
- ax + by = e
- cx + dy = f
(Here, a, b, c, d, e, and f represent real numbers.)
Recall that the coefficient matrix associated with this system is simply the 2 x 2 matrix consisting of the coefficients of x and y:
For Cramer’s Rule, we will need the determinant of the coefficient matrix. In many textbooks, the determinant of the coefficient matrix is represented by D:
Warning: If D = 0, then Cramer’s Rule should be abandoned and another method, such as substitution or elimination, should be used. Your answer will be either no solution or a solution that requires a generic variable in the answer. See the following note for more information: When D=0
To finish solving a system of two linear equations using Cramer’s Rule, you will need to evaluate two additional determinants, Dx and Dy. The matrices for these determinants are formed by using the numbers on the right-hand side of the equations in place of the appropriate column in the coefficient matrix. Thus:
Note that the “x” column in this matrix is replaced by the numbers on the right-hand side.
Note that the “y” column in this matrix is replaced by the numbers on the right-hand side.
Finally, we are ready to solve our system. To find the solution (x,y), we simply use our determinants:
2 Example (system of two linear equations)
Suppose we need to solve the system:
- 9x − 4y = 13
- 3x + 10y = 10
We need to compute three determinants: D, Dx, and Dy. We have:
(This uses the coefficient matrix.)
(Note that the "x" column has been replaced by the numbers on the right-hand side of the equations.)
(Note that the "y" column has been replaced by the numbers on the right-hand side of the equations.)
Now, we need to find x and y:
Our solution: .
3 Cramer’s Rule—system of three linear equations in three variables
We can extend Cramer’s Rule to systems of three equations, four equations, etc., using the same ideas that we used in our system of two linear equations and two variables. Suppose our system is:
- ax + by + cz = r
- dx + ey + fz = s
- gx + hy + iz = t
We begin by forming the coefficient matrix and taking its determinant:
We also need the determinants formed by replacing a column by the numbers on the right-hand side of the equation. Thus:
- Note that the “x” column is replaced.
- Note that the “y” column is replaced.
- Note that the “z” column is replaced.
To find our solution (x,y,z), we compute:
, , and .
4 Example (system of three linear equations)
Suppose we want to solve the system:
- x − 5y + 2z = − 7
- 4x + 10y + z = 11
- − 2x − 3z = 5
We need to compute D, Dx, Dy, and Dz. We have:
Then , , and . Our solution is .
5 Additional Examples
Try to solve the following systems using Cramer's Rule on your own. Check you answer by mousing on the black rectangle. If you need additional help, look at the pencasts.
Check yourself! System Solution 6x − 3y = 7
12x + 9y = 4
(5⁄6,-2⁄3) 9x − 4y = 13
3x + 10y = 10
(5⁄3,1⁄2) 4x − 3y + 8z = 33
6y + 10z = 31
-8x + 6y − 4z = -24
6 When D = 0
Recall that the solution to a system of linear equations is either no solution, a unique solution, or infinitely many solutions. As we saw in this section, if in application of Cramer's Rule, D ≠ 0, then the system has a unique solution. In the case that D=0, we have the following (in terms of a system of 3 linear equations in 3 variables):
- If D = 0, and at least one of Dx, Dy, or Dz is non-zero, then the system has no solution.
- If D = 0, and Dx = Dy = Dz = 0, then the system has infinitely many solutions.
Note that Cramer's Rule does not give us a method to write the general solution to a system with infinitely many solutions. It merely allows us to determine number of solutions to the system and find the solution when it is unique.