49
1 2.4 Linear Independence ( 線線線線 ) and Linear Dependence( 線線線 線) A linear combination( 線線線線 ) of the vectors in V is any vector of the form c 1 v 1 + c 2 v 2 + … + c k v k where c 1 , c 2 , …, c k are arbitrary scalars. A set of V of m-dimensional vectors is linearly independent( 線線線線 ) if the only linear combination of vectors in V that equals 0 is the trivial linear combination. A set of V of m-dimensional vectors is linearly dependent ( 線線線線 ) if there is a nontrivial linear combination of vectors in V that adds up to 0. (p.32)

1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 ) A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

Embed Size (px)

Citation preview

Page 1: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

1

2.4 Linear Independence (線性獨立 ) and Linear Dependence(線性相依 )

A linear combination( 線性組合 ) of the vectors in V is any vector of the form c1v1 + c2v2 + … + ckvk where c1, c2, …, ck are arbitrary scalars.

A set of V of m-dimensional vectors is linearly independent( 線性獨立 ) if the only linear combination of vectors in V that equals 0 is the trivial linear combination.

A set of V of m-dimensional vectors is linearly dependent ( 線性相依 ) if there is a nontrivial linear combination of vectors in V that adds up to 0.

(p.32)

Page 2: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

2

Example 10: LD Set of Vectors (p.33)

Show that V = {[ 1 , 2 ] , [ 2 , 4 ]} is a linearly dependent set of vectors.

Solution Since 2([ 1 , 2 ]) – 1([ 2 , 4 ]) = (0 0), there

is a nontrivial linear combination with c1 =2 and c2 = -1 that yields 0. Thus V is a linear dependent set of vectors.

Page 3: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

3

What does it mean for a set of vectors to linearly dependent?

A set of vectors is linearly dependent only if some vector in V can be written as a nontrivial linear combination of other vectors in V.

If a set of vectors in V are linearly dependent, the vectors in V are, in some way, NOT all “different” vectors. By “different” we mean that the direction specified by

any vector in V cannot be expressed by adding together multiples of other vectors in V. For example, in two dimensions, two linearly dependent vectors lie on the same line.

Linear dependent 線性相依 (p.33)

Page 4: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

4

Let A be any m x n matrix, and denote the rows of A by r1, r2, …, rm. Define R = {r1, r2, …, rm}.

The rank( 秩 ) of A is the number of vectors in the largest linearly independent subset of R.

To find the rank of matrix A, apply the Gauss-

Jordan method to matrix A. (Example 14, p.35) Let A’ be the final result. It can be shown that the

rank of A’ = rank of A. The rank of A’ = the number of nonzero rows in A’. Therefore, the rank A = rank A’ = number of nonzero rows in A’.

The Rank of a Matrix (p.34)

Page 5: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

5

A method of determining whether a set of vectors V = {v1, v2, …, vm} is linearly dependent is to form a matrix A whose ith row is vi. (p.35)

- If the rank A = m, then V is a linearly independent set of vectors.

- If the rank A < m, then V is a linearly dependent set of vectors.

Whether a Set of Vectors Is Linear Independent

Page 6: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

6

2.52.5 The Inverse of a Matrix ( 反矩陣 ) (p.36) A square matrix( 方陣 ) is any matrix that has

an equal number of rows and columns. The diagonal elements ( 對角元素 )of a

square matrix are those elements aij such that i=j. A square matrix for which all diagonal elements are

equal to 1 and all non-diagonal elements are equal to 0 is called an identity matrix( 單位矩陣 ). An identity matrix is written as Im.

Page 7: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

7

The Inverse of a Matrix (continued)

For any given m x m matrix A, the m x m matrix B is the inverse of A if BA=AB=Im.

Some square matrices do not have inverses. If there does exist an m x m matrix B that satisfies BA=AB=Im, then we write B= . (p.39)

The Gauss-Jordan Method for inverting an m x m Matrix A is Step 1 Write down the m x 2m matrix A|Im Step 2 Use EROs to transform A|Im into Im|B. This

will be possible only if rank A=m. If rank A<m, then A has no inverse. (p.40)

1A

Page 8: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

8

(p.41)

Matrix inverses can be used to solve linear systems. (example, p.40)

The Excel command =MINVERSE makes it easy to invert a matrix. Enter the matrix into cells B1:D3 and select the

output range (B5:D7 was chosen) where you want A-1 computed.

In the upper left-hand corner of the output range (cell B5), enter the formula = MINVERSE(B1:D3)

Press Control-Shift-Enter and A-1 is computed in the output range

Page 9: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

9

Inverse Matrix ( 反矩陣 )

Page 10: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

10

反矩陣之性質

p.42 #9

p.42 #10

p.41 #8a

Page 11: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

11

p.41 problems group 8a

Page 12: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

12

Example :

例題:

Page 13: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

13

Example (continued)

Exercise : problem 2, p.41, 5min

Page 14: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

14

Orthogonal matrix (正規矩陣 )

A-1=AT

Det(A)=1 or Det(A)=-1

Determine matrix A is an orthogonal matrix or not .

cossin

sincosA

p.42 #11

Page 15: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

15

AX=b 為一線性方程組 , 若 b1=b2=…=bm=0 ,則稱為齊次方程組(homogeneous) , 以 AX=0 表之。

1.x1=x2=…=xn=0 為其中一組解,稱為必然解 (trivial solution)

2.若 x1 、 x2 、… xn 不全為 0 ,則稱為非必然解 (nontrivial

solution)

Homogeneous System Equations

Page 16: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

16

Page 17: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

17

Example: ? solution trival a has

101

011

326

0 A,AX

solution. trivala has system the

00A]x,x,[xX

matrix,singular non isA 1.1-T

321

solution. trival a has system the ~

~~~ ~

~~~ 2

,]xxx[X

.

T 0

0100

0010

0001

0100

0010

0101

0100

0110

0101

0010

0110

0101

0320

0110

0101

0320

0011

0101

0326

0011

0101

0326

0011

0101

0101

0011

0326

321

Page 18: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

18

Example: ?solution trivala has

222

012

111

,0

AAX

solution. nontrival a has system the 3

23

3

2

1

Rt

tx

tx

tx

Page 19: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

19

Page 20: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

20

Example : Solving linear system by inverse matrix

Page 21: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

21

Page 22: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

22

Page 23: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

23

Page 24: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

24

Exercise : Solving linear system by inverse matrix

1x x 3x

62xx 5 2x

7x x 2 x

321

321

321

19x 8,x 4,x 321 Answer:

(8 min)

Page 25: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

25

2.6 Determinants(行列式 ) (p.42)

Associated with any square matrix A is a number called the determinant of A (often abbreviated as det A or |A|).

If A is an m x m matrix, then for any values of i and j, the ijth minor of A (written Aij) is the (m - 1) x (m - 1) submatrix of A obtained by deleting row i and column j of A.

Determinants can be used to invert square matrices and to solve linear equation systems.

Page 26: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

26

Determinants(行列式 )

Page 27: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

27

Minor( 子行列式 ) & Cofactor( 餘因子 )

Page 28: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

28

餘因子展開式

Page 29: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

29

行列式之性質 (1)

Page 30: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

30

行列式之性質 (2)

Page 31: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

31

行列式之性質 (3)

Page 32: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

32

行列式之性質 (4)

Page 33: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

33

Adjoint matrix ( 伴隨矩陣 )

Page 34: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

34

Exercise :

(1) adj A = ?

(2) det(A) = ?

231

540

213

A

12104

1545

1387

Aadj det(A) = -34

Answer :

Page 35: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

35

Exercise :

若 det(λI3-A)=0, λ= ?

212

030

313

A

λ =-5 或 λ=0 或 λ=3

Page 36: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

36

伴隨矩陣之性質

Page 37: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

37

行列式之性質

Page 38: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

38

Cramer’s Rule

Page 39: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

39

Cramer’s Rule 注意事項若 det(A) ≠0 ,則 n 元一次方程組為相容方程組,其唯一解為

若 det(A) =det(A1) =det(A2)= …=det(An) =0 ,則 n 元一次方程組為相依方程組,其有無限多組解

若 det(A) =0 ,而 det(A1) ≠0 或 det(A2) ≠0 ,…,或 det(An) ≠0 ,則 n 元一次方程組為矛盾方程組,其為無解。

)det(

)det( ..., ,

)det(

)det( ,

)det(

)det( 22

11 A

Ax

A

Ax

A

Ax n

n

Page 40: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

40

Example : Solving Linear System

635

212

211

A

6635

12 2

42

321

321

321

xxx

xxx

xxx

Sol:

0

635

112

411

0

665

212

241

0

636

211

214

0

635

212

211

3

21

)Adet(

,)Adet(,)Adet(,)Adet(

The system has an infinite number of solutions

Page 41: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

41

Exercise : Solving linear system by Cramer’s rule

1x x 3x

62xx 5 2x

7x x 2 x

321

321

321

19x 8,x 4,x 321 Answer:

Page 42: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

42

LU-Decompositions

Factoring the coefficient matrix into a product of a lower and upper triangular matrices.

This method is well suited for computers and is the basis for many practical computer programs.

Page 43: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

43

Solving linear systems by factoring

Let Ax = b , and coefficient matrix A can be factored into a product of n × n matrices as A = LU , where L is lower triangular and U is upper triangular, then the system Ax = b can be solved by as follows :

Step 1. Rewrite Ax = b as LUx = b (1)

Step 2. Define a n × 1 new matrix y by Ux = y (2)

Step 3. Use (2) to rewrite (1) as Ly = b and solve this system for y.

Step 4. Substitude y in(2) and solve for x

Page 44: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

44

Example : Solving linear system by LU decomposition

3

2

2

100

310

131

734

013

002

100

310

131

734

013

002

294

083

262

3

2

1

x

x

x

3

2

2

294

083

262

3

2

1

x

x

x

Step 1. A=LU, Ax=b LUx=b

Page 45: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

45

Step 2. Ux=y

Step 3. Ly=b

Solving y by forward-substitution. y1=1, y2=5, y3=2

37y3y 4y

2 y 3y

2 2y

3

2

2

734

013

002

321

21

1

3

2

1

y

y

y

3

2

1

3

2

1

100

310

131

y

y

y

x

x

x

Page 46: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

46

Step 4.

y1=1, y2=5, y3=2

Solving y by backward-substitution. x1=2, x2=-1, x3=2

2x

53xx

1x 3xx

2

5

1

x

x

x

100

310

131

3

32

321

3

2

1

3

2

1

3

2

1

100

310

131

y

y

y

x

x

x

Page 47: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

47

Assume that A has a Doolittle factorization A = LU.L : unit lower-△ , U : upper-△

=

The solution X to the linear system AX = b  , is found in three steps:      1.  Construct the matrices  L and U, if possible.      2.  Solve LY = b  for  Y  using forward substitution.    3.  Solve UX = Y   for  X  using back substitution. 

Doolittle method

=

Page 48: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

48

=

Assume that A has a Doolittle factorization A = LU. L : lower-△ , U : unit upper-△ 

The solution X to the linear system AX = b  , is found in three steps:      1.  Construct the matrices  L and U, if possible.      2.  Solve LY = b  for  Y  using forward substitution.    3.  Solve UX = Y   for  X  using back substitution. 

Crout method

Page 49: 1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 )  A linear combination ( 線性組合 ) of the vectors in V is any vector of the form c 1 v 1

49

Solving Linear Equations (see *.doc) Gauss backward-substitution 高斯後代法 -- forward-substitution Gauss-Jordan Elimination 高斯約旦消去

法 -- reduced row echelon matrix Inversed matrix ─ solve Ax=b as x=A-1b LU method ─ solve Ax=b as LUx=b Cramer's Rule ─ x1=det(A1)/det(A),….