1. systemsofequations handout
TRANSCRIPT
-
8/13/2019 1. SystemsofEquations Handout
1/44
A FIRST COURSE
IN LINEAR ALGEBRAAn Open Text by Ken Kuttler
Systems of Linear Equations
Lecture Notes by Karen Seyffarth
Adapted byLYRYX SERVICE COURSE SOLUTION
Attribution-NonCommercial-ShareAlike (CC BY-NC-SA)This license lets others remix, tweak, and build upon your work
non-commercially, as long as they credit you and license their new creationsunder the identical terms.
Systems of Linear Equations Page 1/44
-
8/13/2019 1. SystemsofEquations Handout
2/44
Systems of Linear Equations
Example
A system oflinear equations:
x1 2x2 7x3 = 1x1 + 3x2 + 6x3 = 0
variables: x1, x2, x3.
coefficients:1x1 2x2 7x3 = 1
1x1 + 3x2 + 6x3 = 0
constant terms:
x1 2x2 7x3 = 1x1 + 3x2 + 6x3 = 0
Systems of Linear Equations Systems of Linear Equations Page 2/44
-
8/13/2019 1. SystemsofEquations Handout
3/44
A Graphical Solution
Example
Use a graph to find the solution to the following system of equations
x+y= 3y x= 5
y=x+5
y=-x+3
(-1,4)
Systems of Linear Equations Systems of Linear Equations Page 3/44
-
8/13/2019 1. SystemsofEquations Handout
4/44
An Algebraic Solution
Example
x1 =3, x2 =1, x3 = 0 is a solutionto the system
x1 2x2 7x3 = 1x1 + 3x2 + 6x3 = 0
as is x1 = 6, x2 = 0, x3 = 1.
However, x1 =1, x2 = 0, x3 = 0is nota solution to the system.
A solution to the system must be a solution to every equation in the
system.
The system above is consistent, meaning that the system has at leastone solution.
Systems of Linear Equations Systems of Linear Equations Page 4/44
-
8/13/2019 1. SystemsofEquations Handout
5/44
Example (continued)x1 + x2 + x3 = 0x1 + x2 + x3 = 8
is an example of an inconsistent system, meaning that it has no solutions.
Why are there no solutions?
Systems of Linear Equations Systems of Linear Equations Page 5/44
-
8/13/2019 1. SystemsofEquations Handout
6/44
Systems of Linear Equations
Example
For any sa real number(written s R), then
x1 =3 + 9s, x2 =1 +s, x3 =s
is a solution to the system
x1 2x2 7x3 = 1x1 + 3x2 + 6x3 = 0
Verify this by substituting the expressions for x1, x2, and x3 into the twoequations.
s is called aparameter, and the solution is written in terms ofsx1 =3 + 9s, x2 =1 +s, x3 =s, where s R
Systems of Linear Equations Systems of Linear Equations Page 6/44
-
8/13/2019 1. SystemsofEquations Handout
7/44
Systems of Linear Equations
Problem
Find all solutions to a system of m linear equations in n variables, i.e.,
solve a system of linear equations.
Definition
Two systems of linear equations areequivalentif they have exactly the
same solutions.
Example
The two systems of linear equations
2x + y = 23x = 3
and x + y = 1y = 0
areequivalent because both systems have the unique solution x= 1,y= 0.
Systems of Linear Equations Systems of Linear Equations Page 7/44
-
8/13/2019 1. SystemsofEquations Handout
8/44
Elementary Operations
We will solve systems of linear equations by usingElementary Operationsto transform the system into an equivalent but much simpler system fromwhich we can read the solution.
The Elementary Operations are of 3 kinds:Type I: Interchange two equations.
Type II: Multiply an equation by a nonzero number.
Type III: Add a (nonzero) multiple of one equation to a different
equation.
Systems of Linear Equations Elementary Operations Page 8/44
-
8/13/2019 1. SystemsofEquations Handout
9/44
Theorem (Elementary Operations and Solutions)
Suppose you have a system of two linear equations
E1 =b1E2 =b2 (1)
Then the following systems have the same solution set as (1):
1
E2 =b2E1 =b1
2
E1 =b1
kE2 =kb2
for any scalar k, provided k= 0.
3
E1 =b1
E2+kE1 =b2+kb1=Systems of Linear Equations Elementary Operations Page 9/44
-
8/13/2019 1. SystemsofEquations Handout
10/44
Solving a System with Elementary Operations
Example
Use Elementary Operations to solve the system
2x+y= 4x 3y= 1
Solution: Add (2) times the second row to the first row.
2x+y+ (2)x (2)(3)y= 4+ (2)1x 3y= 1
The result is an equivalent system
7y= 2x 3y= 1
Systems of Linear Equations Elementary Operations Page 10/44
-
8/13/2019 1. SystemsofEquations Handout
11/44
Example (continued)
The first equation of the system,
7y= 2
tells us that
y=2
7
Now, use this value in the second equation:
x 3y=x 3
2
7
= 1
Simplifying,x= 1 +
6
7=
13
7
The solution is x= 137 , y= 27 .
The method used here is calledback substitution.Systems of Linear Equations Elementary Operations Page 11/44
-
8/13/2019 1. SystemsofEquations Handout
12/44
The Augmented MatrixRepresent a system of linear equations with its augmented matrix.
Example
The system of linear equations
x1 2x2 7x3 = 1x1 + 3x2 + 6x3 = 0
is represented by theaugmented matrix 1 2 7 11 3 6 0
(Amatrix is a rectangular array of numbers.)
Note. Two othermatricesassociated with a system of linear equations are
thecoefficient matrixand theconstant matrix. 1 2 71 3 6
,
1
0
Systems of Linear Equations The Augmented Matrix Page 12/44
-
8/13/2019 1. SystemsofEquations Handout
13/44
-
8/13/2019 1. SystemsofEquations Handout
14/44
Elementary Row Operations
Type II: Multiply a row by a nonzero number.
Example
Multiply row 4 by 2.
2 1 0 5 3
2 0 3 3 10 5 6 1 01 4 2 2 2
2 1 0 5 32 0 3 3 1
0 5 6 1 02 8 4 4 4
Systems of Linear Equations Elementary Row Operations Page 14/44
-
8/13/2019 1. SystemsofEquations Handout
15/44
Elementary Row Operations
Type III: Add a (nonzero) multiple of one row to a different row.
Example
Add 2 times row 4 to row 2.
2 1 0 5 3
2 0 3 3 10 5 6 1 01 4 2 2 2
2 1 0 5 30 8 7 7 30 5 6 1 01 4 2 2 2
Systems of Linear Equations Elementary Row Operations Page 15/44
-
8/13/2019 1. SystemsofEquations Handout
16/44
Row-Echelon Matrix
All rows consisting entirely of zeros are at the bottom.
The first nonzero entry in each nonzero row is a 1(called the leading 1 for that row).
Each leading 1 is to the right of all leading 1s in rows above it.
Example
0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 00 0 0 0 0 0 0 0
where can be any number.
Systems of Linear Equations Row-Echelon Matrix Page 16/44
-
8/13/2019 1. SystemsofEquations Handout
17/44
Reduced Row-Echelon Matrix
Row-echelon matrix.
Each leading 1 is the only nonzero entry in its column.
Example
0 1 0 0 0
0 0 0 1 0 00 0 0 0 1 00 0 0 0 0 0 0 10 0 0 0 0 0 0 00 0 0 0 0 0 0 0
where can be any number.
We use elementary row operations to carry a matrix to either row-echelonor reduced row-echelon form.
Systems of Linear Equations Reduced Row-Echelon Matrix Page 17/44
S S f
-
8/13/2019 1. SystemsofEquations Handout
18/44
Solving Systems of Linear Equations
Solving a system of linear equations means finding all solutions to thesystem.
Method I: Gauss-Jordan Elimination
1 Use elementary row operations to transform the augmented matrix toan equivalent (not equal) reduced row-echelon matrix. Theprocedure for doing this is called theGaussian Algorithm, also calledtheReduced Row-Echelon Form Algorithm.
2 If a row of the form [0 0 0|1] occurs, then there is no solution
3 Otherwise assign parameters to the nonleading variables (if any), andsolve for the leading variables in terms of the parameters.
Systems of Linear Equations Gauss-Jordan Elimination Page 18/44
G J d Eli i i
-
8/13/2019 1. SystemsofEquations Handout
19/44
Gauss-Jordan EliminationExample
Solve the system2x + y + 3z = 12y z + x = 09z + x 4y = 2
Solution:
2 1 3 11 2 1 01 4 9 2
1 2 1 0
2 1 3 11 4 9 2
1 2 1 0
0 3 5 10 6 10 2
1 2 1 00 3 5 1
0 0 0 0
1 2 1 00 1 53
13
0 0 0 0
1 0 7323
0 1 53 13
0 0 0 0
Systems of Linear Equations Gauss-Jordan Elimination Page 19/44
-
8/13/2019 1. SystemsofEquations Handout
20/44
S l i S t f Li E ti
-
8/13/2019 1. SystemsofEquations Handout
21/44
Solving Systems of Linear Equations
Method II: Gaussian Elimination with Back-Substitution
1 Use elementary row operations to transform the augmented matrix toan equivalent row-echelon matrix.
2 The solutions (if they exist) can be determined usingback-substitution.
Systems of Linear Equations Gaussian Elimination Page 21/44
G i Eli i ti ith B k S b tit ti
-
8/13/2019 1. SystemsofEquations Handout
22/44
Gaussian Elimination with Back Substitution
Example
Solve the system2x + y + 3z = 12y z + x = 09z + x 4y = 2
Solution: 2 1 3 11 2 1 0
1 4 9 2
1 2 1 02 1 3 1
1 4 9 2
1 2 1 00 3 5 1
0 6 10 2
1 2 1 00 3 5 1
0 0 0 0
1 2 1 00 1 53
13
0 0 0 0
Systems of Linear Equations Gaussian Elimination Page 22/44
Example (continued)
-
8/13/2019 1. SystemsofEquations Handout
23/44
Example (continued)
This row-echelon matrix corresponds to the system
x + 2y z = 0
y 53 z = 13 , so
x = 2y+z
y = 13 + 53 z ,
and thusx = 2( 13 +
53 z) +z =
23
73 z
y = 13 + 53 z
Setting z=s, where s R, gives us (as before):
x = 23 73 s
y = 13 + 5
3 s
z = s
Systems of Linear Equations Gaussian Elimination Page 23/44
Example
-
8/13/2019 1. SystemsofEquations Handout
24/44
Example
Solve the systemx + y + 2z = 1y + 2x + 3z = 0z 2y = 2
Solution:
1 1 2 12 1 3 0
0 2 1 2
1 1 2 10 1 1 2
0 2 1 2
1 1 2 10 1 1 2
0 2 1 2
1 0 1 10 1 1 20 0 3 2
1 0 1 10 1 1 20 0 1 23
1 0 0 530 1 0 430 0 1 2
3
The unique solution is x= 53 , y=43 , z=
23 .
Check your answer!
Systems of Linear Equations Gaussian Elimination Page 24/44
Example
-
8/13/2019 1. SystemsofEquations Handout
25/44
Example
Solve the system
3x1 9x2 + x3 = 9
2x1 + 6x2 x3 = 6x1 + 3x2 x3 = 2
Solution:
1 3 1 22 6 1 63 9 1 9
1 3 1 20 0 1 20 0 2 3
1 3 0 40 0 1 20 0 0 1
The last row of the final matrix corresponds to the equation
0x1+ 0x2+ 0x3 = 1
which is impossible!Therefore, this system is inconsistent, i.e., it has no solutions.
Systems of Linear Equations Gaussian Elimination Page 25/44
-
8/13/2019 1. SystemsofEquations Handout
26/44
-
8/13/2019 1. SystemsofEquations Handout
27/44
Example (continued)
1 3 2 10 1 2 c2 3 a b
1 3 2 1
0 1 2 c0 3 a+ 4 b 2
1 3 2 10 1 2 c
0 3 a+ 4 b 2
1 0 4 1 + 3c0 1 2 c
0 0 a 2 b 2 3c
Case 1. a 2= 0, i.e., a= 2. In this case,
1 0 4 1 + 3c0 1 2 c
0 0 1 b23ca2
1 0 0 1 + 3c 4
b23c
a2
0 1 0 c+ 2 b23ca2 0 0 1 b23c
a2
Systems of Linear Equations General Patterns Page 27/44
-
8/13/2019 1. SystemsofEquations Handout
28/44
Example (continued)
1 0 0 1 + 3c 4b23ca2
0 1 0 c+ 2
b23ca2
0 0 1 b23c
a2
(i) When a= 2, the unique solution is
x= 1 + 3c 4
b 2 3c
a 2
, y=c+ 2
b 2 3c
a 2
,
z=b 2 3c
a 2 .
Systems of Linear Equations General Patterns Page 28/44
-
8/13/2019 1. SystemsofEquations Handout
29/44
Example (continued)
Case 2. Ifa= 2, then the augmented matrix becomes
1 0 4 1 + 3c0 1 2 c
0 0 a 2 b 2 3c
1 0 4 1 + 3c0 1 2 c
0 0 0 b 2 3c
From this we see that the system has no solutions when b 2 3c= 0.
(ii) When a= 2 and b 3c= 2, the system has no solutions.
Systems of Linear Equations General Patterns Page 29/44
-
8/13/2019 1. SystemsofEquations Handout
30/44
Example (continued)
Finally when a= 2 and b 3c= 2, the augmented matrix becomes
1 0 4 1 + 3c0 1 2 c
0 0 0 b 2 3c
1 0 4 1 + 3c0 1 2 c
0 0 0 0
and the system has infinitely many solutions.(iii) When a= 2 and b 3c= 2, the system has infinitely many solutions,given by
x = 1 + 3c 4s
y = c + 2sz = s
where s R.
Systems of Linear Equations General Patterns Page 30/44
Uniqueness of the Reduced Row-Echelon Form
-
8/13/2019 1. SystemsofEquations Handout
31/44
Uniqueness of the Reduced Row Echelon Form
Theorem
The two linear systems of equations corresponding to two equivalentaugmented matrices have exactly the same solutions.
Theorem
Every matrix A is equivalent to a unique matrix in reduced row-echelonform.
Systems of Linear Equations Uniqueness Page 31/44
Homogeneous Systems of Equations
-
8/13/2019 1. SystemsofEquations Handout
32/44
Homogeneous Systems of Equations
DefinitionA system of equations is called homogeneous if each equation in thesystem is equal to 0. A homogeneous system has the form
a11x1+a12x2+ +a1nxn = 0a21x1+a22x2+ +a2nxn = 0
...am1x1+am2x2+ +amnxn = 0
where aijare scalars and xi are variables.
Systems of Linear Equations Homogeneous Systems Page 32/44
The Trivial Solution
-
8/13/2019 1. SystemsofEquations Handout
33/44
Notice that x1 = 0, x2 = 0, , xn = 0 is always a solution to ahomogeneous system of equations. We call this thetrivial solution.
We are interested in finding thenon trivial solutionsto a homogeneoussystem, if they exist.
Systems of Linear Equations Homogeneous Systems Page 33/44
Homogeneous Equations
-
8/13/2019 1. SystemsofEquations Handout
34/44
g q
Example
Solve the system
x1 + x2 x3 + 3x4 = 0
x1 + 4x2 + 5x3 2x4 = 0x1 + 6x2 + 3x3 + 4x4 = 0
1 1 1 3 0
1 4 5 2 0
1 6 3 4 0
1 0 95
145 0
0 1 4515 0
0 0 0 0 0
The system has infinitely many solutions, and the general solution is
x1 = 9
5 s 14
5t
x2 = 45 s 15 t
x3 = sx4 = t
or
x1x2x3x4
=
95 s
145t
45 s 15 t
st
, where s, t R.
Systems of Linear Equations Homogeneous Systems Page 34/44
Definition
-
8/13/2019 1. SystemsofEquations Handout
35/44
IfX1, X2, . . . , Xpare columns with the same number of entries, and ifa1, a2, . . . ar R (are scalars) then a1X1+a2X2+ +apXp is a linearcombinationof columns X1, X2, . . . , Xp.
Example (continued)
In the previous example,
x1x2x3x4
=
9
5
s 14
5
t
45 s 15 t
st
=
9
5 s 45 s
s0
+
14
5t 15 t
0t
= s
95
4510
+t
145 15
01
Systems of Linear Equations Homogeneous Systems Page 35/44
Example (continued)
-
8/13/2019 1. SystemsofEquations Handout
36/44
This gives us
x1x2x3x4
=s95
4510
+t
145
1501
=sX1+tX2,
where X1 =
9
5
4510
and X2 =
14
5
1501
.
The columns X1 and X2 are calledbasic solutionsto the originalhomogeneous system.
The general solution to a homogeneous system can be expressed as alinear combinationofbasic solutions.
Systems of Linear Equations Homogeneous Systems Page 36/44
-
8/13/2019 1. SystemsofEquations Handout
37/44
Example (continued)
Notice that
x1x2x3x4
=s
95
4510
+t
145 15
01
= s
5
94
50
+ t5
141
05
= r
94
50
+q
141
05
= r(5X1) +q(5X2)
where r, q R.
Systems of Linear Equations Homogeneous Systems Page 37/44
-
8/13/2019 1. SystemsofEquations Handout
38/44
Example (continued)
The columns 5X1 =
94
50
and 5X2 =
141
05
are also basic solutions
to the original homogeneous system.
In general, any nonzero multiple of a basic solution (to a homogeneoussystem of linear equations) is also a basic solution.
Systems of Linear Equations Homogeneous Systems Page 38/44
-
8/13/2019 1. SystemsofEquations Handout
39/44
Example
Find all values ofa for which the system
x + y = 0ay + z = 0
x + y + az = 0
has nontrivial solutions, and determine the solutions.Solution: Non trivial solutions occur when a= 0. Therefore the solutions
when a= 0 are given by
xy
z
=s
1
1
0
, s R.
Systems of Linear Equations Homogeneous Systems Page 39/44
Rank
-
8/13/2019 1. SystemsofEquations Handout
40/44
Definition
Therankof a matrix A, denoted rank A, is the number of leading 1s inany row-echelon matrix obtained from A by performing elementary rowoperations.
Example
Find the rank ofA= a b 5
1 2 1
.
Solution:
a b 51 2 1
1 2 1a b 5
1 2 10 b+ 2a 5 a
Ifb+ 2a= 0 and 5 a= 0, i.e., a= 5 and b=10, then rank A= 1.Otherwise, rank A= 2.
Systems of Linear Equations Rank Page 40/44
What does the rank of an augmented matrix tell us?
-
8/13/2019 1. SystemsofEquations Handout
41/44
SupposeA is the augmented matrix of a consistent system ofm linearequations in n variables, and rank A= r.
m
1 0 0 1 0 0 0 1 0 0 0 0 0
0 0 0 0 0
n
r leading 1s
Then the set of solutions to the system has n rparameters, so
ifr
-
8/13/2019 1. SystemsofEquations Handout
42/44
Thus for any system of linear equations, exactly one of the followingholds:
1 the system is inconsistent;
2 the system has a unique solution, i.e., exactly one solution;
3 the system has infinitely many solutions.
Systems of Linear Equations Rank Page 42/44
-
8/13/2019 1. SystemsofEquations Handout
43/44
( )
-
8/13/2019 1. SystemsofEquations Handout
44/44
Example (continued)
From the reduced row-echelon matrix
1 2 0 0 13 90 0 1 0 0 20 0 0 1 4 20 0 0 0 0 0
x1 = 9 + 2r+ 13sx2 = rx3 = 2x4 = 2 4s
x5 = s
r, s R
The solution has two parameters (r and s) as we expected.
Systems of Linear Equations Rank Page 44/44