Worked examples
The question
Question: solve x + y + z = 6, 2x − y + z = 3, x + 2y − z = 2 by Cramer's rule.
x + y + z = 6①
2x − y + z = 3②
Three equations, three letters: x, y and z.
x + 2y − z = 2③
Cramer's rule, like with two equations: x is D x over D, y is D y over D, z is D z over D.
Four determinants, each by the diagonals.
x = DxD, y = DyD, z = DzD
1 Find D
D: the numbers in front of x, y and z, in their places.
D = |1, 1, 1; 2, −1, 1; 1, 2, −1|1, 1; 2, −1; 1, 2
We write the first two columns again, on the right.
Then every diagonal has three numbers.
Down: 1 × (−1) × (−1), 1 × 1 × 1, 1 × 2 × 2.
down = 1 × (−1) × (−1) + 1 × 1 × 1 + 1 × 2 × 2
1, 1, 4.
Together: 6.
= 1 + 1 + 4 = 6
Up: 1 × (−1) × 1, 2 × 1 × 1, −1 × 2 × 1.
up = 1 × (−1) × 1 + 2 × 1 × 1 + (−1) × 2 × 1
−1, 2, −2.
Together: −1.
= −1 + 2 + (−2) = −1
Down minus up: 6 minus (−1) is 7.
So D = 7.
D = 6 − (−1) = 7
2 Find Dx
D x: the x column is replaced by the right sides, 6, 3, 2.
Dx = |6, 1, 1; 3, −1, 1; 2, 2, −1|6, 1; 3, −1; 2, 2
Down: 6 × (−1) × (−1), 1 × 1 × 2, 1 × 3 × 2.
down = 6 × (−1) × (−1) + 1 × 1 × 2 + 1 × 3 × 2
6, 2, 6.
Together: 14.
= 6 + 2 + 6 = 14
Up: 2 × (−1) × 1, 2 × 1 × 6, −1 × 3 × 1.
up = 2 × (−1) × 1 + 2 × 1 × 6 + (−1) × 3 × 1
−2, 12, −3.
Together: 7.
= −2 + 12 + (−3) = 7
Down minus up: 14 minus 7 is 7.
So D x = 7.
Dx = 14 − 7 = 7
3 Find Dy
D y: the y column is replaced by the right sides, 6, 3, 2.
Dy = |1, 6, 1; 2, 3, 1; 1, 2, −1|1, 6; 2, 3; 1, 2
Down: 1 × 3 × (−1), 6 × 1 × 1, 1 × 2 × 2.
down = 1 × 3 × (−1) + 6 × 1 × 1 + 1 × 2 × 2
−3, 6, 4.
Together: 7.
= −3 + 6 + 4 = 7
Up: 1 × 3 × 1, 2 × 1 × 1, −1 × 2 × 6.
up = 1 × 3 × 1 + 2 × 1 × 1 + (−1) × 2 × 6
3, 2, −12.
Together: −7.
= 3 + 2 + (−12) = −7
Down minus up: 7 minus (−7) is 14.
So D y = 14.
Dy = 7 − (−7) = 14
4 Find Dz
D z: the z column is replaced by the right sides, 6, 3, 2.
Dz = |1, 1, 6; 2, −1, 3; 1, 2, 2|1, 1; 2, −1; 1, 2
Careful!
For D z we replace the z column, the third one.
The other two stay.
Careful: Dz: the third column is replaced
Down: 1 × (−1) × 2, 1 × 3 × 1, 6 × 2 × 2.
down = 1 × (−1) × 2 + 1 × 3 × 1 + 6 × 2 × 2
−2, 3, 24.
Together: 25.
= −2 + 3 + 24 = 25
Up: 1 × (−1) × 6, 2 × 3 × 1, 2 × 2 × 1.
up = 1 × (−1) × 6 + 2 × 3 × 1 + 2 × 2 × 1
−6, 6, 4.
Together: 4.
= −6 + 6 + 4 = 4
Down minus up: 25 minus 4 is 21.
So D z = 21.
Dz = 25 − 4 = 21
5 Divide
x is D x over D: 7/7 is 1.
x = DxD = 77 = 1
y is D y over D: 14/7 is 2.
y = DyD = 147 = 2
z is D z over D: 21/7 is 3.
z = DzD = 217 = 3
So the answer is (1, 2, 3).
(x, y, z) = (1, 2, 3)
6 Check
Let's check in every equation.
We put x = 1, y = 2, z = 3 into ①.
① 1 + 2 + 3 = 6
We get 6, the same as the right side.
Now ②.
② 2(1) − 2 + 3 = 2 − 2 + 3 = 3
We get 3, the same as the right side.
Now ③.
③ 1 + 2(2) − 3 = 1 + 4 − 3 = 2
We get 2, the same as the right side.
All of them work.
So the answer is right!
Let's look back.
First: find D.
Then: find Dx.
Then: find Dy.
Then: find Dz.
Then: divide.
Last: check.
Answer (x, y, z) = (1, 2, 3)
▶ Watch it solved
The question
Question: solve x + 2z = 5, 2x + y + z = 11, x − y + 3z = 2 by Cramer's rule.
x + 2z = 5①
2x + y + z = 11②
Three equations, three letters: x, y and z.
x − y + 3z = 2③
Cramer's rule, like with two equations: x is D x over D, y is D y over D, z is D z over D.
Four determinants, each by the diagonals.
x = DxD, y = DyD, z = DzD
1 Find D
D: the numbers in front of x, y and z, in their places.
D = |1, 0, 2; 2, 1, 1; 1, −1, 3|1, 0; 2, 1; 1, −1
We write the first two columns again, on the right.
Then every diagonal has three numbers.
Down: 1 × 1 × 3, 0 × 1 × 1, 2 × 2 × (−1).
down = 1 × 1 × 3 + 0 × 1 × 1 + 2 × 2 × (−1)
3, 0, −4.
Together: −1.
= 3 + 0 + (−4) = −1
Up: 1 × 1 × 2, −1 × 1 × 1, 3 × 2 × 0.
up = 1 × 1 × 2 + (−1) × 1 × 1 + 3 × 2 × 0
2, −1, 0.
Together: 1.
= 2 + (−1) + 0 = 1
Down minus up: −1 minus 1 is −2.
So D = −2.
D = −1 − 1 = −2
2 Find Dx
D x: the x column is replaced by the right sides, 5, 11, 2.
Dx = |5, 0, 2; 11, 1, 1; 2, −1, 3|5, 0; 11, 1; 2, −1
Down: 5 × 1 × 3, 0 × 1 × 2, 2 × 11 × (−1).
down = 5 × 1 × 3 + 0 × 1 × 2 + 2 × 11 × (−1)
15, 0, −22.
Together: −7.
= 15 + 0 + (−22) = −7
Up: 2 × 1 × 2, −1 × 1 × 5, 3 × 11 × 0.
up = 2 × 1 × 2 + (−1) × 1 × 5 + 3 × 11 × 0
4, −5, 0.
Together: −1.
= 4 + (−5) + 0 = −1
Down minus up: −7 minus (−1) is −6.
So D x = −6.
Dx = −7 − (−1) = −6
3 Find Dy
D y: the y column is replaced by the right sides, 5, 11, 2.
Dy = |1, 5, 2; 2, 11, 1; 1, 2, 3|1, 5; 2, 11; 1, 2
Down: 1 × 11 × 3, 5 × 1 × 1, 2 × 2 × 2.
down = 1 × 11 × 3 + 5 × 1 × 1 + 2 × 2 × 2
33, 5, 8.
Together: 46.
= 33 + 5 + 8 = 46
Up: 1 × 11 × 2, 2 × 1 × 1, 3 × 2 × 5.
up = 1 × 11 × 2 + 2 × 1 × 1 + 3 × 2 × 5
22, 2, 30.
Together: 54.
= 22 + 2 + 30 = 54
Down minus up: 46 minus 54 is −8.
So D y = −8.
Dy = 46 − 54 = −8
4 Find Dz
D z: the z column is replaced by the right sides, 5, 11, 2.
Dz = |1, 0, 5; 2, 1, 11; 1, −1, 2|1, 0; 2, 1; 1, −1
Careful!
For D z we replace the z column, the third one.
The other two stay.
Careful: Dz: the third column is replaced
Down: 1 × 1 × 2, 0 × 11 × 1, 5 × 2 × (−1).
down = 1 × 1 × 2 + 0 × 11 × 1 + 5 × 2 × (−1)
2, 0, −10.
Together: −8.
= 2 + 0 + (−10) = −8
Up: 1 × 1 × 5, −1 × 11 × 1, 2 × 2 × 0.
up = 1 × 1 × 5 + (−1) × 11 × 1 + 2 × 2 × 0
5, −11, 0.
Together: −6.
= 5 + (−11) + 0 = −6
Down minus up: −8 minus (−6) is −2.
So D z = −2.
Dz = −8 − (−6) = −2
5 Divide
x is D x over D: −6 over (−2) is 3.
x = DxD = −6−2 = 3
y is D y over D: −8 over (−2) is 4.
y = DyD = −8−2 = 4
z is D z over D: −2 over (−2) is 1.
z = DzD = −2−2 = 1
So the answer is (3, 4, 1).
(x, y, z) = (3, 4, 1)
6 Check
Let's check in every equation.
We put x = 3, y = 4, z = 1 into ①.
① 3 + 2(1) = 3 + 2 = 5
We get 5, the same as the right side.
Now ②.
② 2(3) + 4 + 1 = 6 + 4 + 1 = 11
We get 11, the same as the right side.
Now ③.
③ 3 − 4 + 3(1) = 3 − 4 + 3 = 2
We get 2, the same as the right side.
All of them work.
So the answer is right!
Let's look back.
First: find D.
Then: find Dx.
Then: find Dy.
Then: find Dz.
Then: divide.
Last: check.
Answer (x, y, z) = (3, 4, 1)
▶ Watch it solved
The question
Question: solve x + 3z = 5, 2x − y + 3z = 5, x + 3y + 3z = 11 by Cramer's rule.
x + 3z = 5①
2x − y + 3z = 5②
Three equations, three letters: x, y and z.
x + 3y + 3z = 11③
Cramer's rule, like with two equations: x is D x over D, y is D y over D, z is D z over D.
Four determinants, each by the diagonals.
x = DxD, y = DyD, z = DzD
1 Find D
D: the numbers in front of x, y and z, in their places.
D = |1, 0, 3; 2, −1, 3; 1, 3, 3|1, 0; 2, −1; 1, 3
We write the first two columns again, on the right.
Then every diagonal has three numbers.
Down: 1 × (−1) × 3, 0 × 3 × 1, 3 × 2 × 3.
down = 1 × (−1) × 3 + 0 × 3 × 1 + 3 × 2 × 3
−3, 0, 18.
Together: 15.
= −3 + 0 + 18 = 15
Up: 1 × (−1) × 3, 3 × 3 × 1, 3 × 2 × 0.
up = 1 × (−1) × 3 + 3 × 3 × 1 + 3 × 2 × 0
−3, 9, 0.
Together: 6.
= −3 + 9 + 0 = 6
Down minus up: 15 minus 6 is 9.
So D = 9.
D = 15 − 6 = 9
2 Find Dx
D x: the x column is replaced by the right sides, 5, 5, 11.
Dx = |5, 0, 3; 5, −1, 3; 11, 3, 3|5, 0; 5, −1; 11, 3
Down: 5 × (−1) × 3, 0 × 3 × 11, 3 × 5 × 3.
down = 5 × (−1) × 3 + 0 × 3 × 11 + 3 × 5 × 3
−15, 0, 45.
Together: 30.
= −15 + 0 + 45 = 30
Up: 11 × (−1) × 3, 3 × 3 × 5, 3 × 5 × 0.
up = 11 × (−1) × 3 + 3 × 3 × 5 + 3 × 5 × 0
−33, 45, 0.
Together: 12.
= −33 + 45 + 0 = 12
Down minus up: 30 minus 12 is 18.
So D x = 18.
Dx = 30 − 12 = 18
3 Find Dy
D y: the y column is replaced by the right sides, 5, 5, 11.
Dy = |1, 5, 3; 2, 5, 3; 1, 11, 3|1, 5; 2, 5; 1, 11
Down: 1 × 5 × 3, 5 × 3 × 1, 3 × 2 × 11.
down = 1 × 5 × 3 + 5 × 3 × 1 + 3 × 2 × 11
15, 15, 66.
Together: 96.
= 15 + 15 + 66 = 96
Up: 1 × 5 × 3, 11 × 3 × 1, 3 × 2 × 5.
up = 1 × 5 × 3 + 11 × 3 × 1 + 3 × 2 × 5
15, 33, 30.
Together: 78.
= 15 + 33 + 30 = 78
Down minus up: 96 minus 78 is 18.
So D y = 18.
Dy = 96 − 78 = 18
4 Find Dz
D z: the z column is replaced by the right sides, 5, 5, 11.
Dz = |1, 0, 5; 2, −1, 5; 1, 3, 11|1, 0; 2, −1; 1, 3
Careful!
For D z we replace the z column, the third one.
The other two stay.
Careful: Dz: the third column is replaced
Down: 1 × (−1) × 11, 0 × 5 × 1, 5 × 2 × 3.
down = 1 × (−1) × 11 + 0 × 5 × 1 + 5 × 2 × 3
−11, 0, 30.
Together: 19.
= −11 + 0 + 30 = 19
Up: 1 × (−1) × 5, 3 × 5 × 1, 11 × 2 × 0.
up = 1 × (−1) × 5 + 3 × 5 × 1 + 11 × 2 × 0
−5, 15, 0.
Together: 10.
= −5 + 15 + 0 = 10
Down minus up: 19 minus 10 is 9.
So D z = 9.
Dz = 19 − 10 = 9
5 Divide
x is D x over D: 18/9 is 2.
x = DxD = 189 = 2
y is D y over D: 18/9 is 2.
y = DyD = 189 = 2
z is D z over D: 9/9 is 1.
z = DzD = 99 = 1
So the answer is (2, 2, 1).
(x, y, z) = (2, 2, 1)
6 Check
Let's check in every equation.
We put x = 2, y = 2, z = 1 into ①.
① 2 + 3(1) = 2 + 3 = 5
We get 5, the same as the right side.
Now ②.
② 2(2) − 2 + 3(1) = 4 − 2 + 3 = 5
We get 5, the same as the right side.
Now ③.
③ 2 + 3(2) + 3(1) = 2 + 6 + 3 = 11
We get 11, the same as the right side.
All of them work.
So the answer is right!
Let's look back.
First: find D.
Then: find Dx.
Then: find Dy.
Then: find Dz.
Then: divide.
Last: check.
Answer (x, y, z) = (2, 2, 1)
▶ Watch it solved