1 2.4 Linear Independence ( 線性獨立 ) and Linear Dependence( 線性相依 ) A linear...

Preview:

Citation preview

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)

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.

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)

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)

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

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.

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

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

9

Inverse Matrix ( 反矩陣 )

10

反矩陣之性質

p.42 #9

p.42 #10

p.41 #8a

11

p.41 problems group 8a

12

Example :

例題:

13

Example (continued)

Exercise : problem 2, p.41, 5min

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

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

16

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

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

19

20

Example : Solving linear system by inverse matrix

21

22

23

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)

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.

26

Determinants(行列式 )

27

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

28

餘因子展開式

29

行列式之性質 (1)

30

行列式之性質 (2)

31

行列式之性質 (3)

32

行列式之性質 (4)

33

Adjoint matrix ( 伴隨矩陣 )

34

Exercise :

(1) adj A = ?

(2) det(A) = ?

231

540

213

A

12104

1545

1387

Aadj det(A) = -34

Answer :

35

Exercise :

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

212

030

313

A

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

36

伴隨矩陣之性質

37

行列式之性質

38

Cramer’s Rule

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

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

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:

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.

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

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

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

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

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

=

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

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),….

Recommended