Worked examples
The question
Question: find all the solutions of x + 2y โ z = 3 and 2x + 4y + z = 3.
x + 2y โ z = 3โ
We want every x, y and z that make both true.
There are 3 letters, but only 2 equations.
2x + 4y + z = 3โก
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, โ1, 3; 2, 4, 1, 3]
We call the rows R 1 and R 2.
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, โ1, 3; 0, 0, 3, โ3]
โ [1, 2, โ1, 3; 0, 0, 1, โ1]
โ [1, 2, 0, 2; 0, 0, 1, โ1]
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.
leading 1: x, z
free: y
4 Write the leading letters with the free ones
Row 1 as an equation: x + 2y = 2.
x + 2y = 2
We want x alone.
To remove + 2y, we take away 2y on both sides.
x + 2y โ 2y = 2 โ 2y
They cancel on the left.
So x = 2 โ 2y.
x = 2 โ 2y
Careful!
The + 2y moves to the other side, so its sign changes.
So x is not 2 + 2y.
Careful: not x = 2 + 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] = [2 โ 2y; y; โ1]
We split it up.
The numbers alone make one vector: (2, 0, โ1).
What goes with y makes another: (โ2, 1, 0).
[x; y; z] = [2; 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 = 2, y = 0 and z = โ1 into every equation.
โ 2 + 2(0) โ (โ1) = 2 + 0 + 1 = 3
โก 2(2) + 4(0) + (โ1) = 4 + 0 โ 1 = 3
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) โ 0 = โ2 + 2 + 0 = 0
โก 2(โ2) + 4(1) + 0 = โ4 + 4 + 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
โถ Watch it solved
The question
Question: find all the solutions of x โ y + 2z = 1, 2x โ y + 3z = 4 and x + z = 3.
x โ y + 2z = 1โ
2x โ y + 3z = 4โก
We want every x, y and z that make all of them true.
x + z = 3โข
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, โ1, 2, 1; 2, โ1, 3, 4; 1, 0, 1, 3]
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, โ1, 2, 1; 0, 1, โ1, 2; 0, 1, โ1, 2]
โ [1, 0, 1, 3; 0, 1, โ1, 2; 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 y have a leading 1 in their columns.
The letter z 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, y
free: z
4 Write the leading letters with the free ones
Row 1 as an equation: x + z = 3.
x + z = 3
We want x alone.
To remove + z, we take away z on both sides.
x + z โ z = 3 โ z
They cancel on the left.
So x = 3 โ z.
x = 3 โ z
Careful!
The + z moves to the other side, so its sign changes.
So x is not 3 + z.
Careful: not x = 3 + z โ
Row 2 as an equation: y โ z = 2.
y โ z = 2
We want y alone.
To remove โ z, we add z on both sides.
y โ z + z = 2 + z
They cancel on the left.
So y = 2 + z.
y = 2 + z
5 Write it as vectors
We stack the letters in a column.
The letter z is free, so it stays z.
[x; y; z] = [3 โ z; 2 + z; z]
We split it up.
The numbers alone make one vector: (3, 2, 0).
What goes with z makes another: (โ1, 1, 1).
[x; y; z] = [3; 2; 0] + z[โ1; 1; 1], z 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 = 2 and z = 0 into every equation.
โ 3 โ 2 + 2(0) = 3 โ 2 + 0 = 1
โก 2(3) โ 2 + 3(0) = 6 โ 2 + 0 = 4
โข 3 + 0 = 3
The point works in every equation.
Now the direction (โ1, 1, 1).
Its left sides must give 0, so adding it changes nothing.
โ (โ1) โ 1 + 2(1) = โ1 โ 1 + 2 = 0
โก 2(โ1) โ 1 + 3(1) = โ2 โ 1 + 3 = 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
โถ Watch it solved
The question
Question: find all the solutions of x + y + z + w = 4 and x โ y + z โ w = 0.
x + y + z + w = 4โ
We want every x, y, z and w that make both true.
There are 4 letters, but only 2 equations.
x โ y + z โ w = 0โก
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, 1, 1, 4; 1, โ1, 1, โ1, 0]
We call the rows R 1 and R 2.
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, 1, 1, 1, 4; 0, โ2, 0, โ2, โ4]
โ [1, 1, 1, 1, 4; 0, 1, 0, 1, 2]
โ [1, 0, 1, 0, 2; 0, 1, 0, 1, 2]
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 y have a leading 1 in their columns.
The letters z and w have none: they are free.
A free letter can be any number.
leading 1: x, y
free: z, w
4 Write the leading letters with the free ones
Row 1 as an equation: x + z = 2.
x + z = 2
We want x alone.
To remove + z, we take away z on both sides.
x + z โ z = 2 โ z
They cancel on the left.
So x = 2 โ z.
x = 2 โ z
Careful!
The + z moves to the other side, so its sign changes.
So x is not 2 + z.
Careful: not x = 2 + z โ
Row 2 as an equation: y + w = 2.
y + w = 2
We want y alone.
To remove + w, we take away w on both sides.
y + w โ w = 2 โ w
They cancel on the left.
So y = 2 โ w.
y = 2 โ w
5 Write it as vectors
We stack the letters in a column.
The free letters stay as they are.
[x; y; z; w] = [2 โ z; 2 โ w; z; w]
We split it up.
The numbers alone make one vector: (2, 2, 0, 0).
What goes with z makes another: (โ1, 0, 1, 0), and the same for w.
[x; y; z; w] = [2; 2; 0; 0] + z[โ1; 0; 1; 0] + w[0; โ1; 0; 1], z and w any numbers
So every solution is one point, plus any amount of each direction.
Two free letters: the solutions make a flat plane.
one point + any amount of each direction
6 Check
Let's check.
First the point: all free letters 0.
We put x = 2, y = 2, z = 0 and w = 0 into every equation.
โ 2 + 2 + 0 + 0 = 4
โก 2 โ 2 + 0 โ 0 = 2 โ 2 + 0 + 0 = 0
The point works in every equation.
Now the direction (โ1, 0, 1, 0).
Its left sides must give 0, so adding it changes nothing.
โ (โ1) + 0 + 1 + 0 = โ1 + 0 + 1 + 0 = 0
โก (โ1) โ 0 + 1 โ 0 = โ1 + 0 + 1 + 0 = 0
Now the direction (0, โ1, 0, 1).
Its left sides must give 0, so adding it changes nothing.
โ 0 + (โ1) + 0 + 1 = 0 โ 1 + 0 + 1 = 0
โก 0 โ (โ1) + 0 โ 1 = 0 + 1 + 0 โ 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 each direction
โถ Watch it solved