Ch1 LinEquations

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 35

Linear Algebra

Chapter 1
Linear Equations in Linear
Algebra
1.1 Matrices and Systems of
Linear Equations
Definition
• An equation such as x+3y=9 is called a linear equation
(in two variables or unknowns).
• The graph of this equation is a straight line in the xy-plane.
• A pair of values of x and y that satisfy the equation is called
a solution.

Ch1_2
Definition
A linear equation in n variables x1, x2, x3, …, xn has the
form a1 x1 + a2 x2 + a3 x3 + … + an xn = b
where the coefficients a1, a2, a3, …, an and b are real
numbers.

Ch1_3
Solutions for system of linear equations

Figure 1.3
Figure 1.1 Figure 1.2 Many solution
Unique solution No solution 4x – 2y = 6
x + 3y = 9 –2x + y = 3 6x – 3y = 9
–2x + y = –4 –4x + 2y = 2 Both equations have the
Lines intersect at (3, 2) Lines are parallel. same graph. Any point on
Unique solution: No point of intersection. the graph is a solution.
x = 3, y = 2. No solutions. Many solutions.
Ch1_4
A linear equation in three variables corresponds to
a plane in three-dimensional space.
※ Systems of three linear equations in three variables:
Unique solution

Ch1_5
No solutions

Many solutions

Ch1_6
A solution to a system of a three linear equations will be
points that lie on all three planes.
The following is an example of a system of three linear
equations:
x1  x2  x3  2
2 x1  3 x2  x3  3
x1  x2  2 x3  6

How to solve a system of linear equations? For this we


introduce a method called Gauss-Jordan elimination.
(Section1.2)

Ch1_7
Definition
• A matrix is a rectangular array of numbers.
• The numbers in the array are called the elements of the
matrix.

Matrices

 7 1 3 5 6 
 2 3  4
A  B   0 5 C  0  2 5 
 7 5  1  8 3 8 9 12

Ch1_8
Row and Column  2 3  4
A 
 7 5  1

 2 3   4
2 3  4 7 5  1 7  5   1
     
row 1 row 2 column 1 column 2 column 3

Submatrix

1 7 4   1 7 7 
1 4
A  2 3 0  P  2 3 
Q   3  R 
5  2 
5 1  2  5 1 1 
matrix A submatrices of A

Ch1_9
Size and Type
 2 5 7 8 
 1 0 3  9 0 1   3
 2 4 4 3 8 5
 5    
  3 5 8  2
Size : 2  3 3  3 matrix 1 4 matrix 3  1 matrix
a square matrix a row matrix a column matrix
Location
 2 3  4 The element aij is in row i , column j
A  a13  4, a21  7
7 5  1 The element in location (1,3) is 4

Identity Matrices
diagonal size
1 0 0
I 2  1 0 I 3  0 1 0 
0 1
0 0 1
Ch1_10
Relations between system of linear equations and
matrices

matrix of coefficients and augmented matrix


x1  x2  x3  2
2 x1  3x2  x3  3
x1  x2  2 x3  6

1 1 1 1 1 1 2
2 3 1 2 3 
   1 3 
 1  1  2  1  1  2  6
matrix of coefficients augmented matrix

Ch1_11
Elementary Row Operations of Matrices

Elementary Transformation Elementary Row


Operation
1. Interchange two equations. 1. Interchange two rows of a
matrix.

2. Multiply both sides of an 2. Multiply the elements of a


equation by a nonzero row by a nonzero constant.
constant.
3. Add a multiple of the
3. Add a multiple of one elements of one row to the
equation to another equation. corresponding elements of
another row.

Ch1_12
Example 1
Solving the following system of linear equation.
x1  x2  x3  2
2 x1  3 x2  x3  3
x1  x2  2 x3  6  row equivalent
Solution
Equation Method Analogous Matrix Method
Initial system: Augmented matrix:
x1  x2  x3  2
Eq2+(–2)Eq1
2 x1  3x2  x3  3 1 1 1 2
2 3 1 3
Eq3+(–1)Eq1 x1  x2  2 x3  6  1  1  2  6

x1  x2  x3  2
 1 1 1 2
x2  x3  1 R2+(–2)R1 0 1  1  1
 2 x2  3 x3  8 R3+(–1)R1 0  2  3  8

Ch1_13
x1  x2  x3  2 1 1 1 2
Eq1+(–1)Eq2 x2  x3  1 0 1  1  1
Eq3+(2)Eq2  2 x2  3 x3  8 0  2  3  8

x1  2 x3  3  1 0 2 3
x2  x3  1 R1+(–1)R2 0 1  1  1
(–1/5)Eq3  5 x3  10 R3+(2)R2 0 0  5  10
x1  2 x3  3
Eq1+(–2)Eq3  1 0 2 3
x2  x3  1 0 1  1  1
Eq2+Eq3 x3  2 (–1/5)R3 0 0 1 2

x1  1  1 0 0  1
x2  1 0 1
R1+(–2)R3  1 0 
x3  2 R2+R3  2
The solution is 0 0 1 
x1  1, x2  1, x3  2. The solution is
x1  1, x2  1, x3  2.
Ch1_14
Example 2
Solving the following system of linear equation.
x1  2 x2  4 x3  12
2 x1  x2  5 x3  18
 x1  3 x2  3 x3  8
Solution
 1 2 4 12 
R2  (2)R1
1  2 4 12
 2 1 5 18 0 3  3  6
 1 3  3  8 R3  R1 0 1 1 4
  1  2 4 12  1 0 2 8
0 1  1  2 R1  (2)R2
1 0 1  1  2 
 R2 0 1 1 4 R3  (1)R2 0 0 2 6
 3

 1 0 2 8   1 0 0 2  x1  2
0 1  1  2 R1  (2)R3 0 1 0 1 
1 solution  x2  1.
 R3
  R2  R3  
0 0 1 3 x  3
2 0 0 1 3  3
Ch1_15
Example 3
Solve the system 4 x1  8 x2  12 x3  44
3 x1  6 x2  8 x3  32
 2 x1  x2  7
Solution
 4 8  12 44   1 2  3 11   1 2  3 11
 3 6  8 32  3 6  8 32 R2  (3)R1  
   1 R1    0 0 1  1
 2  1 0  7   4   2  1 0  7 R3  2 R1 0 3  6 15

  1 2  3 11   1 2  3 11 1 0 1 1
0 3  6 15 0 1  2    0 1  2 5
5
R2  R3    1 R2   R1  (2)R2  
0 0 1  1  3  0 0 1  1 0 0 1  1

 1 0 0 2
R1  (1)R3
0 1 0 3.
R2  2R3  The solution is x1  2, x2  3, x3  1.
0 0 1  1

Ch1_16
Summary
4 x1  8 x2  12 x3  44  4 8  12 44
3 x1  6 x2  8 x3  32 [ A : B ]   3 6  8 32
 2 x1  x2  7  2  1 0  7

Use row operations to [A: B] : A B


 4 8  12 44 1 0 0 2
 3 6  8 32    0 1 0 3. i.e., [ A : B ]    [ I n : X]
  
 2  1 0  7  0 0 1  1

Def. [In : X] is called the reduced echelon form of [A : B].

Note. 1. If A is the matrix of coefficients of a system of n equations


in n variables that has a unique solution,
then A is row equivalent to In (A  In).
2. If A  In, then the system has unique solution. Ch1_17
Example 4 Many Systems
Solving the following three systems of linear equation, all of
which have the same matrix of coefficients.
x1  x2  3 x3  b1  b1   8 0  3
2 x1  x2  4 x3  b2 for b2    11,  1,  3 in turn
b   11 2  4
 x1  2 x2  4 x3  b3  3      
Solution
 1 1 3 8 0 3   1 1 3 8 0 3
 2 1 4 11 1 3 R2+(–2)R1 0 1  2  5 1  3
 1 2  4  11 2  4 R3+R1 0 1  1  3 2  1
1 0 1 3 1 0
     1 0 0 1 0  2
0 1  2  5 1  3 R1 ( 1) R3 
R1 R2
  0 1 0 1 3 1
R3 ( 1)R2 R2  2 R3  
0 0 1 2 1 2 0 0 1
  2 1 2
 x1  1  x1  0  x1  2
The solutions to   
x   1, x  3,  x2  1 .
the three systems are  2  2
x  2 x  1 x  2 Ch1_18
 3  3  3
Homework

Exercises will be given by the teachers of


the practical classes.

Ch1_19
1.2 Gauss-Jordan Elimination
Definition
A matrix is in reduced echelon form if
1. Any rows consisting entirely of zeros are grouped at the
bottom of the matrix.
2. The first nonzero element of each other row is 1. This
element is called a leading 1.
3. The leading 1 of each row after the first is positioned to
the right of the leading 1 of the previous row.
4. All other elements in a column that contains a leading 1
are zero.

Ch1_20
Examples for reduced echelon form
1 0 8 1 2 0 4 1 0 0 7 1 2 0 3 0
0 1 2  0 0 0 0  0 1 0 3  0 0 3 4 0 
       
0 0 0 0 0 1 3 0 0 1 9 0 0 0 0 1
() () () ()

elementary row operations , reduced echelon


form
The reduced echelon form of a matrix is unique.

Ch1_21
Gauss-Jordan Elimination

System of linear equations


 augmented matrix
 reduced echelon form
 solution

Ch1_22
Example 1
Use the method of Gauss-Jordan elimination to find reduced
echelon form of the following matrix.
0 0 2  2 2
3 3  3 9 12
4 4  2 11 12
Solution pivot (leading 1)
3 3 3 9 12   1 1  1
 3 4

2  1  R1 0 0 2  2 2
 
0 0 2 2
 
R1 R2 
4 4  2 11 12  3 4 4  2 11 12
  
1 1 1 3 4  1 1 1 3 4
    
0 0 2 2  1 
2  R2 0 0 1 1 1
R3  (4)R1    2   
0 0 2 1  4 0 0 2  1  4
pivot
 1 1 0 2 5   1 1 0 0 17 
R1  R2 0 0 1  1 1 R1  (2)R3 0 0 1 0  5
R3  (2)R2 0 0 0 1  6 R2  R3 0 0 0 1  6
The matrix is the reduced echelon form of the given matrix. Ch1_23
Example 2
Solve, if possible, the system of equations
3 x1  3 x2  3 x3  9
2 x1  x2  4 x3  7
3 x1  5 x2  x3  7
Solution
 3  3 3 9   1  1 1 3   1  1 1 3
2  1 4 7  1 R1 2  1 4 7  R2( 2)R1 0 1 2 1
 3  5  1 7  3  3  5  1 7  R3( 3)R1 0  2  4  2

 1 0 3 4 x1  3 x3  4 x1  3x3  4
 0 1 2 1  
R1 R2
  x2  2 x3  1 x2  2 x3  1
 0 0 0 0 

The general solution to the system is


R3 2R2

x1  3r  4
x2  2r  1
x3  r , where r is real number (called a parameter).
Ch1_24
Example 3
Solve the system of equations
2 x1  4 x2  12 x3  10 x4  58  many
 x1  2 x2  3 x3  2 x4  14 sol.

Solution
2 x1  4 x2  9 x3  6 x4  44
 2  4 12  10 58   1  2 6 5 29
 1 2 3 2  14 1 R1  1
  2 3 2  14
 2  4 9 6 44 2  2  4 9 6 44
 1  2 6 5 29   1  2 6 5 29
R2 R1 0 0 3 3 15 1 R2 0 0 1 1 5
R3( 2)R1 0 0 3  
4  14 3 0 0 3 4  14
 1  2 0 1  1   1  2 0 0  2
R1 ( 6)R2 0 0 1  1 5 R1( 1)R3 0 0 1 0 6
R33R2  0 0 0 1 1 R2R3 0 0 0 1 1
 x1  2r  2
x1  2 x2  2 
 x2 r
 x3  6   , for some r.
 x3 6
x4  1  Ch1_25
 x4 1
Example 4
Solve the system of equations
x1  2 x2  x3  3 x4  x5  2
2 x1  4 x2  2 x3  6 x4  3 x5  6
 x1  2 x2  x3  x4  3 x5  4
Solution
 1 2  1 3 1 2   1 2  1 3 1 2
 2 4  2 6 3 6 R2( 2)R1 0 0 0 0 1 2
 1  2 1  1 3 4 R3R1 0 0 0 2 4 6
 1 2  1 3 1 2   1 2  1 3 1 2
 0 0 0 2 4 6
R2 R3
  1 R 2 0 0 0 1 2 3
0 0 0 0 1 2 2 0 0 0 0 1 2
1 2  1 0  5  7   1 2  1 0 0 3
 0 0 0 1 2 3 R15R3 0 0 0 1 0  1
R1( 3)R2

0 0 0 0 1 2 R2( 2)R3 0 0 0 0 1 2
x1  2 x2  x3  3 x1  2r  s  3
 x4  1  x2  r , x3  s, x4  1, , for some r and s.
x5  2 x5  2
Ch1_26
Example 5
This example illustrates a system that has no solution. Let us try
to solve the system x1  x2  2 x3  3
2 x1  2 x2  5 x3  4
x1  2 x2  x3  3
Solution 2 x2  2 x3  1
1 1 2 3   1  1 2 3  1  1 2 3
2  2 5 4 0 0 1  2   0 3  3  6
R2 ( 2)R1 
1 2 1  3
R3 ( 1)R1 
0 3  3  6  R2 R3 0 0 1  2
0 2 2 1 0 2 2 1 0 2 2 1
1 0 0 3
1 1 2 3   1 0 1 1   

 0 1  1  2  0 1  1  2 R1  (1)R3   0 1 0  4 

13 R2 0 0 1  2
R1 R2
R4 ( 2)R2  0 0 1  2  R2  R3 

R4  ( 4)R3 
0 0 1  2



0 2 2 1  0 0 4 5 0 0 0 13

1 0 0 3
 0 1 0  4 0x1+0x2+0x3=1
131 R4 0 0 1  2
The system has no solution.
0 0 0 1
Ch1_27
Homogeneous System of linear Equations

Definition
A system of linear equations is said to be homogeneous if all
the constant terms are zeros.

Example:  x1  2 x2  5 x3  0

 2 x1  3 x2  6 x3  0
Observe that x1  0, x2  0, x3  0 is a solution.
Theorem 1.1
A system of homogeneous linear equations in n variables always
has the solution x1 = 0, x2 = 0. …, xn = 0. This solution is called
the trivial solution.
Ch1_28
Homogeneous System of linear Equations
Note. Non trivial solution
Example:  x1  2 x2  5 x3  0

 2 x1  3x2  6 x3  0
The system has other nontrivial solutions.
1 2  5 0 1 0 3 0
  2  3 6 0     0 1  4 0 
   
 x1  3r , x2  4r , x3  r

Theorem 1.2
A system of homogeneous linear equations that has more
variables than equations has many solutions.

Ch1_29
Homework

Exercise will be given by the teachers of the


practical classes.

Ch1_30
1.3 Gaussian Elimination
Definition
A matrix is in echelon form if
1. Any rows consisting entirely of zeros are
grouped at the bottom of the matrix.
2. The first nonzero element of each row is 1. This
element is called a leading 1.
3. The leading 1 of each row after the first is
positioned to the right of the leading 1 of the
previous row.
(This implies that all the elements below a leading 1
are zero.)
Ch1_31
Example 6
Solving the following system of linear equations using the
method of Gaussian elimination.
x1  2 x2  3 x3  2 x4  1
 x1  2 x2  2 x3  x4  2
Solution 2 x1  4 x2  8 x3  12 x4  4
Starting with the augmented matrix, create zeros below the pivot
in the first column.
 1 2 3 2  1   1 2 3 2  1
 1  2  2 1 2 R 2  R1 0 0 1 3 1
 2 4 8 12 4 R3  (2) R1 0 0 2 8 6

At this stage, we create a zero only below the pivot.
  1 2 3 2  1   1 2 3 2  1
0 0 1 3 1 1 0 0 1 3 1
R3  (2) R 2   R3  
0 0 0 2 4  2
0 0 0 1 2 
We have arrived at the echelon form. Echelon form
Ch1_32
The corresponding system of equation is
x1  2 x2  3x3  2 x4  1
x3  3 x4  1
x4  2
We get x3  3(2)  1
x3  5
Substituting x4 = 2 and x3 = 5 into the first equation,
x1  2 x2  3(5)  2(2)  1
x1  2 x2  10
x1  2 x2  10
Let x2 = r. The system has many solutions. The solutions are
x1  2r  10, x2  r , x3  5, x4  2

Ch1_33
Example 7
Solving the following system of linear equations using the
method of Gaussian elimination, performing back substitution
using matrices. x1  2 x2  3 x3  2 x4  1
 x1  2 x2  2 x3  x4  2
Solution 2 x1  4 x2  8 x3  12 x4  4
We arrive at the echelon form as in the previous example.
 1 2 3 2  1  1 2 3 2  1
  1  2  2 1 2    0 0 1 3 1
 2 4 8 12 4 0 0 0 1 2
  
Echelon form
This marks the end of the forward elimination of variables from
equations. We now commence the back substitution using
matrices.

Ch1_34
 1 2 3 2  1   1 2 3 0  5
0 0 1 3 1 R1  (2) R 3  0 0 1 0  5
0 0 0 1 2  R 2  (3) R3 0 0 0 1 2
  
  1 2 0 0 10
R1  (3) R 2 0 0 1 0  5
0 0 0 1 2

This matrix is the reduced echelon form of the original
augmented matrix. The corresponding system of equations is
x1  2 x2  10
x3  5
x4  2
Let x2 = r. We get same solution as previously,
x1  2r  10, x2  r , x3  5, x4  2

Ch1_35

You might also like