Chapter 2 Matrices

61
Chapter 2 Matrices 2.1 Operations with Matrices 2.2 Properties of Matrix Operations 2.3 The Inverse of a Matrix 2.4 Elementary Matrices Elementary Linear Algebra R. Larsen et al. (6 Edition)

description

Chapter 2 Matrices. 2.1 Operations with Matrices 2.2 Properties of Matrix Operations 2.3 The Inverse of a Matrix 2.4 Elementary Matrices. Elementary Linear Algebra R. Larsen et al. (6 Edition). ( i , j )-th entry :. 2.1 Operations with Matrices. Matrix:. row : m. column : n. - PowerPoint PPT Presentation

Transcript of Chapter 2 Matrices

Page 1: Chapter 2 Matrices

Chapter 2Matrices

2.1 Operations with Matrices

2.2 Properties of Matrix Operations

2.3 The Inverse of a Matrix

2.4 Elementary Matrices

Elementary Linear Algebra

R. Larsen et al. (6 Edition)

Page 2: Chapter 2 Matrices

2/61

2.1 Operations with Matrices Matrix:

nm

nmmnmmm

n

n

n

ij M

aaaa

aaaaaaaaaaaa

aA

][

321

3333231

2232221

1131211

(i, j)-th entry: ija

row: m

column: n

size: m×n

Elementary Linear Algebra: Section 2.1, pp.46-47

Page 3: Chapter 2 Matrices

3/61

i-th row vector

iniii aaar 21

j-th column vector

mj

j

j

j

c

cc

c2

1

row matrix

column matrix

Square matrix: m = n

Elementary Linear Algebra: Section 2.1, p.47

Page 4: Chapter 2 Matrices

4/61

Diagonal matrix:

),,,( 21 nddddiagA nn

n

M

d

dd

00

0000

2

1

Trace:

nnijaA ][ If

nnaaaATr 2211)(Then

Elementary Linear Algebra: Section 2.1, Addition

Page 5: Chapter 2 Matrices

5/61

Ex:

654321

A

2

1

rr

321 ccc

,3211 r 6542 r

,41

1

c ,

52

2

c

63

3c

654321

A

Elementary Linear Algebra: Section 2.1, Addition

Page 6: Chapter 2 Matrices

6/61

nmijnmij bBaA ][ ,][ If

Equal matrix:

njmibaBA ijij 1 ,1 ifonly and if Then

Ex 1: (Equal matrix)

dcba

BA 4321

BA If

4 ,3 ,2 ,1 Then dcba

Elementary Linear Algebra: Section 2.1, p.47

Page 7: Chapter 2 Matrices

7/61

Matrix addition:

nmijnmij bBaA ][ ,][ If

nmijijnmijnmij babaBA ][][][Then

Ex 2: (Matrix addition)

3150

21103211

2131

1021

231

231

2233

11

000

Elementary Linear Algebra: Section 2.1, p.47

Page 8: Chapter 2 Matrices

8/61

Matrix subtraction:BABA )1(

Scalar multiplication:scalar : ,][ If caA nmij

Ex 3: (Scalar multiplication and matrix subtraction)

212103421

A

231341002

B

Find (a) 3A, (b) –B, (c) 3A – B

nmijcacA ][Then

Elementary Linear Algebra: Section 2.1, pp.48-49

Page 9: Chapter 2 Matrices

9/61

(a)

212103421

33A

(b)

231341002

1B

(c)

231341002

636309

12633 BA

Sol:

636309

1263

231323130333432313

231341002

4076410

1261

Elementary Linear Algebra: Section 2.1, p.49

Page 10: Chapter 2 Matrices

10/61

Matrix multiplication:pnijnmij bBaA ][ ,][ If

pmijpnijnmij cbaAB ][][][Then

njin

n

kjijikjikij babababac

1

2211where

Notes: (1) A+B = B+A, (2) BAAB

Size of AB

inijii

nnnjn

nj

nj

nnnn

inii

n

ccccbbb

bbbbbb

aaa

aaa

aaa

21

1

2221

1111

21

21

11211

Elementary Linear Algebra: Section 2.1, p.50

Page 11: Chapter 2 Matrices

11/61

052431

A

1423

B

Ex 4: (Find AB)

Sol:

)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

10156419

Elementary Linear Algebra: Section 2.1, p.50

Page 12: Chapter 2 Matrices

12/61

Matrix form of a system of linear equations:

mnmnmm

nn

nn

bxaxaxa

bxaxaxabxaxaxa

2211

22222121

11212111

= = =

A x b

equationslinear m

equationmatrix Single

bx A 1 nnm 1m

mnmnmm

n

n

b

bb

x

xx

aaa

aaaaaa

2

1

2

1

21

22221

11211

Elementary Linear Algebra: Section 2.1, p.53

Page 13: Chapter 2 Matrices

13/61

Partitioned matrices:

2221

1211

34333231

24232221

14131211

AAAA

aaaaaaaaaaaa

A

submatrix

3

2

1

34333231

24232221

14131211

rrr

aaaaaaaaaaaa

A

4321

34333231

24232221

14131211

ccccaaaaaaaaaaaa

A

Elementary Linear Algebra: Section 2.1, Addition

Page 14: Chapter 2 Matrices

14/61

Keywords in Section 2.1:

row vector: 列向量 column vector: 行向量 diagonal matrix: 對角矩陣 trace: 跡數 equality of matrices: 相等矩陣 matrix addition: 矩陣相加 scalar multiplication: 純量積 matrix multiplication: 矩陣相乘 partitioned matrix: 分割矩陣

Page 15: Chapter 2 Matrices

15/61

2.2 Properties of Matrix Operations Three basic matrix operators: (1) matrix addition (2) scalar multiplication (3) matrix multiplication

Zero matrix: nm0

Identity matrix of order n: nI

Elementary Linear Algebra: Section 2.2, pp.61-62

Page 16: Chapter 2 Matrices

16/61

Then (1) A+B = B + A

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

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

(4) 1A = A

(5) c( A+B ) = cA + cB

(6) ( c+d ) A = cA + dA

scalar:, ,,, If dcMCBA nm

Properties of matrix addition and scalar multiplication:

Elementary Linear Algebra: Section 2.2, p.61

Page 17: Chapter 2 Matrices

17/61

calar cMA nm s: , If

AA nm 0 (1)Then

nmA A 0)((2)

nmnm or A c cA 000)3(

Notes:

(1) 0m×n: the additive identity for the set of all m×n matrices

(2) –A: the additive inverse of A

Properties of zero matrices:

Elementary Linear Algebra: Section 2.2, p.62

Page 18: Chapter 2 Matrices

18/61

nm

mnmm

n

n

M

aaa

aaaaaa

A

If

21

22221

11211

mn

mnnn

m

m

T M

aaa

aaaaaa

A

Then

21

22212

12111

Transpose of a matrix:

Elementary Linear Algebra: Section 2.2, p.67

Page 19: Chapter 2 Matrices

19/61

82

A (b)

987654321

A (c)

114210

A

Sol: (a)

82

A 82 TA

(b)

987654321

A

963852741

TA

(c)

114210

A

141

120TA

(a)

Ex 8: (Find the transpose of the following matrix)

Elementary Linear Algebra: Section 2.2, p.68

Page 20: Chapter 2 Matrices

20/61

AA TT )( )1(TTT BABA )( )2(

)()( )3( TT AccA

)( )4( TTT ABAB

Properties of transposes:

Elementary Linear Algebra: Section 2.2, p.68

Page 21: Chapter 2 Matrices

21/61

A square matrix A is symmetric if A = AT

Ex:

654321

Ifcb

aA is symmetric, find a, b, c?

A square matrix A is skew-symmetric if AT = –A

Skew-symmetric matrix:

Sol:

654321

cbaA

65342

1cba

AT

5 ,3 ,2 cba

TAA

Symmetric matrix:

Elementary Linear Algebra: Section 2.2, p.68 & p.72

Page 22: Chapter 2 Matrices

22/61

030210

Ifcb

aA is a skew-symmetric, find a, b, c?

Note: TAA is symmetric

Pf:

symmetric is

)()(T

TTTTTT

AA

AAAAAA

Sol:

030210

cbaA

032

010

cba

AT

TAA 3 ,2 ,1 cba

Ex:

Elementary Linear Algebra: Section 2.2, p.72

Page 23: Chapter 2 Matrices

23/61

ab = ba (Commutative law for multiplication)

undefined. is ,defined is then , If BAABpm (1)

mmmm MBAMABnpm (3) ,then , If

nnmm MBAMABnmpm (2) , then , , If (Sizes are not the same)

(Sizes are the same, but matrices are not equal)

Real number:

Matrix:BAAB

pnnm

Three situations:

Elementary Linear Algebra: Section 2.2, Addition

Page 24: Chapter 2 Matrices

24/61

1231

A

2012

B

Sol:

4452

2012

1231

AB

Note: BAAB

2470

1231

2012

BA

Ex 4 : Sow that AB and BA are not equal for the matrices.

and

Elementary Linear Algebra: Section 2.2, p.64

Page 25: Chapter 2 Matrices

25/61

(Cancellation is not valid)

0 , cbcacb a (Cancellation law)

Matrix:0 CBCAC

(1) If C is invertible, then A = B

Real number:

BA then ,invertiblenot is C If (2)

Elementary Linear Algebra: Section 2.2, p.65

Page 26: Chapter 2 Matrices

26/61

2121

,3242

,1031

CBA

Sol:

2142

2121

1031

AC

So BCAC

But BA

2142

2121

3242

BC

Ex 5: (An example in which cancellation is not valid) Show that AC=BC

Elementary Linear Algebra: Section 2.2, p.65

Page 27: Chapter 2 Matrices

27/61

Keywords in Section 2.2:

zero matrix: 零矩陣 identity matrix: 單位矩陣 transpose matrix: 轉置矩陣 symmetric matrix: 對稱矩陣 skew-symmetric matrix: 反對稱矩陣

Page 28: Chapter 2 Matrices

28/61

2.3 The Inverse of a Matrix

nnMA

,such that matrix a exists thereIf nnn IBAABMB

Note:

A matrix that does not have an inverse is called noninvertible (or singular).

Consider

Then (1) A is invertible (or nonsingular)

(2) B is the inverse of A

Inverse matrix:

Elementary Linear Algebra: Section 2.3, p.73

Page 29: Chapter 2 Matrices

29/61

If B and C are both inverses of the matrix A, then B = C.

Pf:

CBCIBCBCACIABCIAB

)()(

Consequently, the inverse of a matrix is unique. Notes:

(1) The inverse of A is denoted by 1A

IAAAA 11 )2(

Thm 2.7: (The inverse of a matrix is unique)

Elementary Linear Algebra: Section 2.3, pp.73-74

Page 30: Chapter 2 Matrices

30/61

1nEliminatioJordan -Gauss || AIIA Ex 2: (Find the inverse of the matrix)

3141

A

Sol:IAX

10

013141

2221

1211

xxxx

1001

3344

22122111

22122111

xxxxxxxx

Find the inverse of a matrix by Gauss-Jordan Elimination:

Elementary Linear Algebra: Section 2.3, pp.74-75

Page 31: Chapter 2 Matrices

31/61

110301

031141)1(

)4(21

)1(12 ,

rr

110401

131041)2(

)4(21

)1(12 ,

rr

1 ,3 2111 xx

1 ,4 2212 xx

)( 1143 1-

2221

12111 AAIAXxxxx

AX

Thus

(2) 1304

(1) 0314

2212

2212

2111

2111

xxxxxxxx

Elementary Linear Algebra: Section 2.3, p.75

Page 32: Chapter 2 Matrices

32/61

11104301

10310141

1

inationJordanElimGauss

, )4(21

)1(12

AIIA

rr

If A can’t be row reduced to I, then A is singular.

Note:

Elementary Linear Algebra: Section 2.3, p.76

Page 33: Chapter 2 Matrices

33/61

326101011

A

100326011110001011

)1(

12

r

Sol:

100010001

326101011

IA

106011001

340110011

)6(

13

r

142100011110001011

)1(

3

r

142100011110001011

)4(

23

r

Ex 3: (Find the inverse of the following matrix)

Elementary Linear Algebra: Section 2.3, p.76

Page 34: Chapter 2 Matrices

34/61

142100133010001011

)1(

32

r

141100133010132001

)1(

21

r

So the matrix A is invertible, and its inverse is

142133132

1A

] [ 1 AI

Check:

IAAAA 11

Elementary Linear Algebra: Section 2.3, p.77

Page 35: Chapter 2 Matrices

35/61

IA 0(1)

0)( )2(factors

kAAAAk

k

integers:, )3( srAAA srsr rssr AA )(

kn

k

k

k

n d

dd

D

d

dd

D

00

0000

00

0000

)4( 2

1

2

1

Power of a square matrix:

Elementary Linear Algebra: Section 2.3, Addition

Page 36: Chapter 2 Matrices

36/61

If A is an invertible matrix, k is a positive integer, and c is a scalar

not equal to zero, then

AAA 111 )( and invertible is (1) kk

k

kk AAAAAAA )()( and invertible is (2) 1

factors

1111

0 ,1)( and invertible is c (3) 11 cAc

cAA

TTT AAA )()( and invertible is (4) 11

Thm 2.8 : (Properties of inverse matrices)

Elementary Linear Algebra: Section 2.3, p.79

Page 37: Chapter 2 Matrices

37/61

Thm 2.9: (The inverse of a product)

If A and B are invertible matrices of size n, then AB is invertible and111)( ABAB

111)( So

unique. is inverse its then ,invertible is If ABAB

AB

Pf:

IBBIBBBIBBAABABAB

IAAAAIAIAABBAABAB

1111111

1111111

)()()())((

)()()())((

Note:

11

12

13

11321

AAAAAAAA nn

Elementary Linear Algebra: Section 2.3, p.81

Page 38: Chapter 2 Matrices

38/61

Thm 2.10 (Cancellation properties) If C is an invertible matrix, then the following properties hold: (1) If AC=BC, then A=B (Right cancellation property) (2) If CA=CB, then A=B (Left cancellation property)

Pf:

BABIAI

CCBCCA

CBCCAC

BCAC

)()(

)()(11

11 exists) C so ,invertible is (C 1-

Note:If C is not invertible, then cancellation is not valid.

Elementary Linear Algebra: Section 2.3, p.82

Page 39: Chapter 2 Matrices

39/61

Thm 2.11: (Systems of equations with unique solutions) If A is an invertible matrix, then the system of linear equations Ax = b has a unique solution given by

bAx 1Pf:

( A is nonsingular)

bAx

bAIx

bAAxA

bAx

1

1

11

This solution is unique.

.equation of solutions twowere and If 21 bAxxx

21then AxbAx 21 xx (Left cancellation property)

Elementary Linear Algebra: Section 2.3, p.83

Page 40: Chapter 2 Matrices

40/61

bAx

bAIbAAAbA A 111 |||1

Note:

Elementary Linear Algebra: Section 2.3, p.83

(A is an invertible matrix)

Note:

For square systems (those having the same number of equations as variables), Theorem 2.11 can be used to determine whether the system has a unique solution.

Page 41: Chapter 2 Matrices

41/61

Keywords in Section 2.3:

inverse matrix: 反矩陣 invertible: 可逆 nonsingular: 非奇異 singular: 奇異 power: 冪次

Page 42: Chapter 2 Matrices

42/61

2.4 Elementary Matrices Row elementary matrix:

An nn matrix is called an elementary matrix if it can be

obtained

from the identity matrix In by a single elementary operation. Three row elementary matrices:)( )1( IrR ijij

)0( )( )2( )()( kIrR ki

ki

)( )3( )()( IrR kij

kij

Interchange two rows.

Multiply a row by a nonzero constant.

Add a multiple of a row to another row.

Note: Only do a single elementary row operation.

Elementary Linear Algebra: Section 2.4, p.87

Page 43: Chapter 2 Matrices

43/61

100030001

)(a

010001)(b

000010001

)(c

010100001

)(d

1201)(e

100020001

)( f

))(( Yes 3(3)

2 Ir square)(not Not)constan nonzero aby bemust

tionmultiplica (Row No

))(( esY 323 Ir ))(( esY 2(2)

12 Ir)operations row

elementary two(Use No

Ex 1: (Elementary matrices and nonelementary matrices)

Elementary Linear Algebra: Section 2.4, p.87

Page 44: Chapter 2 Matrices

44/61

Notes:

ARAr ijij )( )1(

ARAr ki

ki

)()( )( )2(

ARAr kij

kij

)()( )( )3(

EAArEIr

)()(

Thm 2.12: (Representing elementary row operations)

Let E be the elementary matrix obtained by performing an

elementary row operation on Im. If that same elementary row

operation is performed on an mn matrix A, then the resulting matrix is given by the product EA.

Elementary Linear Algebra: Section 2.4, p.89

Page 45: Chapter 2 Matrices

45/61

))(( 123120631

123631120

100001010

)( 1212 ARAra

Ex 2: (Elementary matrices and elementary row operation)

Elementary Linear Algebra: Section 2.4, p.88

))(( 540120101

540322101

100012001

)( )5(12

)2(12 ARArc

))(( 131023101401

131046201401

100

0210

001 )(

)21(

2

)21(

2 ARArb

Page 46: Chapter 2 Matrices

46/61

026220315310

A

Sol:

100001010

)( 3121 IrE

102010001

)( 3)2(

132 IrE

21

3

)21(

33

00010001

)(IrE

Ex 3: (Using elementary matrices)

Find a sequence of elementary matrices that can be used to write

the matrix A in row-echelon form.

Elementary Linear Algebra: Section 2.4, pp.89-90

Page 47: Chapter 2 Matrices

47/61

026253102031

026220315310

100001010

)( 1121 AEArA

420053102031

026253102031

102010001

)( 121)2(

132 AEArA

210053102031

420053102031

2100010001

)( 232

)21(

33 AEArA

AEEEB 123 )))(((or 12)2(

13

)21(

3 ArrrB

B

row-echelon form

Elementary Linear Algebra: Section 2.4, pp.89-90

Page 48: Chapter 2 Matrices

48/61

Matrix B is row-equivalent to A if there exists a finite number

of elementary matrices such that

AEEEEB kk 121

Row-equivalent:

Elementary Linear Algebra: Section 2.4, p.90

Page 49: Chapter 2 Matrices

49/61

Thm 2.13: (Elementary matrices are invertible)

If E is an elementary matrix, then exists and

is an elementary matrix.

Notes:

ijij RR 1)( )1()1(1)( )( )2( k

ik

i RR

)(1)( )( )3( kij

kij RR

1E

Elementary Linear Algebra: Section 2.4, p.90

Page 50: Chapter 2 Matrices

50/61

121100001010

RE

100001010

)( 11

112 ER

)2(132

102010001

RE

102010001

)( 12

1)2(13 ER

)21(

3

21

300

010001

RE

200010001

)( 13

1)21(

3 ER

Ex: Elementary Matrix Inverse Matrix

Elementary Linear Algebra: Section 2.4, p.91

12R (Elementary Matrix)

)2(13R (Elementary Matrix)

)2(3R (Elementary Matrix)

Page 51: Chapter 2 Matrices

51/61

Pf: (1) Assume that A is the product of elementary matrices. (a) Every elementary matrix is invertible. (b) The product of invertible matrices is invertible. Thus A is invertible. (2) If A is invertible, has only the trivial solution. (Thm. 2.11) 0xA

00 IA

IAEEEEk 123 11

31

21

1 kEEEEA

Thus A can be written as the product of elementary matrices.

Thm 2.14: (A property of invertible matrices)

A square matrix A is invertible if and only if it can be written as

the product of elementary matrices.

Elementary Linear Algebra: Section 2.4, p.91

Page 52: Chapter 2 Matrices

52/61

8321

A

Sol:

I

A

rr

rr

1001

1021

2021

8321

8321

)2(21

)21(

2

)3(12

)1(1

IARRRR )1(1

)3(12

)21(

2)2(

21 Therefore

Ex 4: Find a sequence of elementary matrices whose product is

Elementary Linear Algebra: Section 2.4, pp.91-92

Page 53: Chapter 2 Matrices

53/61

1)2(21

1)21(

21)3(

121)1(

1 )()()()( Thus RRRRA)2(

21)2(

2)3(

12)1(

1 RRRR

1021

2001

1301

1001

Note:If A is invertible

][][ 1123

AIIAEEEEk

IAEEEEk 123 Then

1231 EEEEA k

Elementary Linear Algebra: Section 2.4, p.92

Page 54: Chapter 2 Matrices

54/61

If A is an nn matrix, then the following statements are equivalent. (1) A is invertible.

(2) Ax = b has a unique solution for every n1 column matrix b.

(3) Ax = 0 has only the trivial solution.

(4) A is row-equivalent to In .

(5) A can be written as the product of elementary matrices.

Thm 2.15: (Equivalent conditions)

Elementary Linear Algebra: Section 2.4, p.93

Page 55: Chapter 2 Matrices

55/61

LUA L is a lower triangular matrix

U is an upper triangular matrix

If the nn matrix A can be written as the product of a lowertriangular matrix L and an upper triangular matrix U, then A=LU is an LU-factorization of A

Note:If a square matrix A can be row reduced to an upper triangular matrix U using only the row operation of adding a multiple of one row to another row below it, then it is easy to find an LU-factorization of A.

LUAUEEEA

UAEEE

k

k

11

21

1

12

LU-factorization:

Elementary Linear Algebra: Section 2.4, p.93

Page 56: Chapter 2 Matrices

56/61

01

21 )( Aa

2102310031

)( Ab

UA r

20

21 0121 (-1)

12

Sol: (a)

UAR )1(12

LUURA 1)1(12 )(

1101

)( )1(12

1)1(12 RRL

Ex 5: (LU-factorization)

Elementary Linear Algebra: Section 2.4, p.93

Page 57: Chapter 2 Matrices

57/61

(b)

UA rr

1400310031

240310031

2102310031

)4(23

)2(13

UARR )2(13

)4(23

LUURRA 1)4(23

1)2(13 )()(

142010001

140010001

102010001

)()( )4(23

)2(13

1)4(23

1)2(13 RRRRL

Elementary Linear Algebra: Section 2.4, p.94

Page 58: Chapter 2 Matrices

58/61

bLUxLUA then ,If

bLyUxy then , Let

Two steps:(1) Write y = Ux and solve Ly = b for y

(2) Solve Ux = y for x

bAx

Solving Ax=b with an LU-factorization of A

Elementary Linear Algebra: Section 2.4, p.95

Page 59: Chapter 2 Matrices

59/61

Sol:

LUA

1400310031

142010001

2102310031

2021021353

321

32

21

xxxxx

xx

bLyUxy solve and ,Let )1(

2015

142010001

3

2

1

yyy

14)1(4)5(220 4220

15

213

2

1

yyy

yy

Ex 7: (Solving a linear system using LU-factorization)

Elementary Linear Algebra: Section 2.4, pp.95-96

Page 60: Chapter 2 Matrices

60/61

yUx system following theSolve )2(

1415

1400

310031

3

2

1

xxx

1)2(35352)1)(3(131

1

21

32

3

xxxx

x

Thus, the solution is

121

x

So

Elementary Linear Algebra: Section 2.4, pp.95-96

Page 61: Chapter 2 Matrices

61/61

Keywords in Section 2.4:

row elementary matrix: 列基本矩陣 row equivalent: 列等價 lower triangular matrix: 下三角矩陣 upper triangular matrix: 上三角矩陣 LU-factorization: LU 分解