Steply

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

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

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

2x + y + z = −5③

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

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

Then every diagonal has three numbers.

Down: 1 × 1 × 1, 2 × 3 × 2, 0 × 2 × 1.

down = 1 × 1 × 1 + 2 × 3 × 2 + 0 × 2 × 1

1, 12, 0.

Together: 13.

= 1 + 12 + 0 = 13

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

up = 2 × 1 × 0 + 1 × 3 × 1 + 1 × 2 × 2

0, 3, 4.

Together: 7.

= 0 + 3 + 4 = 7

Down minus up: 13 minus 7 is 6.

So D = 6.

D = 13 − 7 = 6

2 Find Dx

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

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

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

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

−6, −30, 0.

Together: −36.

= −6 + (−30) + 0 = −36

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

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

0, −18, −6.

Together: −24.

= 0 + (−18) + (−6) = −24

Down minus up: −36 minus (−24) is −12.

So D x = −12.

Dx = −36 − (−24) = −12

3 Find Dy

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

Dy = |1, −6, 0; 2, −3, 3; 2, −5, 1|1, −6; 2, −3; 2, −5

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

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

−3, −36, 0.

Together: −39.

= −3 + (−36) + 0 = −39

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

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

0, −15, −12.

Together: −27.

= 0 + (−15) + (−12) = −27

Down minus up: −39 minus (−27) is −12.

So D y = −12.

Dy = −39 − (−27) = −12

4 Find Dz

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

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

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

−5, −12, −12.

Together: −29.

= −5 + (−12) + (−12) = −29

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

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

−12, −3, −20.

Together: −35.

= −12 + (−3) + (−20) = −35

Down minus up: −29 minus (−35) is 6.

So D z = 6.

Dz = −29 − (−35) = 6

5 Divide

x is D x over D: −12/6 is −2.

x = DxD = −126 = −2

y is D y over D: −12/6 is −2.

y = DyD = −126 = −2

z is D z over D: 6/6 is 1.

z = DzD = 66 = 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) + 2(−2) = −2 − 4 = −6

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

Now ②.

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

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

Now ③.

③ 2(−2) + (−2) + 1 = −4 − 2 + 1 = −5

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

Your turn

Try this one yourself, then check:

Solve 2x + y = 10, x + 2y + 4z = 20, 3x + 2y + z = 19
Show the answer
(x, y, z) = (4, 2, 3)

More from Cramer's rule with three equations

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