Systems of Linear Equations
Systems of Linear Equations
It's a race!
The Horse can run 0.5 km every minute. But it takes 6 minutes to saddle the horse.
How far can you get before the horse catches you?
You: d = 0.2t
The Horse: d = 0.5(t−6)
It seems you get caught after 10 minutes ... you only got 2 km away.
Solving
Now, a linear equation is not always in the form like y = 3x+2,
Or −3x + y = 2
x+y=6
−3x + y = 2
x + y − (−3x + y) = 6 − 2
x + y + 3x − y = 6 − 2
4x = 4
x=1
And we can find the matching value of y using either of the two original equations (because
we know they have the same value at x=1). Let's use the first one (you can try the second one
yourself):
x+y=6
1+y=6
y=5
x = 1 and y = 5
Linear Equations
(such as x and y)
... or 3 dimensions
(such as x, y and z) ...
... or 4 dimensions ... or more! (I just can't draw those)
Common Variables
For the equations to "work together" they share one or more variables:
Many Variables
So a System of Equations could have many equations and many variables.
2x + y − 2z = 3
x − y − z = 0
x + y + 3z = 12
2 equations in 3 variables,
6 equations in 4 variables,
Solutions
When the number of equations is the same as the number of variables there is likely to be a
solution. Not guaranteed, but likely.
No solution
One solution
Infinitely many solutions
Example:
x+y=3
2x + 2y = 6
Those equations are "Dependent", because they are really the same equation, just
multiplied by 2.
The "you" line is true all along its length (but nowhere else).
at t=5 and d=1, the equation is true (Is d = 0.2t? Yes, as 1 = 0.2×5 is true)
at t=5 and d=3, the equation is not true (Is d = 0.2t? No, as 3 = 0.2×5 is not true)
Likewise the "horse" line is also true all along its length (but nowhere else).
But only at the point where they cross (at t=10, d=2) are they both true.
... that is why some people call them "Simultaneous Linear Equations"
Solve Using Algebra
Instead of plotting a graph we can use Algebra:
d = 0.2t
d = 0.5(t-6)
d = 0.2t = 0.5(t-6)
t = 10 minutes and d = 2 km
Algebra vs Graphs
Why use Algebra when graphs are so easy? Because:
Solving By Substitution
Solving By Elimination
Solving By Substitution
These are the steps:
Example:
x+z=6
z - 3y = 7
2x + y + 3z = 15
We should line up the variables neatly, or we may lose track of what we are doing:
x + z = 6
- 3y + z = 7
2x + y + 3z = 15
We can start with any equation and any variable. Let's use the first equation and the variable
"x".
Write one of the equations so it is in the style "variable = ...":
x = 6-z
- 3y + z = 7
2x + y + 3z = 15
x = 6-z
- 3y + z = 7
2(6-z) + y + 3z = 15
2(6-z) + y + 3z = 15 simplifies to y + z = 3:
x = 6-z
- 3y + z = 7
y + z = 3
Now repeat the process, but just for the last 2 equations.
x = 6-z
- 3y + z = 7
z = 3-y
x = 6-z
- 3y + 3-y = 7
z = 3-y
x = 6-z
y = -1
z = 3-y
Almost Done!
x = 6-z
y = -1
z = 4
x = 2
y = -1
z = 4
x = 2, y = -1 and z = 4
Conclusion: Substitution works nicely, but does take a long time to do.
Solving By Elimination
Elimination can be faster ... but needs to be kept neat.
"Eliminate" means to remove: this method works by removing variables until there is just
one left.
(We can also swap equations, so the 1st could become the 2nd, etc ... if that helps).
Example:
3x + 2y = 19
x+y=8
3x + 2y = 19
x + y = 8
3x + 2y = 19
2x + 2y = 16
x = 3
2x + 2y = 16
Next we see the 2nd equation has "2x", so let's halve it, and then subtract "x":
x = 3
y = 5
Done!
x = 3 and y = 5
Example:
2x - y = 4
6x - 3y = 3
2x - y = 4
6x - 3y = 3
6x - 3y = 12
6x - 3y = 3
0 - 0 = 9
6x - 3y = 3
0 - 0 = 9 ???
And lastly:
Example:
2x - y = 4
6x - 3y = 12
Neatly:
2x - y = 4
6x - 3y = 12
6x - 3y = 12
6x - 3y = 12
0 - 0 = 0
6x - 3y = 3
0-0=0
... that is because they are really the same equation ...
And so now we have seen an example of each of the three possible cases:
No solution
One solution
Infinitely many solutions
Solving By Elimination: 3 equations in 3 variables
Before we start on the next example, let's look at an improved way to do things.
Example:
x+y+z=6
2y + 5z = -4
2x + 5y - z = 27
Written neatly:
x + y + z = 6
2y + 5z = -4
2x + 5y - z = 27
Subtract 2 times the 1st equation from the 3rd equation (just do this in your head or on
scratch paper):
And we get:
x + y + z = 6
2y + 5z = -4
3y - 3z = 15
x + y + z = 6
2y + 5z = -4
z = -2
x + y + z = 6
y = 3
z = -2
x = 5
y = 3
z = -2
x = 5, y = 3 and z = -2