Steply

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

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

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

2x + 3y + z = 8③

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

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

Then every diagonal has three numbers.

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

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

−2, 0, 0.

Together: −2.

= −2 + 0 + 0 = −2

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

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

0, 0, 3.

Together: 3.

= 0 + 0 + 3 = 3

Down minus up: −2 minus 3 is −5.

So D = −5.

D = −2 − 3 = −5

2 Find Dx

D x: the x column is replaced by the right sides, 7, −4, 8.

Dx = |7, 3, 0; −4, −1, 0; 8, 3, 1|7, 3; −4, −1; 8, 3

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

down = 7 × (−1) × 1 + 3 × 0 × 8 + 0 × −4 × 3

−7, 0, 0.

Together: −7.

= −7 + 0 + 0 = −7

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

up = 8 × (−1) × 0 + 3 × 0 × 7 + 1 × −4 × 3

0, 0, −12.

Together: −12.

= 0 + 0 + (−12) = −12

Down minus up: −7 minus (−12) is 5.

So D x = 5.

Dx = −7 − (−12) = 5

3 Find Dy

D y: the y column is replaced by the right sides, 7, −4, 8.

Dy = |2, 7, 0; 1, −4, 0; 2, 8, 1|2, 7; 1, −4; 2, 8

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

down = 2 × (−4) × 1 + 7 × 0 × 2 + 0 × 1 × 8

−8, 0, 0.

Together: −8.

= −8 + 0 + 0 = −8

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

up = 2 × (−4) × 0 + 8 × 0 × 2 + 1 × 1 × 7

0, 0, 7.

Together: 7.

= 0 + 0 + 7 = 7

Down minus up: −8 minus 7 is −15.

So D y = −15.

Dy = −8 − 7 = −15

4 Find Dz

D z: the z column is replaced by the right sides, 7, −4, 8.

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

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

−16, −24, 21.

Together: −19.

= −16 + (−24) + 21 = −19

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

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

−14, −24, 24.

Together: −14.

= −14 + (−24) + 24 = −14

Down minus up: −19 minus (−14) is −5.

So D z = −5.

Dz = −19 − (−14) = −5

5 Divide

x is D x over D: 5 over (−5) is −1.

x = DxD = 5−5 = −1

y is D y over D: −15 over (−5) is 3.

y = DyD = −15−5 = 3

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

z = DzD = −5−5 = 1

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

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

6 Check

Let's check in every equation.

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

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

We get 7, the same as the right side.

Now ②.

② (−1) − 3 = −1 − 3 = −4

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

Now ③.

③ 2(−1) + 3(3) + 1 = −2 + 9 + 1 = 8

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

Your turn

Try this one yourself, then check:

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

More from Cramer's rule with three equations

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