Steply

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

x + y + z = 4①
x + 3y = 12②

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

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

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

Then every diagonal has three numbers.

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

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

9, 0, 1.

Together: 10.

= 9 + 0 + 1 = 10

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

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

3, 0, 3.

Together: 6.

= 3 + 0 + 3 = 6

Down minus up: 10 minus 6 is 4.

So D = 4.

D = 10 − 6 = 4

2 Find Dx

D x: the x column is replaced by the right sides, 4, 12, 0.

Dx = |4, 1, 1; 12, 3, 0; 0, 1, 3|4, 1; 12, 3; 0, 1

Down: 4 × 3 × 3, 1 × 0 × 0, 1 × 12 × 1.

down = 4 × 3 × 3 + 1 × 0 × 0 + 1 × 12 × 1

36, 0, 12.

Together: 48.

= 36 + 0 + 12 = 48

Up: 0 × 3 × 1, 1 × 0 × 4, 3 × 12 × 1.

up = 0 × 3 × 1 + 1 × 0 × 4 + 3 × 12 × 1

0, 0, 36.

Together: 36.

= 0 + 0 + 36 = 36

Down minus up: 48 minus 36 is 12.

So D x = 12.

Dx = 48 − 36 = 12

3 Find Dy

D y: the y column is replaced by the right sides, 4, 12, 0.

Dy = |1, 4, 1; 1, 12, 0; 1, 0, 3|1, 4; 1, 12; 1, 0

Down: 1 × 12 × 3, 4 × 0 × 1, 1 × 1 × 0.

down = 1 × 12 × 3 + 4 × 0 × 1 + 1 × 1 × 0

36, 0, 0.

Together: 36.

= 36 + 0 + 0 = 36

Up: 1 × 12 × 1, 0 × 0 × 1, 3 × 1 × 4.

up = 1 × 12 × 1 + 0 × 0 × 1 + 3 × 1 × 4

12, 0, 12.

Together: 24.

= 12 + 0 + 12 = 24

Down minus up: 36 minus 24 is 12.

So D y = 12.

Dy = 36 − 24 = 12

4 Find Dz

D z: the z column is replaced by the right sides, 4, 12, 0.

Dz = |1, 1, 4; 1, 3, 12; 1, 1, 0|1, 1; 1, 3; 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 × 3 × 0, 1 × 12 × 1, 4 × 1 × 1.

down = 1 × 3 × 0 + 1 × 12 × 1 + 4 × 1 × 1

0, 12, 4.

Together: 16.

= 0 + 12 + 4 = 16

Up: 1 × 3 × 4, 1 × 12 × 1, 0 × 1 × 1.

up = 1 × 3 × 4 + 1 × 12 × 1 + 0 × 1 × 1

12, 12, 0.

Together: 24.

= 12 + 12 + 0 = 24

Down minus up: 16 minus 24 is −8.

So D z = −8.

Dz = 16 − 24 = −8

5 Divide

x is D x over D: 12/4 is 3.

x = DxD = 124 = 3

y is D y over D: 12/4 is 3.

y = DyD = 124 = 3

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

z = DzD = −84 = −2

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

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

6 Check

Let's check in every equation.

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

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

We get 4, the same as the right side.

Now ②.

② 3 + 3(3) = 3 + 9 = 12

We get 12, the same as the right side.

Now ③.

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

Your turn

Try this one yourself, then check:

Solve x + 2y + 2z = 11, x + 3y = 7, 2x + 2y + 4z = 18
Show the answer
(x, y, z) = (1, 2, 3)

More from Cramer's rule with three equations

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