Steply

Solve x + 2z = 2, x + 2y + z = -2, x - y - z = -3 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 + 2z = 2, x + 2y + z = −2, x − y − z = −3 by Cramer's rule.

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

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

x − y − z = −3③

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

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

Then every diagonal has three numbers.

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

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

−2, 0, −2.

Together: −4.

= −2 + 0 + (−2) = −4

Up: 1 × 2 × 2, −1 × 1 × 1, −1 × 1 × 0.

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

4, −1, 0.

Together: 3.

= 4 + (−1) + 0 = 3

Down minus up: −4 minus 3 is −7.

So D = −7.

D = −4 − 3 = −7

2 Find Dx

D x: the x column is replaced by the right sides, 2, −2, −3.

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

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

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

−4, 0, 4.

Together: 0.

= −4 + 0 + 4 = 0

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

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

−12, −2, 0.

Together: −14.

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

Down minus up: 0 minus (−14) is 14.

So D x = 14.

Dx = 0 − (−14) = 14

3 Find Dy

D y: the y column is replaced by the right sides, 2, −2, −3.

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

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

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

2, 2, −6.

Together: −2.

= 2 + 2 + (−6) = −2

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

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

−4, −3, −2.

Together: −9.

= −4 + (−3) + (−2) = −9

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

So D y = 7.

Dy = −2 − (−9) = 7

4 Find Dz

D z: the z column is replaced by the right sides, 2, −2, −3.

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

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

−6, 0, −2.

Together: −8.

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

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

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

4, 2, 0.

Together: 6.

= 4 + 2 + 0 = 6

Down minus up: −8 minus 6 is −14.

So D z = −14.

Dz = −8 − 6 = −14

5 Divide

x is D x over D: 14 over (−7) is −2.

x = DxD = 14−7 = −2

y is D y over D: 7 over (−7) is −1.

y = DyD = 7−7 = −1

z is D z over D: −14 over (−7) is 2.

z = DzD = −14−7 = 2

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

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

6 Check

Let's check in every equation.

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

① (−2) + 2(2) = −2 + 4 = 2

We get 2, the same as the right side.

Now ②.

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

We get −2, the same as the right side.

Now ③.

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

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

Your turn

Try this one yourself, then check:

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

More from Cramer's rule with three equations

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