Steply

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

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

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

3x + 2y + z = 0③

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

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

Then every diagonal has three numbers.

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

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

6, 3, 0.

Together: 9.

= 6 + 3 + 0 = 9

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

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

0, 6, 2.

Together: 8.

= 0 + 6 + 2 = 8

Down minus up: 9 minus 8 is 1.

So D = 1.

D = 9 − 8 = 1

2 Find Dx

D x: the x column is replaced by the right sides, 1, −1, 0.

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

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

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

2, 0, 0.

Together: 2.

= 2 + 0 + 0 = 2

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

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

0, 2, −1.

Together: 1.

= 0 + 2 + (−1) = 1

Down minus up: 2 minus 1 is 1.

So D x = 1.

Dx = 2 − 1 = 1

3 Find Dy

D y: the y column is replaced by the right sides, 1, −1, 0.

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

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

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

−3, 3, 0.

Together: 0.

= −3 + 3 + 0 = 0

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

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

0, 0, 2.

Together: 2.

= 0 + 0 + 2 = 2

Down minus up: 0 minus 2 is −2.

So D y = −2.

Dy = 0 − 2 = −2

4 Find Dz

D z: the z column is replaced by the right sides, 1, −1, 0.

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

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

0, −3, 4.

Together: 1.

= 0 + (−3) + 4 = 1

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

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

6, −6, 0.

Together: 0.

= 6 + (−6) + 0 = 0

Down minus up: 1 minus 0 is 1.

So D z = 1.

Dz = 1 − 0 = 1

5 Divide

x is D x over D: 1/1 is 1.

x = DxD = 11 = 1

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

y = DyD = −21 = −2

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

z = DzD = 11 = 1

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

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

6 Check

Let's check in every equation.

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

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

We get 1, the same as the right side.

Now ②.

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

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

Now ③.

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

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

Your turn

Try this one yourself, then check:

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

More from Cramer's rule with three equations

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