Steply

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

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

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

x + y = 6③

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

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

Then every diagonal has three numbers.

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

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

0, 0, 1.

Together: 1.

= 0 + 0 + 1 = 1

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

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

−1, −2, 0.

Together: −3.

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

Down minus up: 1 minus (−3) is 4.

So D = 4.

D = 1 − (−3) = 4

2 Find Dx

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

Dx = |3, 0, 1; −1, −1, −1; 6, 1, 0|3, 0; −1, −1; 6, 1

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

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

0, 0, −1.

Together: −1.

= 0 + 0 + (−1) = −1

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

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

−6, −3, 0.

Together: −9.

= −6 + (−3) + 0 = −9

Down minus up: −1 minus (−9) is 8.

So D x = 8.

Dx = −1 − (−9) = 8

3 Find Dy

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

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

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

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

0, −3, 6.

Together: 3.

= 0 + (−3) + 6 = 3

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

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

−1, −12, 0.

Together: −13.

= −1 + (−12) + 0 = −13

Down minus up: 3 minus (−13) is 16.

So D y = 16.

Dy = 3 − (−13) = 16

4 Find Dz

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

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

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

−12, 0, 3.

Together: −9.

= −12 + 0 + 3 = −9

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

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

−3, −2, 0.

Together: −5.

= −3 + (−2) + 0 = −5

Down minus up: −9 minus (−5) is −4.

So D z = −4.

Dz = −9 − (−5) = −4

5 Divide

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

x = DxD = 84 = 2

y is D y over D: 16/4 is 4.

y = DyD = 164 = 4

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

z = DzD = −44 = −1

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

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

6 Check

Let's check in every equation.

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

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

We get 3, the same as the right side.

Now ②.

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

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

Now ③.

③ 2 + 4 = 6

We get 6, 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) = (2, 4, −1)

Your turn

Try this one yourself, then check:

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

More from Cramer's rule with three equations

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