Document

advertisement
Systems of equations
With Gaussian elimination
System of equations
4x - 2y = 0
1x + 2y = -5
Find all pairs of x and y values that make
the equations true.
System of equations
4x - 2y = 0
1x + 2y = -5
1x + 2y = -5
4x - 2y = 0
Swap the order of the rows
R1 <-> R2
System of equations
1x + 2y = -5
4x - 2y = 0
-4x - 8y = 20
4x - 2y = 0
Multiply a row by a number
-4*R1  R1
System of equations
-4x - 8y = 20
4x - 2y = 0
-4x - 8y = 20
0x -10y = 20
Add a row to another row
R1 + R2  R2
System of equations
-4x - 8y = 20
0x -10y = 20
1x + 2y = -5
0x -10y = 20
Multiply a row by a number
-¼*R1  R1
The add-multiply shortcut
1x + 2y = -5
1x + 2y = -5
4x - 2y = 0
0x -10y = 20
Multiply a row by a number
and add it to another row
-4*R1 + R2  R2
Row operations
•
•
•
•
Swap rows R1<-> R2
Multiply a row by a number k*R1  R1
Add rows together R1 + R2  R2
Multiply-add shortcut k*R1 + R2  R2
Gaussian Elimination
• A method that you can use to solve ANY
system of equations (no matter how big),
using only two rules.
• Multiply a row by a number k*R1  R1
• Multiply-add shortcut k*R1 + R2  R2
How to solve a system of (any number
of) linear equations
Method: Gaussian Elimination
• Today’s fun irrelevant fact: Gauß is my greatgreat-great-great-great-great-great-grandadvisor
• Gauß  Gerling  Plucker  Klein  Bocher
 Ford  Engen  Steffe  Thompson 
Castillo-Garsow
The method
• Write equations in standard form
• Use multiply to get 1x in the top equation
• Use multiply-add to get 0x in all other
equations.
• Use multiply to get 1y in the second equation
• Use multiply-add to get 0y in all other
equations.
• Repeat for all variables.
Gaussian Elimination
• Get your system in standard form
(All the variables on one side, all the constants
on the other)
4x + 8y - 4z = 8
2x + 3y + 4z = 4
5x + 8y + 1z = 7
Gaussian Elimination
• Use multiply to get 1x in the top equation
4x + 8y - 4z = 8 (1/4) * R1 --> R1
2x + 3y + 4z = 4
5x + 8y + 1z = 7
1x + 2y - 1z = 2
2x + 3y + 4z = 4
5x + 8y + 1z = 7
Gaussian Elimination
• Use multiply-add to get 0xs everywhere else
1x + 2y - 1z = 2
2x + 3y + 4z = 4 -2 * R1 + R2 --> R2
5x + 8y + 1z = 7 -5 * R1 + R3 --> R3
1x + 2y - 1z = 2
0x - 1y + 6z = 0
0x - 2y + 6z = -3
Gaussian Elimination
• Use multiply to get 1y in the second equation
1x + 2y - 1z = 2
0x - 1y + 6z = 0 -1 * R2 --> R2
0x - 2y + 6z = -3
1x + 2y - 1z = 2
0x + 1y - 6z = 0
0x - 2y + 6z = -3
Gaussian Elimination
• Use multiply-add to get 0ys in all other equations
• You can do all of these now, but I’m going to put one off
for later.
1x + 2y - 1z = 2
0x + 1y - 6z = 0
0x - 2y + 6z = -3 2 * R2 + R3 --> R3
1x + 2y - 1z = 2
0x + 1y - 6z = 0
0x + 0y - 6z = -3
Gaussian Elimination
• Use multiply to get 1z in the third equation
1x + 2y - 1z = 2
0x + 1y - 6z = 0
0x + 0y - 6z = -3 (-1/6) * R3 --> R3
1x + 2y - 1z = 2
0x + 1y - 6z = 0
0x + 0y + 1z = 0.5
Gaussian Elimination
• Get 0z in all other equations
1x + 2y - 1z = 2
1 * R3 + R1 --> R1
0x + 1y - 6z = 0
6 * R3 + R2 --> R2
0x + 0y + 1z = 0.5
1x + 2y + 0z = 2.5
0x + 1y + 0z = 3
0x + 0y + 1z = 0.5
Gaussian Elimination
• Finish my incomplete step
• Get 0y in all other equations
1x + 2y + 0z = 2.5 -2 * R2 + R1 --> R1
0x + 1y + 0z = 3
0x + 0y + 1z = 0.5
1x + 0y + 0z = -3.5
0x + 1y + 0z = 3
0x + 0y + 1z = 0.5
Solve the system of
equations
-3x − 9y = -6
-3x − 13y = -8
a)
b)
c)
d)
e)
x = -2, y = 0
x = 0, y = 8/13
x = 1/2, y = 1/2
x = -1/2, y = -1/2
None of the above
-3x − 9y = -6 (-1/3)*R1 ->R1
-3x − 13y = -8
1x + 3y = 2
-3x − 13y = -8 3R1 + R2 -> R2
1x + 3y = 2
0x − 4y = -2
1x + 3y = 2
0x + 1y = ½
1x + 0y = 1/2
0x + 1y = 1/2
(-1/4)R2 -> R2
(-3)R2 + R1 -> R1
C
-3x − 9y = -6 (-1/3)*R1 ->R1
-3x − 13y = -8
é -3 -9 -6 ù
ê
ú
ë -3 -13 -8 û
1x + 3y = 2
-3x − 13y = -8 3R1 + R2 -> R2
é 1
3
2 ù
ê
ú
ë -3 -13 -8 û
1x + 3y = 2
0x − 4y = -2
é 1 3 2 ù
ê
ú
ë 0 -4 -2 û
1x + 3y = 2
0x + 1y = ½
1x + 0y = 1/2
0x + 1y = 1/2
(-1/4)R2 -> R2
(-3)R2 + R1 -> R1
é 1 3 2 ù
ê
ú
ë 0 1 0.5 û
é 1 0 0.5 ù
ê
ú
ë 0 1 0.5 û
What is the system of equations corresponding to
the augmented matrix below?
a)
b)
c)
d)
e)
2x+3y = 4, x + 2y = 3
3x+2y = 4, 2x + y = 3
2x+y = 4, 3x + 2y = 3
x+y = 4, x + 2y = 3
None of the above
What is the system of equations corresponding to
the augmented matrix below?
a) 2x+3y = 4, x + 2y = 3
Solving a system of equations on your
calculator (and showing work)
• Solve
4x + 8y - 4z = 8
2x + 3y + 4z = 4
5x + 8y + 1z = 7
In my calculator, I set the matrix [A]
é 4 8 -4 8 ù
ê
ú
[ A] = ê 2 3 4 4 ú
ê 5 8 1 7 ú
ë
û
Then I used the command
rref([A])
The calculator output was
So the answer is
x=-3.5
y=3
z=0.5
é 1 0 0 -3.5 ù
ê
ú
ê 0 1 0 3 ú
ê 0 0 1 0.5 ú
ë
û
Special situations
• If, at the end you wind up with something
impossible, then there are NO SOLUTIONS
• Example:
é 1 2 4 ù
ê
ú
ë 0 0 1 û
The last row:
0x + 0y = 1 is impossible,
So there are NO SOLUTIONS.
Special situations
• If, at the end you wind up with something that
is always true, then there are INFINITELY
MANY SOLUTIONS
• Example:
é 1 2 4 ù
ê
ú
ë 0 0 0 û
The last row:
0x + 0y = 0 is always true,
So there are INFINITELY MANY
SOLUTIONS.
Solve the following system.
a)
b)
c)
d)
e)
x = 0, y = 3, z = 2
x = 5, y = 3, z = 2
x = 1, y = 3, z = 2
x = -2, y = 3, z = 2
None of the above
x=-2
y=3
z=2 D
Download