Steply

Solution set of x + y = 2, y + z = 3, z + w = 4

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 + y = 2, y + z = 3 and z + w = 4.

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

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

There are 4 letters, but only 3 equations.

z + w = 4③

1 Write the augmented matrix

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

= [1, 1, 0, 0, 2; 0, 1, 1, 0, 3; 0, 0, 1, 1, 4]

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, 0, −1, 0, −1; 0, 1, 1, 0, 3; 0, 0, 1, 1, 4]
→ [1, 0, 0, 1, 3; 0, 1, 0, −1, −1; 0, 0, 1, 1, 4]

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, y and z have a leading 1 in their columns.

The letter w has none: it is free.

A free letter can be any number.

leading 1: x, y, z
free: w

4 Write the leading letters with the free ones

Row 1 as an equation: x + w = 3.

x + w = 3

We want x alone.

To remove + w, we take away w on both sides.

x + w − w = 3 − w

They cancel on the left.

So x = 3 − w.

x = 3 − w

Careful!

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

So x is not 3 + w.

Careful: not x = 3 + w ✗

Row 2 as an equation: y − w = −1.

y − w = −1

We want y alone.

To remove − w, we add w on both sides.

y − w + w = −1 + w

They cancel on the left.

So y = −1 + w.

y = −1 + w

Row 3 as an equation: z + w = 4.

z + w = 4

We want z alone.

To remove + w, we take away w on both sides.

z + w − w = 4 − w

They cancel on the left.

So z = 4 − w.

z = 4 − w

5 Write it as vectors

We stack the letters in a column.

The letter w is free, so it stays w.

[x; y; z; w] = [3 − w; −1 + w; 4 − w; w]

We split it up.

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

What goes with w makes another: (−1, 1, −1, 1).

[x; y; z; w] = [3; −1; 4; 0] + w[−1; 1; −1; 1], w 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 = 3, y = −1, z = 4 and w = 0 into every equation.

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

The point works in every equation.

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

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

① (−1) + 1 = −1 + 1 = 0
② 1 + (−1) = 1 − 1 = 0
③ (−1) + 1 = −1 + 1 = 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 + y = 4, y + z = 3, z + w = 1
Show the answer
[x; y; z; w] = [2; 2; 1; 0] + w[−1; 1; −1; 1], w any number

More from Solution sets

The whole lesson: Solution sets →