1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary...

39
1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1

Transcript of 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary...

Page 1: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

1 Operations with Matrice

2 Properties of Matrix Operations

3 The Inverse of a Matrix

4 Elementary Matrices

5 Applications of Matrix Operations

2.1

Page 2: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.2

Matrix:

nm

nmmnmmm

n

n

n

ij M

aaaa

aaaa

aaaa

aaaa

aA

][

321

3333231

2232221

1131211

(i, j)-th entry (or element): ija

number of rows: m

number of columns: n

size: m×n

Square matrix: m = n

Page 3: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.3

For [ ] and [ ] ,ij m n ij m nA a B b

Equal matrices: two matrices are equal if they have the same size (m × n) and entries corresponding to the same position are equal

if and only if for 1 , 1ij ijA B a b i m j n

Ex 1: Equality of matrices

dc

baBA

43

21

If , then 1, 2, 3, and 4A B a b c d

Page 4: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.4

Matrix addition:

If [ ] , [ ] ,ij m n ij m nA a B b

then [ ] [ ] [ ] [ ]ij m n ij m n ij ij m n ij m nA B a b a b c C

Ex 2: Matrix addition

31

50

2110

3211

21

31

10

21

2

3

1

2

3

1

22

33

11

0

0

0

Page 5: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.5

Matrix subtraction:

BABA )1(

Scalar multiplication:

If [ ] and is a constant scalar,ij m nA a c

Ex 3: Scalar multiplication and matrix subtraction

212

103

421

A

231

341

002

B

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

then [ ]ij m ncA ca

Page 6: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.6

(a)

212

103

421

33A

(b)

231

341

002

1B

(c)

231

341

002

636

309

1263

3 BA

Sol:

636

309

1263

231323

130333

432313

231

341

002

407

6410

1261

Page 7: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.7

Matrix multiplication:If [ ] and [ ] ,ij m n ij n pA a B b

then [ ] [ ] [ ] ,ij m n ij n p ij m pAB a b c C

njin

n

kjijikjikij babababac

1

2211where

size of C=AB

inijii

nnnjn

nj

nj

nnnn

inii

n

cccc

bbb

bbb

bbb

aaa

aaa

aaa

21

1

2221

1111

21

21

11211

※ The entry cij is obtained by calculating the sum of the entry-by-entry product between the ith row of A and the jth column of B

should be equal

Page 8: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.8

3 2

1 3

4 2

5 0

A

2 2

3 2

4 1B

Ex 4: Find AB

Sol:

3 2

3 2

( 1)( 3) (3)( 4) ( 1)(2) (3)(1)

(4)( 3) ( 2)( 4) (4)(2) ( 2)(1)

(5)( 3) (0)( 4) (5)(2) (0)(1)

9 1

4 6

15 10

AB

Note: (1) BA is not multipliable

(2) Even BA is multipliable, AB≠BA

Page 9: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.9

Matrix form of a system of linear equations in n variables:

mnmnmm

nn

nn

bxaxaxa

bxaxaxa

bxaxaxa

2211

22222121

11212111

= = =

A x b

equationslinear m

single matrix equation

A x b1 nnm 1m

mnmnmm

n

n

b

b

b

x

x

x

aaa

aaa

aaa

2

1

2

1

21

22221

11211

Page 10: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.10

Diagonal matrix : a square matrix in which nonzero elements are found only in the principal diagonal

),,,( 21 nddddiagA nn

n

M

d

d

d

00

00

00

2

1

※ It is the usual notation for a diagonal matrix.

Page 11: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

Keywords in Section 2.1:equality of matrices:

matrix addition:

scalar multiplication:

matrix multiplication:

row vector:

column vector:

diagonal matrix:

2.11

Page 12: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.12

2.2 Properties of Matrix Operations

Three basic matrix operators, introduced in Sec. 2.1:

(1) matrix addition

(2) scalar multiplication

(3) matrix multiplication

Zero matrix :

0 0 0

0 0 0

0 0 0

m n

m n

0

Identity matrix of order n :

1 0 0

0 1 0

0 0 1

n

n n

I

Page 13: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.13

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

If , , , and , are scalars,m nA B C M c d

Properties of matrix addition and scalar multiplication:

(Commutative property of addition)

(Associative property of addition)

(Associative property of scalar multiplication)

(Multiplicative identity property, and 1 is the multiplicative identity for all matrices)

(Distributive property of scalar multiplication over matrix addition)

(Distributive property of scalar multiplication over real-number addition)

Notes:

All above properties are very similar to the counterpart properties for real numbers

Page 14: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.14

If , and is a scalar,m nA M c

then (1) m nA A 0

(2) ( ) m n A A 0

(3) 0 or m n m n cA c A 0 0

Notes:

All above properties are very similar to the counterpart properties for the real number 0

Properties of zero matrices:

※ So, 0m×n is also called the additive identity for the set of all m×n matrices

※ Thus , –A is called the additive inverse of A

Page 15: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.15

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

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

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

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

Properties of the identity matrix:

If , then (1)

(2) m n n

m

A M AI A

I A A

Properties of matrix multiplication:(Associative property of matrix multiplication)

(Distributive property of LHS matrix multiplication over matrix addition)(Distributive property of RHS matrix multiplication over matrix addition)

※ For real numbers, the properties (2) and (3) are the same since the order for the multiplication of real numbers is irrelevant.

※ For real numbers, in addition to satisfying above properties, there is a commutative property of real-number multiplication, i.e., cd = dc.

※ For real numbers, the role of 1 is similar to the identity matrix. However, 1 is unique for real numbers and there could be many identity matrices with different sizes

Page 16: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.16

1 01 2 1 0 2

, , and 3 1 .2 1 3 2 1

2 4

A B C

Ex 3: Matrix Multiplication is Associative

Calculate (AB)C and A(BC) for

Sol:1 0

1 2 1 0 2( ) 3 1

2 1 3 2 12 4

1 05 4 0 17 4

3 11 2 3 13 14

2 4

AB C

Page 17: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.17

1 01 2 1 0 2

( ) 3 12 1 3 2 1

2 4

1 2 3 8 17 4

2 1 7 2 13 14

A BC

Page 18: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.18

Properties for Ak:

Definition of Ak : repeated multiplication of a square matrix:

1 2

matrices

, , , k

k

A A A AA A AA A

(1) AjAk = Aj+k

(2) (Aj)k = Ajk

where j and k are nonegative integers and A0 is assumed to be I

1 1

2 2

0 0 0 0

0 0 0 0

0 0 0 0

k

kk

kn n

d d

d dD D

d d

For diagonal matrices:

Page 19: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.19

11 12 1

21 22 2

1 2

If ,

n

nm n

m m mn

a a a

a a aA M

a a a

11 21 1

12 22 2

1 2

then

m

mTn m

n n mn

a a a

a a aA M

a a a

Transpose of a matrix :

※ The transpose operation is to move the entry aij (original at the position (i, j)) to the position (j, i)

※ Note that after performing the transpose operation, AT is with the size n×m

Page 20: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.20

8

2A (b)

987

654

321

A (c)

11

42

10

A

Sol: (a)

8

2A 82 TA

(b)

987

654

321

A

963

852

741TA

(c)

11

42

10

A

141

120TA

(a)

Ex 8: Find the transpose of the following matrix

Page 21: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.21

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

)()( )3( TT AccA

)( )4( TTT ABAB

Properties of transposes:

※ Properties (2) and (4) can be generalized to the sum or product of multiple matrices. For example, (A+B+C)T = AT+BT+CT and (ABC)T = CTBTAT

※ Since a real number also can be viewed as a 1 × 1 matrix, the transpose of a real number is itself, that is, for , aT = a. In other words, transpose operation has actually no function on real numbers

a R

Page 22: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.22

2 1 2

1 0 3

0 2 1

A

3 1

2 1

3 0

B

Sol:

Ex 9: Show that (AB)T and BTAT are equal

2 1 2 3 1 2 12 6 1

( ) 1 0 3 2 1 6 11 1 2

0 2 1 3 0 1 2

T T

TAB

2 1 03 2 3 2 6 1

1 0 21 1 0 1 1 2

2 3 1

T TB A

Page 23: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.23

A square matrix A is symmetric if A = AT

Ex:

6

54

321

If

cb

aA is symmetric, find a, b, c?

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

Skew-symmetric matrix :

Sol:

6

54

321

cb

aA

653

42

1

c

ba

AT

5 ,3 ,2 cba

TAA

Symmetric matrix :

Page 24: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.24

0

30

210

If

cb

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

Note: TAA must be symmetric

Pf:

symmetric is

)()(T

TTTTTT

AA

AAAAAA

Sol:

030210

cbaA

032

01

0

c

ba

AT

TAA 3 ,2 ,1 cba

Ex:

※ The matrix A could be with any size, i.e., it is not necessary for A to be a square matrix.

※ In fact, AAT must be a square matrix.

Page 25: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.25

ab = ba (Commutative property of real-number multiplication)

If , then is defined, but is undefinedm p AB BA(1)

mmmm MBAMABnpm , (3) then , If

If , , then , m m n nm p m n AB M BA M (2) (Sizes are not the same)

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

Real number:

Matrix:

BAAB pnnm

Three situations for BA:

n p m n

Before finishing this section, two properties will be discussed, which is held for real numbers, but not for matrices: the first is the commutative property of matrix multiplication and the second is the cancellation law

Page 26: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.26

12

31A

20

12B

Sol:

44

52

20

12

12

31AB

BAAB

24

70

12

31

20

12BA

Ex 4 :

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

and

(noncommutativity of matrix multiplication)

Page 27: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.27

Notes:

(1) A+B = B+A (the commutative law of matrix addition)

(2) (the matrix multiplication is not with the

commutative law) (so the order of matrix multiplication is very

important)

BAAB

※ This property is different from the property for the multiplication operations of real numbers, for which the order of multiplication is with no difference

Page 28: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.28

(Cancellation law is not necessary to be valid)

0 , cbcac

b a (Cancellation law for real numbers)

Matrix: and ( is not a zero matrix)AC BC C C 0

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

(2) If C is not invertible, then

Real number:

BA

※ Here I skip to introduce the definition of “invertible” because we will study it soon in the next section

Page 29: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.29

21

21 ,

32

42 ,

10

31CBA

Sol:

21

42

21

21

10

31AC

So, although , BCAC BA

21

42

21

21

32

42BC

Ex 5: (An example in which cancellation is not valid)

Show that AC=BC

Page 30: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

Keywords in Section 2.2:zero matrix:

identity matrix:

commutative property:

associative property: distributive property: cancellation law:

transpose matrix:

symmetric matrix:

skew-symmetric matrix: 2.30

Page 31: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.31

2.3 The Inverse of a Matrix

nnMA

if there exists a matrix such that ,n n nB M AB BA I

Note:

A square 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 :

※ The definition of the inverse of a matrix is similar to that of the inverse of a scalar, i.e., c · (1/c) = 1

※ Since there is no inverse (or said multiplicative inverse for the real number 0, you can “imagine” that noninvertible matrices act a similar role to the real number 0 is some sense

Page 32: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.32

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

Pf:

CB

CIB

CBCA

CIABC

IAB

)(

)(

Consequently, the inverse of a matrix is unique.

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

IAAAA 11 )2(

Theorem 2.7: The inverse of a matrix is unique

(associative property of matrix multiplication and the property for the identity matrix)

Page 33: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.33

Gauss-Jordan Elimination 1| |A I I A

Ex 2: Find the inverse of the matrix A

31

41A

Sol:AX I

10

01

31

41

2221

1211

xx

xx

10

01

33

44

22122111

22122111

xxxx

xxxx

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

Page 34: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.34

(1) ( 4)1,2 2,1, 1 4 1 1 0 3

(1)1 3 0 0 1 1

A A

(1) ( 4)1,2 2,1, 1 4 0 1 0 4

(2)1 3 1 0 1 1

A A

1 ,3 2111 xx

1 ,4 2212 xx

11

431AX

Thus

(2) 1304

(1) 0314

2212

2212

2111

2111

xxxx

xxxx

by equating corresponding entries

This two systems of linear equations have the same coefficient matrix, which is exactly the matrix A.

Perform the Gauss-Jordan elimination on the matrix A with the same row operations

Page 35: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.35

(1) ( 4)1,2 2,1

Gauss Jordan Elimination

,

1

1 4 1 0 1 0 3 4

1 3 0 1 0 1 1 1

A A

A I I A

※ If A cannot be row reduced to I, then A is singular

Note:

Rather than solve the two systems separately, you can solve them simultaneously by adjoining (appending) the identity matrix to the right of the coefficient matrix

11

21

solution for x

x

12

22

solution for x

x

Page 36: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.36

326101011

A

( 1)1,2

1 1 0 1 0 0

0 1 1 1 1 0

6 2 3 0 0 1

A

Sol:

100010001

326101011

IA

(6)1,3

1 1 0 1 0 0

0 1 1 1 1 0

0 4 3 6 0 1

A

( 1)3

1 1 0 1 0 0

0 1 1 1 1 0

0 0 1 2 4 1

M

( 4)2,3

1 1 0 1 0 0

0 1 1 1 1 0

0 0 1 2 4 1

A

Ex 3: Find the inverse of the following matrix

Page 37: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.37

(1)3,2

1 1 0 1 0 0

0 1 0 3 3 1

0 0 1 2 4 1

A

(1)2,1

1 0 0 2 3 1

0 1 0 3 3 1

0 0 1 1 4 1

A

So the matrix A is invertible, and its inverse is

142

133

1321A

] [ 1 AI

Check it by yourselves:

IAAAA 11

Page 38: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.38

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

then AAA 111 )( and invertible is (1)

1 1(2) is invertible and ( ) ( )k k k kA A A A

1 11(3) c is invertible if 0 and ( )A c cA A

c

Theorem 2.8: Properties of inverse matrices

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

1

1 1

Ex.

2 3 2 4 0.1 0.3

4 1 3 1 0.4 0.2

0.1 0.4( ) ( )

0.3 0.2

T

T T

A A A

A A

← “T” is not the number of power. It denotes the transpose operation

Page 39: 1 Operations with Matrice 2 Properties of Matrix Operations 3 The Inverse of a Matrix 4 Elementary Matrices 5 Applications of Matrix Operations 2.1.

2.39

Theorem 2.9: The inverse of a product If A and B are invertible matrices of order n, then AB is invertible and

111)( ABAB

1 1Thus, if is invertible, then its inverse is AB B A

Pf: 1 1 1 1 1 1 1( )( ) ( ) ( ) ( )AB B A A BB A A I A AI A AA I

Note:

(1) It can be generalized to the product of multiple matrices

(2) It is similar to the results of the transpose of the products of multiple matrices (see Slide 2.23)

11

12

13

11321

AAAAAAAA nn

1 2 3 3 2 1

T T T T Tn nA A A A A A A A

(associative property of matrix multiplication)