Systems of Linear Equations

Download Report

Transcript Systems of Linear Equations

Systems of linear equations
Simple system
Solve
x1  x2  7
2 x1  3x2  6
Solution
x1  3, x2  4
Not so simple system
Solve
x1  3x2  2 x3  2 x5  0
2 x1  6 x2  5 x3  2 x 4 4 x5  3x6  1
5 x3  10 x 4 15 x6  5
2 x1  6 x2  8 x 4 4 x5  18 x6  6
Solution
x1  ?, x2  ?, x3  ?, x4  ?, x5  ?, x6  ?
Linear equations
A line in the xy-plane can be represented algebraically by an equation
of the form
a1 x  a2 y  b
An equation of this kind is called a linear equation in the variables x and y.
Generally, we define a linear equation in the n variables x1 , x2 ,
, xn to
be one that can be expressed in the form
a1 x1  a2 x2   an xn  b
where a1 , a2 ,
, an , b  .
The variables in a linear equation are called the unknowns.
Examples
Linear
Not linear
x  3y  7
x  3y2  7
x1  2 x2  3x3  x4  7
3 x  2  z  xz  4
y  12 x  3z  1
y  sin x  0
x1  x2 
 xn  1
x1  2 x2  x3  1
Example
The solution set of 4 x  2 y  1 is
x  t,
y  2t  12
The solution set of 4 x  2 y  1 is
x  12 t  14 ,
y t
The solution set of x1  4 x2  7 x3  5 is
x1  5  4s  7t , x2  s, x3  t
The solution set of x1  4 x2  7 x3  5 is
x1  s, x2  t , x3  75  71 s  74 t
Linear systems
A finite set of linear equations in the variables x1 , x2 ,
, xn is called
a system of linear equations or a linear system.
A sequence of numbers s1 , s2 ,
system if x1  s1 , x2  s2 ,
, sn is called a solution of the
, xn  sn is a solution of every equation
in the system.
For example, the system
4 x1  x2  3x3  1
3x1  x2  9 x3  4
has the solution x1  1, x2  2, x3  1 since these values satisfy both equations.
However, x1  1, x2  8, x3  1 is not a solution since it satisfies only the
first equation.
Consistency
If we multiply the second equation of the system
x y 4
2x  2 y  6
by 12 , it is obvious there are no solutions since the equivalent system
x y 4
x y 3
has contradictory equations.
A system of equations that has no solution is said to be inconsistent;
if there is at least one solution of the system, it is said to be consistent.
Solution possibilities for two lines
Consider the solutions to the general system of two linear equations
in the two unknowns x and y:
a1 x  b1 y  c1
a2 x  b2 y  c2
(a1 , b1 not both zero)
(a2 , b2 not both zero)
The graphs of these equations are lines; call them l1 and l2 .
Then the solutions of the system correspond to the intersections
of the lines.
A ‘deep’ statement
Every system of linear equations has either
no solutions, exactly one solution, or
infinitely many solutions.
Augmented matrices
An arbitrary system of m linear equations in n unknowns
can be written as
a11 x1  a12 x2 
 a1n xn  b1
a21 x1  a22 x2 
 a2 n xn  b2
am1 x1  am 2 x2 
 amn xn  bm
Keeping mental track of the  's, the x's and the  's,
we can write the system as a rectangular array of numbers:
 a11
a
 21


 am1
a12
a22
a1n
a2 n
am 2
amn
b1 
b2 


bm 
This is called the augmented matrix for the system.
Example
The augmented matrix for the system
x1  x2  2 x3  9
2 x1  4 x2  3 x3  1
3x1  6 x2  5 x3  0
is
1 1 2 9 
 2 4 3 1 


 3 6 5 0 
Do handout Q1-Q8
Solving a system
The main idea here is to replace the given system by a
new system that has the same solution set but which is
easier to solve.
We apply the following three types of operations to eliminate
unknowns systematically:
1. Multiply an equation by a non-zero constant.
2. Interchange two equations.
3. Add a multiple of one equation to another.
These operations correspond to the following elementary
row operations on the augmented matrix:
1. Multiply a row by a non-zero constant.
2. Interchange two rows.
3. Add a multiple of one row to another row.
An example
An example
An example
The (unique) solution is x  1, y  2 and z  3.
Echelon form
In the last example the linear system was solved by reducing the
augmented matrix to
1 0 0 1 
0 1 0 2 


0 0 1 3 
We wish to reduce our matrices to those with the following properties:
1. If a row does not consist entirely of zeros, then the first nonzero
number in the row is a 1. (This is called a leading 1.)
2. If there are any rows that consist entirely of zeros, then they are
grouped together at the bottom of the matrix.
3. In any two successive rows that do not consist entirely of zeros,
the leading 1 in the lower rows occurs farther to the right than the
leading row in the higher row.
4. Each column with a leading 1 has zeros everywhere else.
Echelon form
Echelon matrices
1. If a row does not consist entirely of zeros, then the first nonzero
number in the row is a 1. (This is called a leading 1.)
2. If there are any rows that consist entirely of zeros, then they are
grouped together at the bottom of the matrix.
3. In any two successive rows that do not consist entirely of zeros,
the leading 1 in the lower rows occurs farther to the right than the
leading row in the higher row.
4. Each column with a leading 1 has zeros everywhere else.
A matrix having properties 1, 2 and 3 (but not necessarily 4) is said
to be in row-echelon form.
A matrix having properties 1, 2, 3 and 4 is said to be in
reduced row-echelon form.
Reduced versus non-reduced
The following matrices are in reduced row-echelon form:
0
1 0 0 4  1 0 0  
0 1 0 7  , 0 1 0  , 0

 
 0
0 0 1 1 0 0 1  
0
1 2 0 1 
0 0 1 3 0 0 
, 
0 0 0 0  0 0 

0 0 0 0
The following matrices are in row-echelon form but not
reduced row-echelon form:
1 4 3 7 
0 1 6 2 ,


0 0 1 5 
1 1 0 
0 1 0  ,


0 0 0 
1 1 2 6 0 
0 0 1 1 0 


0 0 0 0 1 
From echelon form to solution
(Example 1: unique solution)
In the last example the row-reduced matrix was:
1 0 0 1 
0 1 0 2 


0 0 1 3 
Here inspection provides the unique solution:
x1  1, x2  2, x3  3
From echelon form to solution
(Example 2: infinite solutions)
Consider the row-reduced matrix:
1
0

0

0
6 0 0 4 2 
0 1 0 3 1 
0 0 1 5 2

0 0 0 0 0
Since x1 , x3 and x4 correspond to leading 1's in the augmented matrix,
we call them leading variables. The nonleading variables (in this case
x2 and x5 ) are called free variables.
Solving for the leading variables in terms of the free variables we obtain:
x1  2  6 x2  4 x5 , x3  1  3x5 , x4  2  5 x5
Finally, we set the free variables x2  s and x5  t to obtain a
parameterisation for the infinite solutions:
x1  2  6s  4t , x2  s, x3  1  3t , x4  2  5t , x5  t
From echelon form to solution
(Example 3: no solutions)
Consider the row-reduced matrix
1 0 0 0 
0 1 2 0 


0 0 0 1 
The last equation in the corresponding system of
equations is
0 x1  0 x2  0 x3  1
which cannot be satisfied, so there is no solution to
the system.
Gaussian elimination: an example
Gaussian elimination: an example
The matrix is now in
row-echelon form!
Gaussian elimination: an example
The matrix is now in reduced row-echelon form!
The above procedure for reducing a matrix to reduced
row-echelon form is called Gauss-Jordan elimination.
If we use only the first five steps, the procedure produces
a row-echelon form and is called Gaussian elimination.
Not so simple system
x1  3x2  2 x3
 2 x5
0
2 x1  6 x2  5 x3  2 x 4  4 x5  3x6  1
5 x3  10 x 4
2 x1  6 x2
1
2

0

2
1
0

0

0
1
0

0

0
3 2 0
6 5 2
0 5 10
6 0 8
3 2
0 1
0 0
0 0
3
0
0
0
0
1
0
0
2 0 0
4 3 1
0 15 5 

4 18 6 
0
2
0
0
2
0
0
0
0 0
3 1 
1 13 

0 0
4
2
0
0
2
0
0
0
0 0
0 0 
1 13 

0 0
 15 x6  5
 8 x 4  4 x5  18 x6  6
Augmented matrix
Solution
x1  3r  4 s  2t
Row-echelon form
x2  r
x3  2 s
x4  s
x5  t
x6  13
Reduced row-echelon
form
Back-substitution
x1  3x2  2 x3
 2 x5
0
2 x1  6 x2  5 x3  2 x 4  4 x5  3x6  1
5 x3  10 x 4
2 x1  6 x2
1
0

0

0
3 2
0 1
0 0
0 0
0
2
0
0
2
0
0
0
0 0
3 1 
1 13 

0 0
 15 x6  5
 8 x 4  4 x5  18 x6  6
Row-echelon form
Substituting x6  13
Solving for the lead variables: into second equation:
x1  3x2  2 x3  2 x5
x1  3x2  2 x3  2 x5
x3  1  2 x4  3x6
x3  2 x4
x6  13
x6  13
Substituting x3  2 x4
into first equation:
x1  3 x2  4 x4  2 x5
x3  2 x4
x6  13
This is the same solution!!
x1  3r  4s  2t , x2  r , x3  2s, x4  s, x5  t , x6  13
Homogeneous linear systems
A linear system is said to be homogeneous if it has the following form :
a11 x1  a12 x2   a1n xn  0
a21 x1  a22 x2 
 a2 n xn  0
am1 x1  am 2 x2 
 amn xn  0
Every homogeneous linear system is consistent, since all such
systems have
x1  0, x2  0, , xn  0
as a solution.
This solution is called the trivial solution; if there are other solutions,
they are called nontrivial solutions.
So a homogenous system either has only the trivial solution, or infinitely
many solutions in addition to the trivial solution. All such systems are
consistent.
Homogeneous linear systems
Consider the solutions to the homogeneous system of two linear
equations in the two unknowns x and y:
a1 x  b1 y  0
(a1 , b1 not both zero)
a2 x  b2 y  0
(a2 , b2 not both zero)
Do Handout Q1-Q26
Theorem: A homogeneous system of linear equations with more
unknowns than equations has infinitely many solutions.
Note: A consistent nonhomogeneous system with more unknowns
than equations also has infinitely many solutions.