banner
home icon
 
Related Lessons: Adding and Subtracting Matrices Find the Inverse of 2x2 Matrix Cramer's Rule 2x2 Scalar and Matrix Multiplication

 

Cramer's Rule for a 3x3 System (With Three Variables)| Step by Step

 

In our previous lesson, we studied how to use Cramer's Rule with two variables.  Our goal here is to expand the application of Cramer's Rule to three variables usually in terms of x, y and z. I will go over five (5) worked examples to help you get familiar with this concept.

To do well on this topic, you need to have an idea how to find the determinant of a 3x3 matrix. So, this is what we are going to do first. Ready?

 

Formula to find the determinant of a 3x3 matrix

 

Given a 3x3 matrix 

matrix A = [[ a  b  c][d  e  f][g  h  i]]

 

Its determinant can be calculated using the following formula.

formula to find the determinant of a 3x3 matrix

 

 

 


 

Let's do a quick example on this...

Find the determinant of matrix matrix A = [[6  2  -4][5  6  -2][5  2  -3]].

 

Solution: Make sure that you follow the formula on how to find the determinant of a 3x3 matrix carefully, as shown above. More so, don't rush when you perform the required arithmetic operations in every step. This is where common errors usually occur, but it can be prevented. When you do it right, your solution should be similar to the one below.

 

determinant of matrix A = 6[-18-(-4)]-2[-15-(-10)]-4[10-30]=-84+10+80=6

 


 

Now, it's time to go over the procedure on how to use Cramer's Rule in linear system involving three variables.

 

Cramer's Rules for the Systems of Linear Equations with Three Variables
Given a linear system shows where the columns of matrices come from: x column, y column, and constant column
Labeling each of the four matrices
coefficient matrix coefficient matrix D = [[a1   b1  c1][a2  b2  c2 ][a3  b3  c3]]
X - matrix X-matrix Dx = [[d1  b1  c1] [d2  b2  c2][d3  b3  c3]]
Y - matrix Y-matrix Dy = [[a1  d1  c1][a2  d2  c2][a3  d3  c3]]
Z - matrix Z-matrix Dz = [[a1  b1  d1][a2  b2  d2][a3  b3  d3]]
To solve for x: x=|Dx|/|D|
To solve for y: y=|Dy|/|D|
To solve for z: z=|Dz|/|D|

 

Things to observe from the setup above:

1) The coefficients of variables x, y and z make use of subscripted a, b and c, respectively. While the constant terms use subscripted d.

2) The denominators to find the values of x , y and z are all the same which is the determinant of the coefficient matrix (coefficients coming from the columns of x, y and z).

3) To solve for x, the coefficients of x-column is replaced by the constant column (in red).

4) To solve for y, the coefficients of y-column is replaced by the constant column (in red).

5) In the same manner, to solve for z, the coefficients of z-column is replaced by the constant column (in red).

 


 

Direction: Solve the following systems of linear equations with three variables using Cramer's Rule.

1) example 1 of system of linear equations with three variables: x+2y+3z=-5, 3x+y-3z=4 and -3x+4y+7z=-7 See Solution
2) example 2 of system of linear equations with three variables: -2x-y-3z=3, 2x-3y+z=-13 and 2x-3z=-11 See Solution
3) example 3 of system of linear equations with three variables:-y-2z=-8, x+3z=2, 7x+y+z=0 See Solution
4) example 4 of system of linear equations with three variables: -2x+y+z=4, -4x+2y-z=8 and -6x-3y+z=0 See Solution
5) example 5 of system of linear equations with three variables: x-8y+z=4, -x+2y+z=2 and x-y+2z=-1 See Solution

 

 


 

Example 1: Solve the system with three variables by Cramer's Rule solve: x+2y+3z=-5, 3x+y-3z=4 and -3x+4y+7z=-7 

From the given system of linear equations, I will construct the four matrices that will be used to solve for the values of x, y and z.

Use the guide above to correctly setup these special matrices. 

coefficient matrix X - matrix Y - matrix Z - matrix
D=[[1  2  3][3  1  -3][-3  4  7]] Dx=[[-5  2  3][4  1  -3][-7  4  7]] Dy= [[1  -5  3][3  4  -3][-3  -7  7]] Dz=[[1  2  -5][3  1  4][-3  4  -7]]

 

Next, I will solve for the determinant of each matrix. To do this, I can manually solve the determinant of each matrix on paper using the formula provided above. It can be tedious but it's okay, since good math skills is developed by doing lots of problems.

To check your work, you may use the 3x3 determinant calculator from Wolfram Alpha. Type in the entries then click calculate.

 

The values of the determinants are listed below.

Determinants of each matrix
|D|=40, |Dx|=-40, |Dy|=40 and |Dz|=-80

 

The final answers are easily computed once all the required determinants are found. 

Solved values for x, y and z
solution to example 1: x=-1, y=1 and z=-2

 

The final answer written in point notation is (x,y,z) = (−1,1,−2).

 


 

Example 2: Solve the system with three variables by Cramer's Rule  solve: -2x-y-3z=3, 2x-3y+z=-13 and 2x-3z=-11

I actually consider the coefficient matrix as the "primary" matrix because the other three matrices are derived from it. For instance, the x-matrix is just the "primary" matrix with the x-column replaced by the constant column (in red). You can observe that same pattern is applied in constructing the other matrices: y and z.

 

coefficient matrix X - matrix Y - matrix Z - matrix
D=[[-2  -1  -3][2  -3  1][2  0  3]] Dx=[[3  -1  -3][-13  -3  1][-11  0  -3]] Dy=[[-2  3  -3][2  -13  1][2  -11  -3]] Dz=[[-2  -1  3][2  -3  -13][2  0  -11]]

 

After solving the determinant of each matrix, I have them all written down.

Determinants of each matrix
|D|=-44, |Dx|=176, |Dy|=-88, and |Dz|=-44

The values for x, y and z are calculated as follows. Notice that x is obtained by taking the determinant of the x-matrix divided by the determinant of the coefficient matrix. This rule holds for the rest.

Solved values for x, y and z
solution to example 2: x=-4, y=2, and z=1

 

Our final answer is (x,y,z) = (−4,2,1).


 

Example 3: Solve the system with three variables by Cramer's Rule solve:-y-2z=-8, x+3z=2, 7x+y+z=0 

This problem is much easier than the first two examples because of the presence of zero entries in the x, y and constant columns. Do you see it? When we have zero entries in a matrix, the calculation of its determination is dramatically simplified.

In fact, as you increase the number of zeroes in a square matrix, the work done to find its determinant is greatly reduced.

Here are the matrices extracted from the system of linear equations.

coefficient matrix X - matrix Y - matrix Z - matrix
D = [[0  -1 -2][1  0  3][7  1  1]] Dx=[[-8  -1  -2][2  0  3][0  1  1]] Dy=[[0  -8  -2][1  2  3][7  0  1]] Dz=[[0  -1  -8][1  0  2][7  1  0]]

 

Solving for their determinants, I got the following values...

 

Determinants of each matrix
|D|=-22, |Dx|=22, |Dy|=-132, and |Dz|=-22

 

This leads us to easily setup and calculate the final answers.

Solved values for x, y and z
solution to example 3: x=-1, y=6, and z=1

The final answer is (x,y,z) = (−1,6,1).


Example 4: Solve the system with three variables by Cramer's Rule solve: -2x+y+z=4, -4x+2y-z=8 and -6x-3y+z=0 

Write down the four special matrices.

coefficient matrix X - matrix Y - matrix Z - matrix
matrix D = [[-2  1  1][-4  2  -1][-6  -3  1]] matrix Dx =[[4  1  1][8  2  -1][0  -3  1]] matrix Dy= [[-2  4  1][-4  8  -1][-6  0  1]] matrix Dz = [[-2  1  4][-4  2  8][-6  -3  0]]

 

Evaluate each matrix to find its determinant.

Determinants of each matrix
|D|=36, |Dx|=-36, |Dy|=72 and |Dz|=0

 

Use the Cramer's Rule to get the following solutions.

Solved values for x, y and z
solution to example 4: x=-1, y=2 and z=0

 

The final answer is (x,y,z) = (−1,2,0).


Example 5: Solve the system with three variables by Cramer's Rule solve: x-8y+z=4, -x+2y+z=2 and x-y+2z=-1 

Let's do one final example! I hope that at this point, you have had enough practice on how to solve systems with three variables using Cramer's Rule.

I suggest that you solve this on paper first and then come back to compare your answer.

Don't worry, nobody is watching... smile

 

check markConstruct the four special matrices.

 

coefficient matrix X - matrix Y - matrix Z - matrix
matrix D = [[1  -8  1][-1  2  1][1  -1  2]] matrix Dx =[[4  -8  1][2  2  1][-1  -1  2]] matrix Dy = [[1  4  1][-1  2  1][1  -1  2]] matrix Dz=[[1  -8  4][-1  2  2][1  -1  -1]]

 

check markFind the determinant of each square matrix.

Determinants of each matrix
|D|= -20, |Dx|=60, |Dy|=16, and |Dz|=-12

check mark Solve for x, y and z using the given formula.

Solved values for x, y and z
solution to example 5: x=-3, y=-4/5, and z=3/5

 

check markWe are done! The final answer in point form is (-3, -4/5, 3/5).


 

Practice Problems with Answers
Worksheet 1 Worksheet 2

 

 

Top of Page
Custom Search
JUMP TO:
Algebra Lessons
Algebra Lessons (A-Z)
Algebra Worksheets
Free Math Solver
Find Local Math Tutors
Math Games
 

 

 

HOME   |   PRIVACY POLICY   |   CONTACT US   |   DONATE

© Copyright 2011-2013   ChiliMath   All Rights Reserved