The other tutor doesn't know about
solving dependent systems of equations
with Gaussian elimination. Here's how
to solve that using matrices and
Gaussian elimination:
2x - y + z = 8
3x + y - 6z = -28
x - y + 2z = 12
Line up the terms vertically:
2x - y + z = 8
3x + y - 6z = -28
x - y + 2z = 12
Fill in all invisible 1's for
coefficients:
2x - 1y + 1z = 8
3x + 1y - 6z = -28
1x - 1y + 2z = 12
Erase all the letters and
equal signs:
2 - 1 + 1 8
3 + 1 - 6 -28
1 - 1 + 2 12
Erase the plus signs
and move the minus
signs close to the
numbers as negative
signs:
2 -1 1 8
3 1 -6 -28
1 -1 2 12
Draw a vertical line
where the equal signs
were and put brackets
around the whole thing.
[2 -1 1 | 8]
[3 1 -6 | -28]
[1 -1 2 | 12]
This is called the
augmented matrix
The idea is to get 0's
in the three lower left
corner positions,
underneath the diagonal:
[2 -1 1 | 8]
[3 1 -6 | -28]
[1 -1 2 | 12]
It's easier when there is a 1
in the upper left corner, the
1st number on the diagonal, so
we will swap row 1 and row 3,
so we'll have a 1 on the first
diagonal element:
[1 -1 2 | 12]
[3 1 -6 | -28]
[2 -1 1 | 8]
To get a 0 where the 3 is,
mentally multiply each of the
numbers in the top row by -3
and add them to 1 times the
middle row. It makes it easy
if you write the numbers to
multiply the two rows by left
of the matrix beside the rows:
-3[1 -1 2 | 12]
1[3 1 -6 | -28]
[2 -1 1 | 8]
We get:
[1 -1 2 | 12]
[0 4 -12 | -64]
[2 -1 1 | 8]
To get a 0 where the 2 is in the
bottom left corner, mentally multiply each of the
numbers in the top row by -2
and add them to 1 times the
bottom row:
-2[1 -1 2 | 12]
[0 4 -12 | -64]
1[2 -1 1 | 8]
[1 -1 2 | 12]
[0 4 -12 | -64]
[0 1 -3 | -16]
It's easier when there is a 1
on the diagonal, so
we will swap row 2 and row 3,
so we'll have a 1 on the middle
diagonal element:
[1 -1 2 | 12]
[0 1 -3 | -16]
[0 4 -12 | -64]
To get a 0 where the 4 is,
multiply the middle row by -4
and add to 1 times the
bottom row:
[1 -1 2 | 12]
-4[0 1 -3 | -16]
1[0 4 -12 | -64]
We get
[1 -1 2 | 12]
-4[0 1 -3 | -16]
1[0 0 0 | 0]
Now that there are 0's
in those three positions,
we rewrite the augmented
matrix as a system of
equations, by putting the
variables and equal signs
back in:
[ 1x -1y 2z = 12]
[ 0x 1y -3z = -16]
[ 0x 0y 0z = 0]
Erase the brackets, the
terms with 0 coefficients,
the 1's, and move the negative signs
left as minus signs:
x - y + 2z = 12
y - 3z = -16
0z = 0
The bottom equation 0z = 0 is true
for any number we choose for z, so we
will represent it by the constant k.
[There are infinitely many solutions].
So we will set z equal to k
z = k
Substitute z = k into the middle
equation:
y - 3z = -16
y - 3k = -16
y = 3k - 16
Substitute y = 3k - 16 and z = k into
the top equation:
x - y + 2z = 12
x - (3k - 16) + 2k = 12
x - 3k + 16 + 2k = 12
x - k + 16 = 12
x = k - 4
So the solutions are given by:
(x, y, z) = (k-4, 3k-16, k)
For example the solution when k=0
is (x, y, z) = (-4, -16, 0)
The solution for k=1 is
(x, y, z) = (1-4, 3(1)-16, 1) or
(x, y, z) = (-3, -13, 1)
etc., etc., etc.
Edwin