Steply

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

x + 2y + z = 2①
3x + y = 10②

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

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

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

Then every diagonal has three numbers.

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

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

0, 0, 3.

Together: 3.

= 0 + 0 + 3 = 3

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

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

1, 0, 0.

Together: 1.

= 1 + 0 + 0 = 1

Down minus up: 3 minus 1 is 2.

So D = 2.

D = 3 − 1 = 2

2 Find Dx

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

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

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

down = 2 × 1 × 0 + 2 × 0 × 2 + 1 × 10 × 1

0, 0, 10.

Together: 10.

= 0 + 0 + 10 = 10

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

up = 2 × 1 × 1 + 1 × 0 × 2 + 0 × 10 × 2

2, 0, 0.

Together: 2.

= 2 + 0 + 0 = 2

Down minus up: 10 minus 2 is 8.

So D x = 8.

Dx = 10 − 2 = 8

3 Find Dy

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

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

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

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

0, 0, 6.

Together: 6.

= 0 + 0 + 6 = 6

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

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

10, 0, 0.

Together: 10.

= 10 + 0 + 0 = 10

Down minus up: 6 minus 10 is −4.

So D y = −4.

Dy = 6 − 10 = −4

4 Find Dz

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

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

down = 1 × 1 × 2 + 2 × 10 × 1 + 2 × 3 × 1

2, 20, 6.

Together: 28.

= 2 + 20 + 6 = 28

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

up = 1 × 1 × 2 + 1 × 10 × 1 + 2 × 3 × 2

2, 10, 12.

Together: 24.

= 2 + 10 + 12 = 24

Down minus up: 28 minus 24 is 4.

So D z = 4.

Dz = 28 − 24 = 4

5 Divide

x is D x over D: 8/2 is 4.

x = DxD = 82 = 4

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

y = DyD = −42 = −2

z is D z over D: 4/2 is 2.

z = DzD = 42 = 2

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

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

6 Check

Let's check in every equation.

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

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

We get 2, the same as the right side.

Now ②.

② 3(4) + (−2) = 12 − 2 = 10

We get 10, the same as the right side.

Now ③.

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

Your turn

Try this one yourself, then check:

Solve x + 3y + z = 9, 3x + y = 8, x + y = 4
Show the answer
(x, y, z) = (2, 2, 1)

More from Cramer's rule with three equations

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