Steply

Solve x + y + 4z = 6, 2x + y + z = 7, x + y + 2z = 4 with a matrix

Step by step, with the reason for every step · Augmented matrices · Algebra 2

Step by step

The question

Question: solve x + y + 4z = 6, 2x + y + z = 7 and x + y + 2z = 4 with a matrix.

x + y + 4z = 6①
2x + y + z = 7②

We want the x, y and z that make all three true.

x + y + 2z = 4③

We will use three moves on the rows.

Swap two rows.

Times a row by a number that is not 0.

Add a multiple of one row to another.

Each move keeps the equations true, like in elimination.

swap two rows
× a row by a number (not 0)
add a multiple of one row to another

1 Write the augmented matrix

Each row is one equation: the numbers in front of x, y and z, then the number on the right.

The bar stands for the = signs.

This is called an augmented matrix.

= [1, 1, 4, 6; 2, 1, 1, 7; 1, 1, 2, 4]

We call the rows R 1, R 2 and R 3.

2 Get 0s in column 1

→ [1, 1, 4, 6; 0, −1, −7, −5; 0, 0, −2, −2]

Careful!

A row move works on the whole row, the number after the bar too.

That number is the right side of the equation.

Careful: the whole row, after the bar too

3 Get a 1 in row 2

→ [1, 1, 4, 6; 0, 1, 7, 5; 0, 0, −2, −2]

4 Get 0s in column 2

→ [1, 0, −3, 1; 0, 1, 7, 5; 0, 0, −2, −2]

5 Get a 1 in row 3

→ [1, 0, −3, 1; 0, 1, 7, 5; 0, 0, 1, 1]

6 Get 0s in column 3

→ [1, 0, 0, 4; 0, 1, 0, −2; 0, 0, 1, 1]

7 Read the answer

Each row is an equation again.

Row 1 is 1x + 0y + 0z = 4.

So x = 4.

x = 4

Row 2: y = −2.

y = −2

Row 3: z = 1.

z = 1

We write it as (4, −2, 1).

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

8 Check

Let's check in every equation.

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

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

We get 6, the same as the right side.

Now ②.

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

We get 7, the same as the right side.

Now ③.

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

We get 4, the same as the right side.

All of them work.

So the answer is right!

Let's look back.

First: write the augmented matrix.

Then: get 0s in column 1.

Then: get a 1 in row 2.

Then: get 0s in column 2.

Then: get a 1 in row 3.

Then: get 0s in column 3.

Then: read the answer.

Last: check.

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

Your turn

Try this one yourself, then check:

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

More from Augmented matrices

The whole lesson: Augmented matrices →