Steply

Solution set of x + 2y = 4, 2x + 4y = 8, x + 2y + z = 5

Step by step, with the reason for every step · Solution sets · Linear Algebra

Step by step

The question

Question: find all the solutions of x + 2y = 4, 2x + 4y = 8 and x + 2y + z = 5.

x + 2y = 4①
2x + 4y = 8②

We want every x, y and z that make all of them true.

x + 2y + z = 5③

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, after the bar.

= [1, 2, 0, 4; 2, 4, 0, 8; 1, 2, 1, 5]

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

2 Row reduce

We use the three row moves: swap two rows, times a row by a number that is not 0, add a multiple of one row to another.

They never change the answers.

Our goal: a leading 1 in each row, with 0s above and below it.

swap two rows
× a row by a number (not 0)
add a multiple of one row to another
→ [1, 2, 0, 4; 0, 0, 0, 0; 0, 0, 1, 1]
→ [1, 2, 0, 4; 0, 0, 1, 1; 0, 0, 0, 0]

3 Find the free letters

The first number that is not 0 in each row is a 1.

We call it a leading 1, and ring it.

The letters x and z have a leading 1 in their columns.

The letter y has none: it is free.

A free letter can be any number.

A row of 0s says 0 = 0: always true, so it tells us nothing.

leading 1: x, z
free: y

4 Write the leading letters with the free ones

Row 1 as an equation: x + 2y = 4.

x + 2y = 4

We want x alone.

To remove + 2y, we take away 2y on both sides.

x + 2y − 2y = 4 − 2y

They cancel on the left.

So x = 4 − 2y.

x = 4 − 2y

Careful!

The + 2y moves to the other side, so its sign changes.

So x is not 4 + 2y.

Careful: not x = 4 + 2y ✗

Row 2 as an equation: z = 1.

So z = 1.

z = 1

5 Write it as vectors

We stack the letters in a column.

The letter y is free, so it stays y.

[x; y; z] = [4 − 2y; y; 1]

We split it up.

The numbers alone make one vector: (4, 0, 1).

What goes with y makes another: (−2, 1, 0).

[x; y; z] = [4; 0; 1] + y[−2; 1; 0], y any number

So every solution is one point, plus any amount of one direction.

One free letter: the solutions make a line.

one point + any amount of the direction

6 Check

Let's check.

First the point: all free letters 0.

We put x = 4, y = 0 and z = 1 into every equation.

① 4 + 2(0) = 4 + 0 = 4
② 2(4) + 4(0) = 8 + 0 = 8
③ 4 + 2(0) + 1 = 4 + 0 + 1 = 5

The point works in every equation.

Now the direction (−2, 1, 0).

Its left sides must give 0, so adding it changes nothing.

① (−2) + 2(1) = −2 + 2 = 0
② 2(−2) + 4(1) = −4 + 4 = 0
③ (−2) + 2(1) + 0 = −2 + 2 + 0 = 0

Every left side gives 0.

So adding any amount of it keeps every equation true.

The answer is right!

Let's look back.

First: write the augmented matrix.

Then: row reduce.

Then: find the free letters.

Then: write the leading letters with the free ones.

Then: write it as vectors.

Last: check.

Answer
one point + any amount of the direction

Your turn

Try this one yourself, then check:

Find all the solutions of x + 2y = 4, 2x + 4y = 8, x + 2y + z = 3
Show the answer
[x; y; z] = [4; 0; −1] + y[−2; 1; 0], y any number

More from Solution sets

The whole lesson: Solution sets →