Steply

Solve x + y + z = 6, 2x - y + z = 3, x + 2y - z = 2 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 + 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)

Your turn

Try this one yourself, then check:

Solve x + y + z = 11, 3x − 2y + z = 5, 2x + y − z = 6
Show the answer
(x, y, z) = (3, 4, 4)

More from Cramer's rule with three equations

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