Steply

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

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

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

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

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

Then every diagonal has three numbers.

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

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

2, 18, 0.

Together: 20.

= 2 + 18 + 0 = 20

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

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

0, 9, 3.

Together: 12.

= 0 + 9 + 3 = 12

Down minus up: 20 minus 12 is 8.

So D = 8.

D = 20 − 12 = 8

2 Find Dx

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

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

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

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

−6, −18, 0.

Together: −24.

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

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

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

0, −27, −21.

Together: −48.

= 0 + (−27) + (−21) = −48

Down minus up: −24 minus (−48) is 24.

So D x = 24.

Dx = −24 − (−48) = 24

3 Find Dy

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

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

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

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

−7, −18, 0.

Together: −25.

= −7 + (−18) + 0 = −25

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

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

0, −6, −3.

Together: −9.

= 0 + (−6) + (−3) = −9

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

So D y = −16.

Dy = −25 − (−9) = −16

4 Find Dz

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

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

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

−4, −42, −9.

Together: −55.

= −4 + (−42) + (−9) = −55

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

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

−12, −21, −6.

Together: −39.

= −12 + (−21) + (−6) = −39

Down minus up: −55 minus (−39) is −16.

So D z = −16.

Dz = −55 − (−39) = −16

5 Divide

x is D x over D: 24/8 is 3.

x = DxD = 248 = 3

y is D y over D: −16/8 is −2.

y = DyD = −168 = −2

z is D z over D: −16/8 is −2.

z = DzD = −168 = −2

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

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

6 Check

Let's check in every equation.

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

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

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

Now ②.

② 3 + 2(−2) + 3(−2) = 3 − 4 − 6 = −7

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

Now ③.

③ 2(3) + 3(−2) + (−2) = 6 − 6 − 2 = −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, −2, −2)

Your turn

Try this one yourself, then check:

Solve x + 3y = 5, x + 2y + 4z = −1, x + 2y + z = 2
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 →