• 沒有找到結果。

2.4 基本矩陣

N/A
N/A
Protected

Share "2.4 基本矩陣"

Copied!
95
0
0

(1)

第二章 矩陣

2.5 矩陣運算的應用

Elementary Linear Algebra 投影片設計編製者

R. Larsen et al. (6 Edition) 淡江大學 電機系 翁慶昌 教授

(2)



n m 3

33 32

31

2 23

22 21

1 13

12 11

M

]

[ ∈ ×













=

= n

n n

ij

a a

a a

a a

a a

a a

a a

a a

a a

a A

L

M M

M M

L L L

2/95

n 3 m

2

1  ×

am am am L amn

aij

(3)





i i in

i a a a

r = 1 2

c1j

3/95

=

mj j j

j

c c c

2 1



m=n

(4)



) ,

, ,

(d1 d2 dn diag

A =

n n

n

M d

d d

×









=

L

M O

M M

L K

0 0

0 0

0 0

2 1

4/95

n



n n ij] [a

A = ×

若

ann

a a

A

Tr( ) = 11 + 22 +

+

(5)



=

6 5

4

3 2

A 1 

 

= 

2 1

r r

1 2 3

,

1 =

r r2 =

4 5 6

5/95

c1 c2 c3

=

4 , 1

1

=

c ,

5 2

2

=

c

=

6 3 c3

=

6 5

4

3 2

A 1

⇒

(6)

n m ij n

m

ij B b

a

A =[ ] × , =[ ] ×



相等(equal)矩陣

n j

m i

b a

B

A = ij = ij ∀1≤ ≤ , 1≤ ≤



6/95

=

=

d c

b B a

A 4

3

2 1

B A =

若

4

, 3

, 2

,

1 = = =

= b c d

a

(7)



n m ij n

m

ij B b

a

A =[ ] × , =[ ] ×

若

n m ij ij

n m ij n

m

ij b a b

a B

A+ =[ ] × +[ ] × =[ + ] ×



− + +



−1 2 1 3 1 1 2 3 0 5

7/95

= −

+

+ +

= −

+ −

3 1

5 0 2

1 1 0

3 2 1 1 2

1 3 1 1

0

2 1

=

− +

2 3 1

2 3 1





+

− +

− 2 2

3 3

1 1





= 0 0 0

(8)



B A

B

A− = + (−1)



A = [A]m×n, c :

n m

caij

cA=[ ] ×

8/95

B A

B

A− = + (−1)







=

2 1

2

1 0

3

4 2

1

A





=

2 3

1

3 4

1

0 0

2 B

(9)

(a)

=

2 1

2

1 0

3

4 2

1 3

3A

(b)

 

=

− 1 4 3

0 0

2 1

B

=

6 3

6

3 0

9

12 6

3

=

2 3 2

3 2

3

1 3 0

3 3

3

4 3 2

3 1

3

= 1 4 3

0 0

2

9/95



 



−

=

2 3

1

3 4

1 1

B

(c)









=

2 3 1

3 4

1

0 0

2

6 3

6

3 0

9

12 6

3 3A B

− −

=

2 3

1

3 4

1

=

4 0

7

6 4

10

12 6

1

(10)



矩陣相乘 (matrix multiplication)

p n ij n

m

ij B b

a

A = [ ] × , =[ ] ×

若

p m ij p

n ij n m

ij b c

a

AB =[ ] × [ ] × =[ ] ×

n

b a b

a b

a b

a

c =

= + +

+

其中

10/95

nj in k

j i

j i kj

ik

ij a b a b a b a b

c =

= + + +

=

1

2 2 1

1

=

in ij

i i

nn nj

n

n j

n j

nn n

n

in i

i

n

c c

c c

b b

b

b b

b

b b

b

a a

a

a a

a

a a

a

2 1

1

2 2

21

1 1

11

2 1

2 1

1 12

11



ABBA

(11)





=

0 5

2 4

3 1

A

= −

1 4

2 B 3



11/95





+

− +

− +

− +

+

− +

=

) 1 )(

0 ( ) 2 )(

5 ( )

4 )(

0 ( ) 3 )(

5 (

) 1 )(

2 ( ) 2 )(

4 ( ) 4 )(

2 ( ) 3 )(

4 (

) 1 )(

3 ( ) 2 )(

1 ( ) 4 )(

3 ( ) 3 )(

1 ( AB





=

10 15

6 4

1 9

(12)







= +

+ +

= +

+ +

= +

+ +

m n

mn m

m

n n

n n

b x

a x

a x

a

b x

a x

a x

a

b x

a x

a x

a

L M

L L

2 2 1

1

2 2

2 22 1

21

1 1

2 12 1

11

12/95









=

















m n

mn m

m

n n

b b b

x x x

a a

a

a a

a

a a

a

M M

L

M M

M M

L L

2 1 2

1

2 1

2 22

21

1 12

11

= = =

A x b

b

x = A

×1

×nn

m m×1

(13)





 

= 





=

22 21

12 11

34 33

32 31

24 23

22 21

14 13

12 11

A A

A A

a a

a a

a a

a a

a a

a a

A

子矩陣







a11 a12 a13 a14 r1

13/95



 



=



 



=

3 2 34

33 32

31

24 23

22 21

r r a

a a

a

a a

a a

A

1 2 3 4

34 33

32 31

24 23

22 21

14 13

12 11

c c

c c

a a

a a

a a

a a

a a

a a

A =





=

(14)

n

mn m

m

n n

c c

c a

a a

a a

a

a a

a

A L

L

M M

M M

L L

2 1

2 1

2 22

21

1 12

11

=









=









= xn

x x x M

2 1



14/95

mn m

m a a

a 1 2 L 

  n

2 1 2 1

1

2 2

22 1

21

1 2

12 1

11

×

+ +

+

+ +

+

+ +

+

=

n m mn m

m

n n

n n

x a x

a x

a

x a x

a x

a

x a x

a x

a Ax

+

+

mn n n

n

a a a x

2

1

=

1 21 11

1

am

a a x

+

2 22 21

2

am

a a x

c1 c2 cn

(15)

摘要與複習 (2.1節之關鍵詞)

 row vector: 列向量

 column vector: 行向量

 diagonal matrix: 對角矩陣

 trace: 跡數

 equality of matrices: 相等矩陣

15/95

 equality of matrices: 相等矩陣

 scalar multiplication: 純量積

 matrix multiplication: 矩陣相乘

 partitioned matrix: 分割矩陣

(16)



三種矩陣基本運算:

(1) 矩陣相加 (2) 純量積 (3) 矩陣相乘

16/95



0n



In

(17)



則(1) A+B = B + A

(2) A + ( B + C )=( A + B ) + C

純量 若

A,B,C∈Mm×n, c,d :

17/95

(3) ( cd ) A = c ( dA ) (4) 1A = A

(5) c( A+B ) = cA + cB (6) ( c+d ) A =cA + dA

(18)



AMm×n, c:

A 0

A ) 1 (

+ m×n = 則

n

0m

(-A) A

(2) + = ×

n m n

m c 0 or A 0

0 cA

) 3

( = ×

= = ×

18/95

n m n

m c 0 or A 0

0 cA

) 3

( = ×

= = ×



注意：

(1) 0m×n: 所有m×n矩陣的加法單位矩陣

(19)



矩陣相乘的性質

(1) A(BC) = (AB)C

(2) A(B+C) = AB + AC (3) (A+B)C = AC + BC

(4) c (AB) = (cA) B = A (cB)

19/95

(4) c (AB) = (cA) B = A (cB)



A AI

n Mm

A

n

∈ ) 1 (

A A

Im =

) 2 (

(20)



n m

mn m

m

n n

M a

a a

a a

a

a a

a

A×









=

2 1

2 22

21

1 12

11

L

M M

M M

L L 若

20/95

m n

mn n

n

m m

T M

a a

a

a a

a

a a

a

A×

=

2 1

2 22

12

1 21

11

(21)



=

8 A 2

(b)





=

9 8

7

6 5

4

3 2

1 A

(c)





=

1 1

4 2

1 0

A

(a)

=

8

A 2 AT =

2 8

(a)

21/95

(b)





=

9 8

7

6 5

4

3 2

1 A





=

9 6

3

8 5

2

7 4

1 AT

(c)

=

1 1

4 2

1 0

A

= −

1 4 1

1 2

T 0 A

(22)

) 4 (

) 3 (

) 2 (

) 1 (

T T T

T T

T T T

T T

A B AB

A c cA

B A

B A

A A

=

=

+

= +

=



22/95

) 4

( AB = BT AT

(23)



T

若 A

T = -A ，則方陣 A 被稱為反對稱矩陣



1 2 3



23/95



=

6 5 4

3 2

1

c b

a

A

5

, 3

,

2 = =

= b c

a

=

6 5 4

3 2

1

c b

a A





=

6 5

3

4 2

1

c b a

AT

AT

A =

(24)







=

0 3 0

2 1

0

c b

a

A

, 3 0

2 1

0





= a

A 



=

− 1 0

0

c b a

AT

24/95

3

, 2

,

1 = − = −

= b c

a



AAT

T

T T

T T T

T

AA

AA A

A AA

=

= ( ) )

(

0

 

b c 

 

−2 −3 0 AT

A = −

(25)



ab = ba



BA AB

p n n m× ×

25/95

BA p AB

m

m m

m m

M BA

M n AB

p m

×

×

= ∈

=

n n

n m

M BA

M n AB

m p m

×

×

≠ ∈

=

, 三種可能情形

(矩陣大小不同)

(26)



= −

1 2

3

A 1

= 0 2 1 B 2

=

=

1 3 2 1 2 5

26/95

= −

= −

4 4

5 2

2 0

1 2

1 2

3 AB 1



BA AB

= −

= 4 2

7 0

1 2

3 1

2 0

1 BA 2

(27)



實數

ac = bc , c ≠ 0 b

a =



矩陣

27/95

0 ≠

= BC C AC

(1) 若C是可逆，則A=B

(2) 若C是不可逆，則 A ≠ B (消去法不成立)

(28)



= −

=

=

2 1

2 1

3 , 2

4 2

1 , 0

3

1 B C

A

1 3

1 − 2

− 2 4

28/95

= −

=

2 1

4 2

2 1

2 1

1 0

3 AC 1

AC = BC

AB

= −

=

2 1

4 2

2 1

2 1

3 2

4 BC 2

(29)

摘要與複習 (2.2節之關鍵詞)

 zero matrix: 零矩陣

 identity matrix: 單位矩陣

 transpose matrix: 轉置矩陣

 symmetric matrix: 對稱矩陣

skew-symmetric matrix: 反對稱矩陣

29/95

 skew-symmetric matrix: 反對稱矩陣

(30)



n

Mn

A×

BMn×n

AB = BA = In

(2) B A

30/95



(2) B 為 A 的反矩陣

(31)



C B

CA

CI AB

C

I AB

=

=

=

) (

) (

31/95

C B

C IB

C B

CA

=

=

=

) (



注意:

(1) A 的反矩陣被表示成 (2)

1

A I

A A

AA1 = 1 =

(32)



A | I

I | A1

]



= −

3 1

4 A 1

AX = I

32/95

=

− 0 1

0 1 3

1

4 1

22 21

12 11

x x

x x

1 3

0 4

0 3

1 4

22 12

22 12

21 11

21 11

=

= +

=

=

+

x x

x x

x x

x x

1 2

=

+ +

1 0

0 1 3

3

4 4

22 12

21 11

22 12

21 11

x x

x x

x x

x x

(33)

 →

⇒

1 1

0

3 0

1 0

3 1

1 4

1

) 4 ( 21 (1) 12 ,

r

r

 →

1 1

0

4 0

1 1

3 1

0 4

1

) 4 ( 21 ) 1 (

12 ,

r r

1 ,

3 21

11 = − =

x x

1 ,

4 22

12 = − =

x x

1

2

33/95

−1 −3

1 0 1

1

− −

=

=

1 1

4

1 3 A X

(34)



1 1

1 0

4 3

0 1 1

0 3

1

0 1 4

1

1 , 21( 4)

) 1 ( 12

− −

 →

A I

I A

r

r

A I

34/95

(35)



=

3 2

6

1 0

1

0 1

1 A

 1 −1 0 M 1 0 0

35/95

R2+(-1)R1->R2

1 0

0 3

2 6

0 1 1

1 1

0

0 0

1 0

1 1

)

1 ( 12

 →

r





=

1 0

0

0 1

0

0 0

1

3 2

6

1 0

1

0 1

1

M M M M I

A

(36)

4

1 4

2 1

- 0 0

0 1 1

- 1

- 1 0

0 0

1 0

1 - 1

3 2 3

) 4 (

23 R R R

r + →





→

M M M

3 1

3 (6)R - R

R 1

0 6

0 1

1

0 0

1

3 4

0

1 1

0

0 1

1

)

6 (

13 + >





→

M M M

r

36/95

-1 3 3

1

4 2

1 0

0

0 1

1 1

1 0

0 0

1 0

1 1

)

1 (

3 R R

r





→

M M M

1 4

2 1

- 0

0 

 

 M

2 3

2 (1)

1

4 2

1 0

0

1 3

3 0

1 0

0 0

1 0

1 1

)

1 (

32 R R R

r + →





→

M M M

(37)

A

1 2

1

1

4 2

1 0

0

1 3

3 0

1 0

1 3

2 0

0 1

)

1 (

21 R R R

r + →





→

M M M

1

37/95





=

1 4

2

1 3

3

1 3

2 A 1



1

(38)



I

A0 =

) 1 (

0) (k

) 2 (

>

=

k

k AA A

A

整數

:

,

) 3

( ArAs = Ar+s r s

38/95

rs s

r A

A ) = (









=









=

k n k

k

k

n d

d d

D d

d d

D

L

M M

M

L L

L

M O

M M

L L

0 0

0 0

0 0

0 0

0 0

0 0

) 4

( 2

1 2

1

(39)



A A

A1 ( 1)1 =

) 1

(

k k

k

k A A A A A A

A ( ) = = ( ) =

) 2

(

1

1

1

1 1

39/95

k

A A

A A

A A

A ( ) = = ( ) =

) 2 (

0 1 ,

) (

c ) 3

( 1 = A1 c

cA c A

T T

T A A

A ( ) ( )

) 4

( 是可逆且 1 = 1

(40)

AB 1 = B1A1



=

=

=

=

=

=

=

=

=

=

I B B IB

B B

I B

B A A B

AB A

B

I AA

A AI A

I A A

BB A

A B AB

1 1

1 1

1 1

1

1 1

1 1

1 1

1

40/95

1 1

) 1

(AB = B A AB



B A AB = B A A B = B I B = B IB = B B = I



1 1

1 2 1 3 1 1

3 2 1

= A A A A

A A

A

A

n n

(41)



若 C 為可逆矩陣，則以下的性質成立

(1) 若 AC=BC，則 A=B

(右相消性質)

(2) 若 CA=CB，則 A=B

BC AC =

41/95

B A

BI AI

CC B

CC A

C BC C

AC

BC AC

=

=

=

=

=

1 1

1

1

C

C-1



(42)

b A x = 1



( A 為一非奇異矩陣) b

A Ax

A

b Ax

1 1

=

=

42/95

b A x

b A Ix

b A Ax

A

1 1

=

=

=

2

1 x

x

2

Ax1 = b = Ax

2

1 x

x =

(43)



b Ax =

A | b

→A1

A1A | A1b

= I | A1b

A | b1 | b2 |

| bn

→A1

I | A1b1 |

| A1bn

]

43/95 線性代數線性代數線性代數

(44)

摘要與複習 (2.3節之關鍵詞)

 inverse matrix: 反矩陣

 invertible: 可逆

 nonsingular: 非奇異

 singular: 奇異

 power: 冪次

44/95

 power: 冪次

(45)



) ( )

1

( Rij = rij I



一n

×n矩陣稱為列基本矩陣若它可以將單位矩陣 I 進行

兩列互換

45/95

) 0 (

)

( )

2

( Ri(k) = ri(k) I k ≠ )

( )

3

( Rij(k) = rij(k) I



(46)



(a)





1 0 0

0 3

0

0 0

1

(b)

0 1

0

0 0

1

(c)





0 0

0

0 1

0

0 0

1

(d)





0 1

0

1 0 0

0 0 1

)) (I (r(3)

(非方陣) 不是(必須乘上

(r23(I3))

46/95

(e)

1 2

0 1

(f)

−1 0

0

0 2

0

0 0

1 ))

(I (r2(3) 3

(非方陣)

) (

(r23(I3))

)) (I (r12(2) 2

是 不是

(必須只做一次列運算)

Rodman, Canonical forms for symmetric/skew-symmetric real matrix pairs under strict equivalence and congruence, Linear Algebra and its Applications 406 (2005),

augmented matrix [A |I 4 ], elementary row operation A

△ABC 為上底面、△DEF 為下底面，且上底面△ABC 與下底面△DEF 互相平行、△ABC △DEF；矩形 ADEB、矩形 BEFC 與 矩形 CFDA 皆為此三角柱的側面，且均同時與△ABC、△DEF

sort 函式可將一組資料排序成遞增 (ascending order) 或 遞減順序 (descending order)。. 如果這組資料是一個行或列向量，整組資料會進行排序。

where L is lower triangular and U is upper triangular, then the operation counts can be reduced to O(2n 2 )!.. The results are shown in the following table... 113) in