chapter 2 matrices and linear transformations 大葉大學 資訊工程系 黃鈴玲 linear algebra

83
Chapter 2 Matrices and Linear Transformations 大大大大 大大大大大 大大大 Linear Algebra

Upload: roland-horton

Post on 16-Jan-2016

321 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Chapter 2Matrices and Linear Transformations

大葉大學 資訊工程系黃鈴玲

Linear Algebra

Page 2: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_2

2.1 Addition, Scalar Multiplication, and Multiplication of Matrices

• aij: the element of matrix A in row i and column j.

Definition

Two matrices are equal if they are of the same size and if their corresponding elements are equal.

Thus A = B if aij = bij i, j. ( 代表 for every, for all)

Page 3: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_3

Addition of Matrices

DefinitionLet A and B be matrices of the same size.

Their sum A + B is the matrix obtained by adding together the corresponding elements of A and B.

The matrix A + B will be of the same size as A and B.

If A and B are not of the same size, they cannot be added, and we say that the sum does not exist.

. then , if Thus i,jbacBAC ijijij

Page 4: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_4

Example .72

45 and ,813652 ,320

741Let

CBA

Determine A + B and A + C, if the sum exist.

Solution (自行練習 )

.1113193

831230675421

813652

320741 )1(

BA

(2) A and C are not of the same size, A + C does not exist.

Page 5: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_5

Scalar Multiplication of matricesDefinitionLet A be a matrix and c be a scalar. The scalar multiple of A by c, denoted cA, is the matrix obtained by multiplying every element of A by c. The matrix cA will be the same size as A.

Example

.027421Let

A

.09211263

03)3(37343)2(313

3

A

Observe that A and 3A are both 2 3 matrices.

., then , if Thus jicabcAB ijij

Page 6: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_6

Negation and SubtractionDefinitionThe matrix (1)C is written –C and is called the negative of C.

Example

.640182 and 563

205 Suppose

BA

.1123183

654603)1(28025

BA

We now define subtraction in terms of addition and scalar multiplication. Let

A – B = A + (–1)B

Example

263

701 then ,

263

701CC

., , then , if Thus jibacBAC ijijij

Page 7: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_7

Matrix Multiplication

26

12

)54()23(

)52()21(

5

2 43

5

2 21

5

2

43

21

Examples

2010

19614

6

102

2

002

3

5 02

6

131

2

031

3

5 31

623

105

02

31

Page 8: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_8

Example 1

exist.not does product that theShow

.36

27 ,

514

213Let

AB

BA

36

27

514

213AB

3

2 514

6

7 514

3

2 213

6

7 213

無法相乘 AB does not exist.

Sol.

Note. In general, ABBA. 如此題之 BA 存在

Page 9: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_9

njinjiji

nj

j

j

iniiij bababa

b

b

b

aaac

22112

1

21

DefinitionLet the number of columns in a matrix A be the same as the number of rows in a matrix B. The product AB then exists.

If the number of columns in A does not equal the number of row B,

we say that the product does not exist.

Let A: mn matrix, B: nk matrix,The product matrix C=AB has elements

C is a mk matrix.

Page 10: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_10

Example 2

exist. products theif , and Determine

.623

105 ,

02

31Let

BAAB

BA

623

1050231AB .

2010

91614

Sol.

Note. In general, ABBA.

BA does not exist.

2)14()23(1243

23c

105

237 and 4312 BA

Example 3

Let C = AB, Determine c23.

隨堂作業: 11(d)

隨堂作業: 5(f)

Page 11: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_11

Size of a Product MatrixIf A is an m r matrix and B is an r n matrix, then AB will be an m n matrix.

A

m r

B

r n

= AB

m n

Example

If A is a 5 6 matrix and B is an 6 7 matrix. Because A has six columns and B has six rows. Thus AB exits.And AB will be a 5 7 matrix.

隨堂作業: 8(f)

Page 12: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_12

DefinitionA zero matrix is a matrix in which all the elements are zeros.

A diagonal matrix is a square matrix in which all the elements not on the main diagonal are zeros.

An identity matrix is a diagonal matrix in which every diagonal element is 1.

matrix zero

000

000000

mn0

Amatrix diaginal

00

00

00

22

11

nna

a

a

A

matrixidentity

100

010001

nI

Special Matrices

Page 13: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_13

Theorem 2.1Let A be m n matrix and Omn be the zero m n matrix. Let B be an n n square matrix. On and In be the zero and identity n n matrices. Then

A + Omn = Omn + A = ABOn = OnB = On

BIn = InB = BExample 4

.4312 and 854

312Let

BA

AOA

854

312

000

000

854

31223

22 00

00

00

00

33

12OOB

BBI

43

12

10

01

43

122

Page 14: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_14

(a) A: mn, B: nr Let the columns of B be the matrices B1, B2, …, Br. Write B=[B1 B2 … Br]. Thus AB=A[B1 B2 … Br]=[AB1 AB2 … ABr].

120

314 and

51

02BA

Matrix multiplication in terms of columns

Example

1

3 ,

2

1 ,

0

4321 BBB

2114

628AB and

2

6 ,

11

2 ,

4

8321 ABABAB

Page 15: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_15

(b) A: mn, B: n1, where A=[A1 A2 … An] and .

We get .

5

2

3

and 584

132BA

Matrix multiplication in terms of columns

Example

5

1 ,

8

3 ,

4

2321 AAA

3

5

5

15

8

32

4

23AB

nb

b

B 1

nn

n

n AbAbAb

b

b

AAAAB

2211

1

21

Page 16: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_16

Partitioning of MatricesA matrix can be subdivided into a number of submatrices.

Example

SR

QPA

152

413

210where 15 and 2 ,

41

21 ,

3

0

SRQP

SNRM

QNPM

N

M

SR

QPAB

Example

N

MB

SR

QPA

45

12

01

and

234

203

121

Page 17: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_17

Example 5

Let

SJRH

QJPH

J

H

SR

QPAB

隨堂作業: 21(a)

.131

121 and

42

03

11

BA

Consider the following partition of A.

SR

QPA

42

03

11

Under this partition A is interpreted as a 22 matrix. For the product ABto be exist, B must be partitioned into a matrix having two rows.

Let .131

121

J

HB

2166

363

210

13141212

1310

1121

3

1

Page 18: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_18

Homework

Exercise 2.1:5, 8, 11, 17, 21

Exercise 17

Let A be a matrix whose third row is all zeros. Let B be any matrix such that the product AB exists. Prove that the third row of AB is all zeros.

Solution

. ,0 ]0 0 0[ ] [)( 2

1

2

1

332313 i

b

b

b

b

b

b

aaaAB

ni

i

i

ni

i

i

ni

Page 19: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_19

2.2 Algebraic Properties of Matrix Operations

Theorem 2.2 -1

Let A, B, and C be matrices and a, b, and c be scalars. Assume that the size of the matrices are such that the operations can be performed.

Properties of Matrix Addition and scalar Multiplication

1. A + B = B + A Commutative property of addition

2. A + (B + C) = (A + B) + C Associative property of addition

3. A + O = O + A = A (where O is the appropriate zero matrix)

4. c(A + B) = cA + cB Distributive property of addition

5. (a + b)C = aC + bC Distributive property of addition

6. (ab)C = a(bC)

Page 20: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_20

Let A, B, and C be matrices and a, b, and c be scalars. Assume that the size of the matrices are such that the operations can be performed.

Properties of Matrix Multiplication

1. A(BC) = (AB)C Associative property of multiplication

2. A(B + C) = AB + AC Distributive property of multiplication

3. (A + B)C = AC + BC Distributive property of multiplication

4. AIn = InA = A (where In is the appropriate zero matrix)

5. c(AB) = (cA)B = A(cB)

Note: AB BA in general. Multiplication of matrices is not commutative.

Theorem 2.2 -2

Page 21: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_21

13

205

12

733

54

312

.1817

2511

53101568

10216092

CBA 532

.13

20 and ,

12

73 ,

54

31Let

CBA

Example 1

Proof of Thm 2.2 (A+B=B+A)

.)()( ijijijijijij ABabbaBA Consider the (i,j)th elements of matrices A+B and B+A:

A+B=B+A

Page 22: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_22

Example 2

.1131112

201310

1321

AB

.19

014

1131112)(

CAB

.014

and ,201310 ,13

21Let

CBA Compute ABC.

Sol.

A B C = D22 23 31 21

ABC = (AB)C = A(BC)

Page 23: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_23

In algebra we know that the following cancellation laws apply.

If ab = ac and a 0 then b = c.

If pq = 0 then p = 0 or q = 0.

However the corresponding results are not true for matrices.

AB = AC does not imply that B = C.

PQ = O does not imply that P = O or Q = O.

Caution

Example

.but ,86

43 that Observe

.23

83 and ,

12

21 ,

42

21 matrices heConsider t (1)

CBACAB

CBA

. and but , that Observe

.31

62 and ,

42

21 matrices heConsider t (2)

OQOPOPQ

QP

Page 24: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_24

Powers of Matrices

Theorem 2.3

If A is an n n square matrix and r and s are nonnegative integers, then

1. ArAs = Ar+s.

2. (Ar)s = Ars.

3. A0 = In (by definition)

Definition

If A is a square matrix, then

timesk

k AAAA

Page 25: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_25

Example 3

. compute ,01

21 If 4AA

21

23

01

21

01

212A

.65

1011

21

23

21

234

A

Solution

2

2222

22

4635736257)2(3)2(

BBAABABBABBAABAABBABABBAA

注意這兩項不能合併!

Example 4 Simplify the following matrix expression.

ABBABABBAA 57)2(3)2( 22 Solution

Page 26: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_26

Systems of Linear Equations

A system of m linear equations in n variables as follows

mnmnm

nn

bxaxa

bxaxa

11

11111

Let

mnmnm

n

b

bB

x

xX

aa

aaA

11

1

111

and , ,

We can write the system of equations in the matrix form

AX = B

隨堂作業: 32(c)

Page 27: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_27

Solutions to Systems of Linear Equations

Consider a homogeneous system of linear equations AX=0. Let X1 and X2 be solutions. Then AX1=0 and AX2=0

A(X1 + X2) = AX1 + AX2 = 0 X1 + X2 is also a solution

Note. The set of solutions to a homogeneous system of linear equationsis closed under addition and under scalar multiplication. It is a subspace.

If c is a scalar, A(cX1) = cAX1 = 0 cX1 is also a solution

Page 28: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_28

Example 5

Consider the following homogeneous system of linear equations.

05

03

082

321

32

321

xxx

xx

xxx

It can be shown that there are many solutions, x1=2r, x2=3r, x3 = r.

The solutions are vectors in R3 of the form (2r, 3r, r) or r(2, 3, 1). The solutions form a subspace of R3 of dimension 1.

Figure 2.4

Note. x1=0, …, xn = 0, is a solution to every homogeneous system. The set of solutions to every homogeneous system passes through the origin.

隨堂作業: 36(a)

Page 29: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_29

Solutions to Nonhomogeneous systems

Let AX=Y be a nonhomogeneous system of linear equations, so Y0. Let X1 and X2 be two solutions. Then AX1=Y and AX2=Y

A(X1 + X2) = AX1 + AX2 = 2Y X1 + X2 is not a solution.

( 可省略 ) If c is a scalar, A(cX1) = cAX1 = cY cX1 is not a solution.

Exercise 41

Show that a set of solutions to a system of nonhomogeneous linear equations is not closed under addition or under scalar multiplication, and that it is thus not a subspace of Rn.

Proof

The set of solutions is not a subspace of Rn.

Page 30: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Example

Ch2_30

65

23

882

321

32

321

xxx

xx

xxxConsider the following nonhomogeneous system of linear equations.

The general solution of this system is (2r+4, 3r+2, r).

(2r+4, 3r+2, r) = r(2, 3, 1)+(4, 2, 0)

Note that r(2, 3, 1) is the general solution of the corresponding homogeneous system. The vector (4, 2, 0) is the specific solution to the nonhomogeneous system corresponding to r=0.

Figure 2.5 隨堂作業: 40

Page 31: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_31

Idempotent and Nilpotent Matrices(Exercise 24~30)

Definition

(1) A square matrix A is said to be idempotent ( 等冪 ) if A2=A.(2) A square matrix A is said to nilpotent ( 冪零 ) if there is a

positive integer p such that Ap=0. The least integer p such that Ap=0 is called the degree of nilpotency of the matrix.

.21

63 ,

21

63 (1) 2 AAA

Example

2 :nilpotency of degree The .00

00 ,

31

93 (2) 2

BB

隨堂作業: 28, 29(b)

Page 32: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_32

Homework

Exercise 2.2:6, 13, 21, 25, 27, 28, 29, 32, 36, 40, 41

Exercise 21

A, B: diagonal matrix of the same size, c: scalar Prove that A+B and cA are diagonal matrices.

Page 33: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_33

Homework

Exercise 25

Determine b, c, and d such that is idempotent.

Exercise 27

Prove that if A and B are idempotent and AB=BA, then AB is idempotent.

dc

b1

Page 34: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_34

2.3 Symmetric Matrices

DefinitionThe transpose (轉置 ) of a matrix A, denoted At, is the matrix whose columns are the rows of the given matrix A.

Example 1

.431 and ,654721 ,08

72

CBA

07

82tA

675241

tB .431

tC

jiAAmnAnmA jiijtt ., )( ,: : i.e.,

Page 35: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_35

Theorem 2.4 Properties of TransposeLet A and B be matrices and c be a scalar. Assume that the sizes of the matrices are such that the operations can be performed.

1. (A + B)t = At + Bt Transpose of a sum

2. (cA)t = cAt Transpose of a scalar multiple

3. (AB)t = BtAt Transpose of a product

4. (At)t = A

Page 36: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_36

nijnijij

ni

i

i

jnjjjiijt

bababa

b

b

b

aaaABAB

2211

2

1

21

)()(

Theorem 2.4 Properties of Transpose

Proof for 3. (AB)t = BtAt

nijnijij

jn

j

j

niii

ttttij

tt

bababa

a

a

a

bbb

AjBiAjBiAB

2211

2

1

21

] of [row ] of column [] of [column ] of row[)(

Page 37: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_37

Symmetric Matrix

6394323293704201

384871410

4552

match

match

DefinitionA symmetric matrix is a matrix that is equal to its transpose.

jiaaAA jiijt , i.e., ,

Example

隨堂作業: 2(c)

Page 38: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_38

Example 3

Let C = aA+bB, where a and b are scalars.

Ct = (aA+bB)t

= (aA)t + (bB)t by Thm 2.4 (1) = aAt + bBt by Thm 2.4 (2)

= aA + bB since A and B are symmetric

= C

Thus C is symmetric.

Proof

Let A and B be symmetric matrices of the same size. Let C be a linear combination of A and B. Prove that the product C is symmetric.

Page 39: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_39

If and only if

Let p and q be statements.Suppose that p implies q (if p then q), written p q,and that also q p, we say that

“p if and only if q” ( 若且唯若 ) ( 通常簡寫為 iff ) ( 也說成 : p is necessary and sufficient for q )

Page 40: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_40

Example 4

*We have to show (a) AB is symmetric AB = BA, and the converse, (b) AB is symmetric AB = BA.

() Let AB be symmetric, then

AB= (AB)t by definition of symmetric matrix

= BtAt by Thm 2.4 (3) = BA since A and B are symmetric

() Let AB = BA, then

(AB)t = (BA)t

= AtBt by Thm 2.4 (3)

= AB since A and B are symmetric

Proof

Let A and B be symmetric matrices of the same size. Prove that the product AB is symmetric if and only if AB = BA.

Page 41: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_41

Example 3 相關題目

Proof

Let A be a symmetric matrix. Prove that A2 is symmetric.

tA )( 2 tAA)( )( tt AA 2AAA

Page 42: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_42

DefinitionLet A be a square matrix. The trace of A, denoted tr(A) is the sum of the diagonal elements of A. Thus if A is an n n matrix.

tr(A) = a11 + a22 + … + ann

Example 5

Determine the trace of the matrix .037652214

A

Solution

We get.10)5(4)( Atr

隨堂作業: 15(b)

Trace of a matrix

Page 43: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_43

Theorem 2.5 Properties of TraceLet A and B be matrices and c be a scalar. Assume that the sizes of the matrices are such that the operations can be performed.

1. tr(A + B) = tr(A) + tr(B)

2. tr(AB) = tr(BA)

3. tr(cA) = c tr (A)

4. tr(At) = tr(A)

Since the diagonal element of A + B are (a11+b11), (a22+b22), …, (ann+bnn), we get

tr(A + B) = (a11 + b11) + (a22 + b22) + …+ (ann + bnn)

= (a11 + a22 + … + ann) + (b11 + b22 + … + bnn)

= tr(A) + tr(B).

Proof of (1)

Page 44: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_44

Example of (2) tr(AB)=tr(BA)

101

123 ,

21

02

31

BA

52

118 ,

121

246

220

BAAB

)( 3)( BAtrABtr

Page 45: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_45

Matrices with Complex ElementsThe element of a matrix may be complex numbers. A complex number is of the form

z = a + bi

Where a and b are real numbers and a is called the real part and b the imaginary part (虛部 ) of z.

.1i

The conjugate (共軛複數 ) of a complex number z = a + bi isdefined and written z = a bi.

Page 46: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_46

Example 7.321

23 and 54232Let

ii

iBiiiA

Compute A + B, 2A, and AB.

Solution

ii

i

iii

iii

ii

i

i

iiBA

825

35

32514

22332

321

23

54

232

i

ii

i

iiA

108

4624

54

23222

ii

ii

iiiii

iiiiiii

ii

i

i

iiAB

181557

910411

)32)(5()2(4)1)(5()3)(4(

)32)(23()2)(2()1)(23(3)2(

321

23

54

232

Page 47: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_47

Definition(i) The conjugate of a matrix A is denoted A and is obtained by taking the conjugate of each element of the matrix.

(ii) The conjugate transpose of A is written and defined by A*=A

t.

(iii) A square matrix C is said to be hermitian if C=C*.

i

iiA

76

4132

Example (i), (ii)

i

iiA

76

4132

ii

iAA

t

741

632*

Example (iii)

*

643

432C

i

iC

隨堂作業: 23

Page 48: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_48

Homework

Exercise 2.3:2, 5, 11, 15, 23

Exercise 11

A matrix A is said to be antisymmetric if A = At. (a) give an example of an antisymmetric matrix.(b) Prove that an antisymmetric matrix is a square matrix having diagonal elements zero.(c) Prove that the sum of two antisymmetric matrices of the same size is an antisymmetric matrix.

Page 49: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_49

2.4 The Inverse of a Matrix

DefinitionLet A be an n n matrix. If a matrix B can be found such that AB = BA = In, then A is said to be invertible ( 可逆 ) and B is called the inverse ( 反矩陣 ) of A. If such a matrix B does not exist, then A has no inverse. (denote B = A1, and Ak=(A1)k )

43

21AExample 1Prove that the matrix has inverse .

12

2

1

2

3

B

Proof

221

23 10

01124321 IAB

221

23 10

01432112

IBA

Thus AB = BA = I2, proving that the matrix A has inverse B.

Page 50: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_50

Theorem 2.7If a matrix has an inverse, that inverse is unique.

Proof

Let B and C be inverses of A.

Thus AB = BA = In, and AC = CA = In.

Multiply both sides of the equation AB = In by C.

C(AB) = CIn

(CA)B = C

InB = C

B = C

Thus an invertible matrix has only one inverse.

Thm2.2 乘法結合律

Page 51: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_51

Let A be an invertible nn matrixHow to find A-1?

. ,Let 21211

nnn CCCIXXXA

We shall find A1 by finding X1, X2, …, Xn.

Since AA1 =In, then .2121 nn CCCXXXA

.,, , i.e., 2211 nn CAXCAXCAX

Solve these systems by using Gauss-Jordan elimination:

.:

::matrix augmented

21

21

nn

n

XXXI

CCCA

.:: 1 AIIA nn

Note. 若是最後沒有變成 [In:B] 的形式,則 A1 不存在。

Page 52: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_52

Gauss-Jordan Elimination for finding the Inverse of a Matrix

Let A be an n n matrix.

1. Adjoin the identity n n matrix In to A to form the matrix [A : In].

2. Compute the reduced echelon form of [A : In].

If the reduced echelon form is of the type [In : B], then B is the inverse of A.

If the reduced echelon form is not of the type [In : B], in that the first n n submatrix is not In, then A has no inverse.

An n n matrix A is invertible if and only if its reduced echelon form is In.

Page 53: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_53

Example 2

Determine the inverse of the matrix

531532211

A

Solution

100531010532001211

]:[ 3IA

101320012110001211

1RR1R3

2)(R2

101320012110001211

R2)1(

123100012110013101

R2)2(R3R2R1

.123135110

Thus, 1

A

隨堂作業: 4(a), 14

123100135010010001

R3)1(R2R3R1

1

Page 54: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_54

135000011210012301

3R2R3R2)1(R1

Example 3Determine the inverse of the following matrix, if it exist.

412721511

A

Solution

100412010721001511

]:[ 3IA

102630011210001511

R1)2(R31)R1(R2

There is no need to proceed further. The reduced echelon form cannot have a one in the (3, 3) location. The reduced echelon form cannot be of the form [In : B]. Thus A–1 does not exist. 隨堂作業: 4(c)

Page 55: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_55

Properties of Matrix Inverse

Let A and B be invertible matrices and c a nonzero scalar, Then

AA 11)( 1.11 1

)( .2 Ac

cA111)( .3 ABAB

nn AA )()( .4 11 tt AA )()( .5 11

Proof

1. By definition, AA1=A1A=I.

))(())(( .2 11 11 cAAIAcA cc

))(( )())(( .3 1111111 ABABIAAABBAABAB nn

nn

nn AAIAAAAAA )( )( .4 1

times

11

times

1

,)( )( ,

,)( )( , .5111

111

IAAAAIAA

IAAAAIAAttt

ttt

Page 56: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_56

Example 4

.)( compute n toinformatio

this Use.4311 shown that becan it then ,13

14 If

1

1

tA

AA

Solution

.)()(41

31

43

1111

ttt AA

隨堂作業: 15,19

Page 57: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_57

Theorem 2.8

Let AX = Y be a system of n linear equations in n variables. If A–1 exists, the solution is unique and is given by X = A–1Y.

Proof

(X = A–1Y is a solution.)Substitute X = A–1Y into the matrix equation.

AX = A(A–1Y) = (AA–1)Y = InY = Y.

(The solution is unique.)Let X1 be any solution, thus AX1 = Y. Multiplying both sides of this equation by A–1 gives

A–1AX1= A–1Y InX1 = A–1YX1 = A–1Y.

Page 58: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_58

Example 5

Solve the system of equations

253353212

321

321

321

xxxxxxxxx

SolutionThis system can be written in the following matrix form:

231

531532211

3

2

1

xxx

If the matrix of coefficients is invertible, the unique solution is

231

531532211

1

3

2

1

xxx

This inverse has already been found in Example 2. We get

121

231

123135110

3

2

1

xxx

.1 ,2 ,1 issolution unique The 321 xxx

Page 59: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_59

Elementary Matrices

Definition An elementary matrix is one that can be obtained from the identity matrix In through a single elementary row operation.

Example

100

010

001

3I

010

100

001

1ER2 R3

100

050

001

2E5R2

100

012

001

3ER2+ 2R1

Page 60: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_60

Elementary Matrices

ihg

fed

cba

A

AEA

fed

ihg

cba

1

010

100

001

R2 R3

AEA

ihg

fed

cba

2

100

050

001

555

5R2

AEA

ihg

cfbead

cba

3

100

012

001

222

R2+ 2R1

一個矩陣做 elementary row operation ,相當於在左邊乘一個對應的 elementary matrix 。

Page 61: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_61

Notes for elementary matricesEach elementary matrix is square and invertible.

Example

If A and B are row equivalent matrices and A is invertible, then B is invertible.

Proof

If A … B, thenB=En … E2 E1 A for some elementary matrices En, … , E2 and E1. So B1 = (En … E2 E1A)1 =A1E1

1 E21 … En

1.

1221EI

RR

100

010

021

1E

100

010

001

I

100

010

021

2E

, 221

1 IERR IEE 12 i.e.,

Page 62: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_62

Homework

Exercise 2.4:4, 7, 14, 15, 19, 21, 28

dc

baA

( 後面的 section 2.5~2.7 都跳過 )

Exercise 7

If , show that .)(

11

ac

bd

bcadA

(求 22 之反矩陣,此公式較快)

Page 63: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_63

Homework

Exercise 21

Prove that (AtBt)1 = (A1B1)t.

Exercise 28

True or False:(a) If A is invertible A1 is invertible.(b) If A is invertible A2 is invertible.(c) If A has a zero on the main diagonal it is not invertible.(d) If A is not invertible then AB is not invertible.(e) A1 is row equivalent to In.

Page 64: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

2.5 Matrix Transformations, Rotations, and Dilations

Ch2_64

A function, or transformation, is a rule that assigns to each element of a set a unique element of another set.

We will be especially interested in linear transformations, which are transformations that preserve the mathematical structure of a vector space.

Consider the function f(x) =3x2+4.

domain ( 定義域 ) of the function: the set of all possible x

f(2)=16, we say that the image of 2 is 16.

Extend these ideas to functions between vector spaces

We usually use the term transformation rather than function in linear algebra.

Page 65: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_65

Consider the transformation T maps R3 into R2 defined byT(x, y, z) = (2x, yz)

The domain of T is R3 and we say the codomain ( 對應域 ) is R2.

T(1, 4, 2) = (2, 6) The image of (1, 4, 2) is (2, 6).

Convenient representations:

zyx

zyx

T 2 , and the image of .62 is

241

Page 66: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_66

DefinitionA transformation T of Rn into Rm is a rule that assigns to each vector u in Rn a unique vector v in Rm. Rn is called the domain of T and Rm is the codomain. We write T(u) = v; v is the image of u under T. The term mapping is also used for a transformation.

Page 67: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Dilation( 擴張 ) and Contraction( 收縮 )

Ch2_67

Consider the transformation , where r > 0.

yxry

xT

Figure 2.11

This equation can be written as the following useful matrix form.

yx

rr

yxT 0

0

Page 68: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Reflection( 反射 )

Ch2_68

Consider the transformation . T is called a reflection.

yx

yxT

This equation can be written as the following useful matrix form.

yx

yxT 10

01

Figure 2.12

Page 69: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Matrix transformationsEvery matrix defines a transformation. Let A be a matrix and x be a column vector such that Ax exists. Then A defines the matrix transformation T(x) = Ax.

For example, defines

140

235A

zyx

zyx

T 140235

86

431

T

2

14

213

T and

Ch2_69Figure 2.14 Matrix transformations.

2

14

213, written as

86

431, written as

隨堂作業: 1

Page 70: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Definition

Ch2_70

Let A be an mn matrix. Let x be an element of Rn written in a column matrix form. A defines a matrix transformation T(x)=Ax of Rn into Rm. The vector Ax is the image of x. The domain of the transformation is Rn and codomain is Rm.

We write T: Rn Rm if T maps Rn into Rm.

Geometrical Properties:Matrix transformations maps line segments ( 線段 ) into line segments (or points). If the matrix is invertible ( 可逆 ) the transformation also maps parallel lines into parallel lines.

Page 71: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Example 1

Ch2_71

Consider the transformation T: R2 R2 defined by the matrix . Determine the image of the unit square under this

transformation.

32

24A

Sol.

0

0 ,

1

0 ,

1

1 ,

0

1ORQP

The unit square is the square whose vertices are the points

3

2

1

0

32

24 ,

5

6

1

1

32

24 ,

2

4

0

1

32

24

Since

Page 72: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_72

0

0

0

0 ,

3

2

1

0 ,

5

6

1

1 ,

2

4

0

1

OOR'RQ'QP'PThe images are:

Figure 2.15

The square PQRO is mapped into the parallelogram P’Q’R’O.

Page 73: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Composition( 合成 ) of Transformations

Ch2_73

Figure 2.16

Consider the matrix transformations T1(x)=A1x and T2(x)=A2x. The composite transformation T=T2 T1 is given by T(x) = T2(T1(x)) = T2 (A1x) =A2A1xThus T is defined by the matrix product A2A1. T(x) = A2A1x

隨堂作業: 10(a)

Page 74: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_74

Homework

Exercise 2.5:1, 10

Page 75: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

2.6 Linear TransformationsA vector space has two operations: addition and scalar multiplication.Consider the matrix transformation T(u)=Au. T(u+v) = A(u+v) = Au+Av = T(u)+T(v)

Definition Let u and v be vectors in Rn and let c be a scalar. A transformation T: Rn → Rm is said to be a linear transformation if T(u + v) = T(u) + T(v) and T(cu) = cT(u).

uT T(u

)

T(v)v

u+v T(u+v) = T(u)+T(v)

u cu TT(cu) = cT(u)

T(u)

T(cu) = A(cu) = cAu = cT(u)

Ch2_75

Page 76: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Example 1Prove that the following transformation T: R2 → R2 is linear.

T(x, y) = (x y, 3x)Solution“+”: Let (x1, y1) and (x2, y2) R2. Then

T((x1, y1) + (x2, y2)) = T(x1 + x2, y1 + y2) = (x1 + x2 y1 y2, 3x1 + 3x2) = (x1 y1, 3x1) + (x2 y2, 3x2) = T(x1, y1) + T(x2, y2)

“”: Let c be a scalar.T(c(x1, y1)) = T(cx1, cy1) = (cx1 cy1, 3cx1)

= c(x1 y1, 3x1) = cT(x1, y1)

Thus T is linear.Note A linear transformation T: U → U is called a linear operator.

Ch2_76

隨堂作業: 1

Page 77: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Example 2Show that the following transformation T: R3 → R2 is not linear.

T(x, y, z) = (xy, z)Solution“+”: Let (x1, y1, z1) and (x2, y2, z2) R3. Then T((x1, y1, z1) + (x2, y2, z2)) = T(x1 + x2 , y1 + y2 , z1 + z2) = ((x1 + x2)(y1 y2), z1 + z2)

T is not linear.

and T(x1, y1, z1) + T(x2, y2, z2) = (x1y1, z1) + (x2y2, z2)

Thus, in general T((x1, y1, z1) + (x2, y2, z2)) T(x1, y1, z1) + T(x2, y2, z2).

Ch2_77隨堂作業: 4(b)

Page 78: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Example 3Determine a matrix A that describes the linear transformation

yyx

yxT

32

)(

SolutionIt can be shown that T is linear. The domain of T is R2.We find the effect of T on the standard basis of R2.

02)0

1(T and

31)1

0(T

30

12A

T can be written as

yx

yxT 30

12)(

Why? See the next page.

Ch2_78

Page 79: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Let T: Rn → Rm be a linear transformation. {e1, e2, …, en} be the standard basis of Rn, and u be an arbitrary vector in Rn.

n

n

a

a

1

1

1

0

,,

0

1

uee

Matrix Representation

Express u in terms of the basis, u = a1e1+a2e2+ … + anen.

Since T is a linear transformation,

T(u) = T(a1e1+ a2e2 + … + anen) = T(a1e1) + T(a2e2) + …+ T(anen) = a1T(e1) + a2T(e2) + …+ anT(en)

])()()([1

21

n

n

a

a

TTT eee

Ch2_79

Page 80: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Thus the linear transformation T is defined by the matrix

A = [ T(e1) … T(en) ].

A is called the standard matrix of T.

Ch2_80

Page 81: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Example 4The transformation defines a reflection in the line y = x.It can be shown that T is linear. Determine the standard matrix of this transformation. Find the image of .

yyx

yxT

32

)(

SolutionWe find the effect of T on the standard basis.

10)0

1(T and

01)1

0(T

0110A

T can be written as

yx

yxT 01

10)(

Ch2_81

14

41

14

0110)1

4(T

Page 82: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_82

Figure 2.22

隨堂作業: 12

Page 83: Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 Linear Algebra

Ch2_83

Homework

Exercise 2.6:1, 4, 12

(2.7~2.9 節跳過 )