Steply

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

x + 2z = 5①
2x + y + z = 11②

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

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

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

Then every diagonal has three numbers.

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

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

3, 0, −4.

Together: −1.

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

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

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

2, −1, 0.

Together: 1.

= 2 + (−1) + 0 = 1

Down minus up: −1 minus 1 is −2.

So D = −2.

D = −1 − 1 = −2

2 Find Dx

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

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

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

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

15, 0, −22.

Together: −7.

= 15 + 0 + (−22) = −7

Up: 2 × 1 × 2, −1 × 1 × 5, 3 × 11 × 0.

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

4, −5, 0.

Together: −1.

= 4 + (−5) + 0 = −1

Down minus up: −7 minus (−1) is −6.

So D x = −6.

Dx = −7 − (−1) = −6

3 Find Dy

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

Dy = |1, 5, 2; 2, 11, 1; 1, 2, 3|1, 5; 2, 11; 1, 2

Down: 1 × 11 × 3, 5 × 1 × 1, 2 × 2 × 2.

down = 1 × 11 × 3 + 5 × 1 × 1 + 2 × 2 × 2

33, 5, 8.

Together: 46.

= 33 + 5 + 8 = 46

Up: 1 × 11 × 2, 2 × 1 × 1, 3 × 2 × 5.

up = 1 × 11 × 2 + 2 × 1 × 1 + 3 × 2 × 5

22, 2, 30.

Together: 54.

= 22 + 2 + 30 = 54

Down minus up: 46 minus 54 is −8.

So D y = −8.

Dy = 46 − 54 = −8

4 Find Dz

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

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

down = 1 × 1 × 2 + 0 × 11 × 1 + 5 × 2 × (−1)

2, 0, −10.

Together: −8.

= 2 + 0 + (−10) = −8

Up: 1 × 1 × 5, −1 × 11 × 1, 2 × 2 × 0.

up = 1 × 1 × 5 + (−1) × 11 × 1 + 2 × 2 × 0

5, −11, 0.

Together: −6.

= 5 + (−11) + 0 = −6

Down minus up: −8 minus (−6) is −2.

So D z = −2.

Dz = −8 − (−6) = −2

5 Divide

x is D x over D: −6 over (−2) is 3.

x = DxD = −6−2 = 3

y is D y over D: −8 over (−2) is 4.

y = DyD = −8−2 = 4

z is D z over D: −2 over (−2) is 1.

z = DzD = −2−2 = 1

So the answer is (3, 4, 1).

(x, y, z) = (3, 4, 1)

6 Check

Let's check in every equation.

We put x = 3, y = 4, z = 1 into ①.

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

We get 5, the same as the right side.

Now ②.

② 2(3) + 4 + 1 = 6 + 4 + 1 = 11

We get 11, the same as the right side.

Now ③.

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

Your turn

Try this one yourself, then check:

Solve x + 2z = 5, 3x + y + 2z = 14, x − y + 2z = 2
Show the answer
(x, y, z) = (3, 3, 1)

More from Cramer's rule with three equations

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