Steply

Solve x + 2y - z = 2, x + 2y = 1, 3x + 3y - z = 7 by Cramer's rule

Step by step, with the reason for every step · Cramer's rule with three equations · Algebra 2

Step by step

The question

Question: solve x + 2y − z = 2, x + 2y = 1, 3x + 3y − z = 7 by Cramer's rule.

x + 2y − z = 2①
x + 2y = 1②

Three equations, three letters: x, y and z.

3x + 3y − z = 7③

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, 2, −1; 1, 2, 0; 3, 3, −1|1, 2; 1, 2; 3, 3

We write the first two columns again, on the right.

Then every diagonal has three numbers.

Down: 1 × 2 × (−1), 2 × 0 × 3, −1 × 1 × 3.

down = 1 × 2 × (−1) + 2 × 0 × 3 + (−1) × 1 × 3

−2, 0, −3.

Together: −5.

= −2 + 0 + (−3) = −5

Up: 3 × 2 × (−1), 3 × 0 × 1, −1 × 1 × 2.

up = 3 × 2 × (−1) + 3 × 0 × 1 + (−1) × 1 × 2

−6, 0, −2.

Together: −8.

= −6 + 0 + (−2) = −8

Down minus up: −5 minus (−8) is 3.

So D = 3.

D = −5 − (−8) = 3

2 Find Dx

D x: the x column is replaced by the right sides, 2, 1, 7.

Dx = |2, 2, −1; 1, 2, 0; 7, 3, −1|2, 2; 1, 2; 7, 3

Down: 2 × 2 × (−1), 2 × 0 × 7, −1 × 1 × 3.

down = 2 × 2 × (−1) + 2 × 0 × 7 + (−1) × 1 × 3

−4, 0, −3.

Together: −7.

= −4 + 0 + (−3) = −7

Up: 7 × 2 × (−1), 3 × 0 × 2, −1 × 1 × 2.

up = 7 × 2 × (−1) + 3 × 0 × 2 + (−1) × 1 × 2

−14, 0, −2.

Together: −16.

= −14 + 0 + (−2) = −16

Down minus up: −7 minus (−16) is 9.

So D x = 9.

Dx = −7 − (−16) = 9

3 Find Dy

D y: the y column is replaced by the right sides, 2, 1, 7.

Dy = |1, 2, −1; 1, 1, 0; 3, 7, −1|1, 2; 1, 1; 3, 7

Down: 1 × 1 × (−1), 2 × 0 × 3, −1 × 1 × 7.

down = 1 × 1 × (−1) + 2 × 0 × 3 + (−1) × 1 × 7

−1, 0, −7.

Together: −8.

= −1 + 0 + (−7) = −8

Up: 3 × 1 × (−1), 7 × 0 × 1, −1 × 1 × 2.

up = 3 × 1 × (−1) + 7 × 0 × 1 + (−1) × 1 × 2

−3, 0, −2.

Together: −5.

= −3 + 0 + (−2) = −5

Down minus up: −8 minus (−5) is −3.

So D y = −3.

Dy = −8 − (−5) = −3

4 Find Dz

D z: the z column is replaced by the right sides, 2, 1, 7.

Dz = |1, 2, 2; 1, 2, 1; 3, 3, 7|1, 2; 1, 2; 3, 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 × 2 × 7, 2 × 1 × 3, 2 × 1 × 3.

down = 1 × 2 × 7 + 2 × 1 × 3 + 2 × 1 × 3

14, 6, 6.

Together: 26.

= 14 + 6 + 6 = 26

Up: 3 × 2 × 2, 3 × 1 × 1, 7 × 1 × 2.

up = 3 × 2 × 2 + 3 × 1 × 1 + 7 × 1 × 2

12, 3, 14.

Together: 29.

= 12 + 3 + 14 = 29

Down minus up: 26 minus 29 is −3.

So D z = −3.

Dz = 26 − 29 = −3

5 Divide

x is D x over D: 9/3 is 3.

x = DxD = 93 = 3

y is D y over D: −3/3 is −1.

y = DyD = −33 = −1

z is D z over D: −3/3 is −1.

z = DzD = −33 = −1

So the answer is (3, −1, −1).

(x, y, z) = (3, −1, −1)

6 Check

Let's check in every equation.

We put x = 3, y = −1, z = −1 into ①.

① 3 + 2(−1) − (−1) = 3 − 2 + 1 = 2

We get 2, the same as the right side.

Now ②.

② 3 + 2(−1) = 3 − 2 = 1

We get 1, the same as the right side.

Now ③.

③ 3(3) + 3(−1) − (−1) = 9 − 3 + 1 = 7

We get 7, 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, −1, −1)

Your turn

Try this one yourself, then check:

Solve 2x + y − 2z = −3, x + 2y = −3, 3x + 3y − z = −3
Show the answer
(x, y, z) = (3, −3, 3)

More from Cramer's rule with three equations

The whole lesson: Cramer's rule with three equations →