Upload
jonah-bailey
View
221
Download
5
Embed Size (px)
Citation preview
Chapter 1
Systems of Linear Equations
1.1 Introduction to Systems of Linear Equations
1.2 Gaussian Elimination and Gauss-Jordan Elimination
1.3 Applications of Systems of Linear Equations
1.1
※ The linear algebra arises from solving systems of linear equations
※ The last section of each chapter illustrates how to apply the knowledge you learn in that chapter to solving problems in different fields
1.2
1.1 Introduction to Systems of Linear Equations
A linear equation ( 線性方程式 ) in n variables:
ai : real-number coefficients
xi : variables needed to be solved
b : real-number constant term
a1: leading coefficient ( 領先係數 )
x1: leading variable ( 領先變數 ) Notes:
(1) Linear equations have no products or roots of variables and
no variables involved in trigonometric, exponential, or
logarithmic functions
(2) Variables appear only to the first power
1 1 2 2 3 3 n na x a x a x a x b
1 1(h) 4
x y
1.3
Ex 1: Linear or Nonlinear
(a) 3 2 7x y 1
(b) 22
x y z
1 2 3 4(c) 2 10 0x x x x 21 2(d) (sin ) 4x x e
(e) 2xy z (f) 2 4xe y
1 2 3(g) sin 2 3 0x x x
product of variables
is the exponentx
trigonometric function
Linear
Linear Linear
Linear
Nonlinear
Nonlinear
Nonlinear
Nonlinear
not the first power
1.4
A solution ( 解 ) of a linear equation in n variables:
Solution set ( 解集合 ):
the set of all solutions of a linear equation
1 1 2 2 3 3 n na x a x a x a x b
,11 sx ,22 sx ,33 sx , nn sx
bsasasasa nn 332211s.t.
※ In most cases, the number of solutions of a linear equation is infinite, so we need some methods to represent the solution set
1.5
※ If you choose x1 to be the free variable, the parametric representation of the solution set is
Ex 2: Parametric representation ( 參數化表示 ) of a solution set
42 21 xx
※ If you solve for x1 in terms of x2, you obtain
By letting (the variable t is called a parameter), you can
represent the solution set as
The set representation for solutions: Rttt |) ,24(
1 2 24 2 (in this form, the variable is free)x x x tx 2
1 24 2 , , is any real numberx t x t t
Rsss |)2 ,( 21
with a solution (2, 1), i.e., 1,2 21 xx
1.6
A system of m linear equations in n variables:
11 1 12 2 13 3 1 1
21 1 22 2 23 3 2 2
31 1 32 2 33 3 3 3
1 1 2 2 3 3
n n
n n
n n
m m m mn n m
a x a x a x a x b
a x a x a x a x b
a x a x a x a x b
a x a x a x a x b
A solution of a system of linear equations ( 線性方程式系統 ) is a sequence of numbers s1, s2,…,sn that can solve each linear equation in the system
1.7
Notes:
Every system of linear equations has either
(1) exactly one solution
(2) infinitely many solutions
(3) no solution
Consistent ( 一致性 ( 有解 )):
A system of linear equations has at least one solution (for cases (1) and (2))
Inconsistent ( 非一致性 ( 無解、矛盾 )):
A system of linear equations has no solution (for case (3))
1.8
Ex 4: Solution of a system of linear equations in 2 variables
(1)
(2)
(3)
13
yxyx
6223
yxyx
13
yxyx
exactly one solution
inifinitely many solution
no solution
two intersecting lines
two coincident lines
lines parallel two
1.9
Ex 5: Using back substitution to solve a system in row-echelon form (列梯形形式 )
2 5 (1)
2 (2)
x y
y
Sol: By substituting into Eq. (1), you obtain2y
2( 2) 5 1 x x
The system has exactly one solution: 2 ,1 yx
※ The row-echelon form means that it follows a stair-step pattern (two variables are in Eq. (1) and the first variable x is the leading variable, and one variable is in Eq. (2) and the second variable y is the leading variable) and has leading coefficients of 1 for all equations ※ The back substitution means to solve a system in reverse order. That is, you solve Eq. (2) for y first, and then substitute the solution of y into Eq. (1). Next, you can solve x directly in Eq. (1) since x is the only unknown variable
1.10
Ex 6: Using back substitution to solve a system in row-echelon form
2 3 9 (1)
3 5 (2)
2 (3)
x y z
y z
z
Sol: Substitute into (2), y can be solved as follows 2z
15)2(3
yy
and substitute and into (1)1y 2z
19)2(3)1(2
xx
The system has exactly one solution:
2 ,1 ,1 zyx
1.11
Equivalent ( 等價 ):
Two systems of linear equations are called equivalent
if they have precisely the same solution set
Notes:
Each of the following operations ( 運算 ) on a system of linear
equations produces an equivalent system O1: Interchange two equations
O2: Multiply an equation by a nonzero constant
O3: Add a multiple of an equation to another equation
Gaussian elimination:
A procedure to rewrite a system of linear equations to be in row-echelon form by using the above three operations
1.12
Ex 7: Solve a system of linear equations (consistent system)2 3 9 (1)
3 4 (2)
2 5 5 17 (3)
x y z
x y
x y z
Sol: First, eliminate the x-terms in Eqs. (2) and (3) based
on Eq. (1)
(1) (2) (2) (by O3)
2 3 9
3 5 (4)
2 5 5 17
x y z
y z
x y z
(1) ( 2) (3) (3) (by O3)
2 3 9
3 5
1 (5)
x y z
y z
y z
1.13
Since the system of linear equations is expressed in its row-
echelon form, the solution can be derived by the back
substitution: (only one solution)2 ,1 ,1 zyx
(4) (5) (5) (by O3)
2 3 9
3 5
2 4 (6)
x y z
y z
z
12(6) (6) (by O2)
2 3 9
3 5
2
x y z
y z
z
Second, eliminate the (-y)-term in Eq. (5) based on Eq. (4)
1.14
Ex 8: Solve a system of linear equations (inconsistent system)
(3)(2)(1)
13222213
321
321
321
xxxxxxxxx
Sol:
1 2 3
2 3
2 3
(1) ( 2) (2) (2) (by O3)
(1) ( 1) (3) (3) (by O3)
3 1
5 4 0 (4)
5 4 2 (5)
x x x
x x
x x
1.15
1 2 3
2 3
(4) ( 1) (5) (5) (by O3)
3 1
5 4 0
0 2
x x x
x x
So, the system has no solution (an inconsistent system)
(a false statement)
1.16
Ex 9: Solve a system of linear equations (infinitely many solutions)
2 3
1 3
1 2
0 (1)
3 1 (2)
3 1 (3)
x x
x x
x x
Sol:
1 3
2 3
1 2
(1) (2) (by O1)
3 1 (1)
0 (2)
3 1 (3)
x x
x x
x x
1 3
2 3
2 3
(1) (3) (3) (by O3)
3 1
0
3 3 0 (4)
x x
x x
x x
Let , then
1.17
1 3
2 3
3 1
0
x x
x x
1
2
3
3 1
x t
x t t R
x t
tx 3
,32 xx 31 31 xx
This system has infinitely many solutions.
Since Equation (4) is the same as Equation (2), it is not necessary and can be omitted
1.18
Keywords in Section 1.1:
linear equation: 線性方程式 system of linear equations: 線性方程式系統 leading coefficient: 領先係數 leading variable: 領先變數 solution: 解 solution set: 解集合 free variable: 自由變數 parametric representation: 參數化表示 consistent: 一致性 ( 有解 ) inconsistent: 非一致性 ( 無解、矛盾 ) row-echelon form: 列梯形形式 equivalent: 等價
1.19
(4) For a square matrix ( 方陣 ), the entries a11, a22, …, ann are
called the main (or principal) diagonal ( 主對角線 ) entries
1.2 Gaussian Elimination and Gauss-Jordan Elimination
mn matrix ( 矩陣 ):
mnmmm
n
n
n
aaaa
aaaaaaaaaaaa
321
3333231
2232221
1131211
rows ( )m 列
columns ( )n 行
(3) If , then the matrix is called square matrix of order nnm
Notes:
(1) Every entry ( 元素 ) aij in the matrix is a real number(2) A matrix with m rows and n columns is said to be with size mn
1.20
Ex 1: Matrix Size
]2[
0000
21
031
4722
e
11
22
41
23
Note:
One very common use of matrices is to represent a system of linear equations (see the next slide)
※ A scalar (any real number) can be treated as a 11 matrix.
1.21
A system of m equations in n variables:
11 1 12 2 13 3 1 1
21 1 22 2 23 3 2 2
31 1 32 2 33 3 3 3
1 1 2 2 3 3
n n
n n
n n
m m m mn n m
a x a x a x a x b
a x a x a x a x b
a x a x a x a x b
a x a x a x a x b
mnmmm
n
n
n
aaaa
aaaaaaaaaaaa
A
321
3333231
2232221
1131211 1
2
m
b
b
b
b
1
2
n
x
x
x
x
A x bMatrix form:
1.22
Augmented matrix ( 增廣矩陣 ): formed by appending the constant-term vector to the right of the coefficient matrix of a system of linear equations
11 12 13 1 1
21 22 23 2 2
31 32 33 3 3
1 2 3
[ ]
n
n
n
m m m mn m
a a a a b
a a a a b
a a a a b A
a a a a b
b
11 12 13 1
21 22 23 2
31 32 33 3
1 2 3
n
n
n
m m m mn
a a a a
a a a a
a a a a A
a a a a
Coefficient matrix ( 係數矩陣 ):
1.23
Elementary row operations ( 基本列運算 ):
Row equivalent ( 列等價 ):Two matrices are said to be row equivalent if one can be obtained
from the other by a finite sequence of above elementary row
operations
(1) Interchange two rows:( ) ( )ki i iM k R R (2) Multiply a row by a nonzero constant:
( ), ( )k
i j i j jA k R R R (3) Add a multiple of a row to another row:
,i j i jI R R
Before introducing the Gaussian elimination and the Gauss-Jordan elimination, we need some background knowledge, including the elementary row operations and the rules to identify the row-echelon or reduced row-echelon forms for matrices
1.24
Ex 2: Elementary row operations
143243103021
143230214310
212503311321
212503312642
8133012303421
251212303421
1,2I
1( )2
1M
( 2)1,3A
1.25
Row-echelon form ( 列梯形形式 ): (1), (2), and (3)
(1) All rows consisting entirely of zeros occur at the bottom of the matrix ( 若有全部為 0 之 row ,會出現在 matrix 的最下方 )
(2) For each row that does not consist entirely of zeros, the first nonzero entry from the left side is 1, which is called as leading 1 ( 對不全為 0 之 row ,從左到右,第一個出現非0 的 entry ,其值為 1 ,且此 entry 稱為 leading 1)
(3) For two successive nonzero rows, the leading 1 in the higher row is further to the left than the leading 1 in the lower row ( 越上方的 row 中的 leading 1 ,會在越左邊 )
(4) Every column that contains a leading 1 has zeros everywhere else ( 每個有 leading 1 的 column 中,其它的 entry 均為0)
Reduced row-echelon form ( 簡化列梯形形式 ): (1), (2), (3), and (4)
1.26
(reduced row-
echelon form)(row-echelon
form)
Ex 4: Row-echelon form or reduced row-echelon form
210030104121
10000410002310031251
000031005010
0000310020101001
310011204321
421000002121
(row-echelon
form)
(reduced row-
echelon form)
Violate the second criterion
Violate the first criterion
1.27
Gaussian elimination:
The procedure for reducing a matrix to a row-echelon form by performing the three elementary row operations
Gauss-Jordan elimination:
The procedure for reducing a matrix to its reduced row-echelon form by performing the three elementary row operations
Notes:
(1) Every matrix has an unique reduced row-echelon
form(2) A row-echelon form of a given matrix is not unique
(Different sequences of elementary row operations can
produce different row-echelon forms)
※ The above two statements will be verified numerically in Ex. 8
1.28
The first nonzerocolumn
Produce leading 1
Nonzero entries below leading 1
Leading 1
Produce leading 1
The first nonzero column
Ex: Procedure of the Gaussian elimination and Gauss-Jordan elimination
1565422812610421270200
1565421270200281261042
1,2I
15654212702001463521
12
( )1M ( 2)
1,3A
Submatrix
2917050012702001463521
1.29
Nonzero entries below leading 1
Non-zeros
Produceleading 1
Leading 11 2 5 3 6 14
0 0 1 0 7 2 6
0 0 5 0 17 29
12
( )2M ( 5)
2,3A
(2)3M
210000100100703021( 6)
3,1A 72
( )3,2A (5)
2,1A
Submatrix
(row-echelon form)(reduced row-
echelon form)
Leading 1
1 2 5 3 6 14
0 0 1 0 7 2 6
0 0 0 0 1 2
1 2 5 3 6 14
0 0 1 0 7 2 6
0 0 0 0 1 2 1
The first nonzero column
1.30
Ex 7: Solve a system by the Gauss-Jordan elimination method (only one solution)
1755243932
zyxyx
zyx
Sol:Form the augmented matrix by concatenating and A b
1 2 3 9
1 3 0 4
2 5 5 17
1 2 3 9
0 1 3 5
0 1 1 1
(1) ( 2)1,2 1,3 A A 1 2 3 9
0 1 3 5
0 0 1 2
(1) (1/ 2)2,3 3 A M
1 0 0 1
0 1 0 1
0 0 1 2
( 3) ( 3) (2)3,2 3,1 2,1 A A A
211
zy
x(row-echelon form)
(reduced row-echelon form)
1.31
Ex 8 : Solve a system by the Gauss-Jordan elimination method (infinitely many solutions)
1 2 3
1 2
2 4 2 0
3 5 1
x x x
x x
Sol:
1( ) ( 3)21,21
( 2)( 1)2,12
2 4 2 0 1 2 1 0 1 2 1 0
3 5 0 1 3 5 0 1 0 1 3 1
1 2 1 0 1 0 5 2
0 1 3 1 0 1 3 1
AM
AM
For the augmented matrix,
(reduced row-echelon form)(row-echelon form)
1.32
Then the system of linear equations becomes
1 3
2 3
5 2
3 1
x x
x x
32
31
3152
xxxx
It can be further reduced to
Let , thentx 3
,
,31
,52
3
2
1
tx
Rttx
tx
So, this system has infinitely many solutions
1.33
※ In order to show that the reduced row-echelon form is unique, I conduct an experiment by performing a redundant elementary row operation of interchanging the first and second rows in advance
(1/ 3)1,2 1
( 2) (3 / 2)1,2 2
( 5 / 3)2,1
2 4 2 0 3 5 0 1 1 5 / 3 0 1/ 3
3 5 0 1 2 4 2 0 2 4 2 0
1 5 / 3 0 1/ 3 1 5 / 3 0 1/ 3
0 2 / 3 2 2 / 3 0 1 3 1
1 0 5 2
0 1 3 1
I M
A M
A
(reduced row-echelon form)
(row-echelon form)
※ Comparing with the results on Slide 1.31, we can infer that it is possible to derive different row-echelon forms, but there is a unique reduced row-echelon form for each matrix
1.34
Homogeneous systems of linear equations ( 齊次線性系統 ) :A system of linear equations is said to be homogeneous
if all the constant terms are zero
0
0 0 0
332211
3333232131
2323222121
1313212111
nmnmmm
nn
nn
nn
xaxaxaxa
xaxaxaxaxaxaxaxaxaxaxaxa
1.35
Trivial (obvious) solution ( 顯然解 ):
Nontrivial solution ( 非顯然解 ):
other solutions
0321 nxxxx
Theorem 1.1
(1) Every homogeneous system of linear equations is consistent. Furthermore, for a homogeneous system, exactly one of the following is true:
(a) The system has only the trivial solution
(b) The system has infinitely many nontrivial solutions in addition to the trivial solution (In other words, if a system has any nontrivial solution, this system must have infinitely many nontrivial solutions)
(2) If the homogenous system has fewer equations than variables,
then it must have an infinite number of solutions
1.36
Ex 9: Solve the following homogeneous system (Verify also the two statements in Theorem 1.1 numerically)
1 2 3
1 2 3
3 0
2 3 0
x x x
x x x
01100201
13( )( 2) (1)
1,2 2 2,1 A M A
Let , thentx 3 Rttxtxtx , , ,2 321
Sol:
03120311
For the augmented matrix,
(reduced row-
echelon form)
1 3
2 3
2 0
0
x x
x x
1 2 3When 0, 0 (trivial solution)
When 0, there are infinitely many nontrivial solutions
t x x x
t
1.37
Keywords in Section 1.2:
matrix: 矩陣 row: 列 column: 行 entry: 元素 size: 大小 square matrix: 方陣 order: 階 main diagonal: 主對角線 coefficient matrix: 係數矩陣 augmented matrix: 增廣矩陣
1.38
elementary row operation: 基本列運算 row equivalent: 列等價 row-echelon form: 列梯形形式 reduced row-echelon form: 簡化列梯形形式 leading 1: 領先 1 Gaussian elimination: 高斯消去法 Gauss-Jordan elimination: 高斯 - 喬登消去法 homogeneous system: 齊次系統 trivial solution: 顯然解 nontrivial solution: 非顯然解
1.39
1.3 Applications of Systems of Linear Equations
Polynomial Curve Fitting in Examples 1, 2, and 4 See the text book or “Applications in Ch1.pdf” downloaded
from my website The polynomial curve fitting problem is that given n points
(x1, y1), (x2, y2),…, (xn, yn) on the xy-plane, find a polynomial function of degree n–1 passing through these n points
Once equipped with this polynomial function, we can predict the value of y for some missing values of x
A typical application of the curve fitting problem in the field of finance is to derive the interest rate (y) for different time to maturity (x)