45
Lecture 7 Intersection of Hyperplanes and Matrix Inverse Shang-Hua Teng

Lecture 7 Intersection of Hyperplanes and Matrix Inverse

  • Upload
    kelvin

  • View
    52

  • Download
    0

Embed Size (px)

DESCRIPTION

Lecture 7 Intersection of Hyperplanes and Matrix Inverse. Shang-Hua Teng. Elimination Methods for 2 by 2 Linear Systems. 2 by 2 linear system can be solved by eliminating the first variable from the second equation by subtracting a proper multiple of the first equation and then - PowerPoint PPT Presentation

Citation preview

Page 1: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Lecture 7Intersection of Hyperplanes and

Matrix Inverse

Shang-Hua Teng

Page 2: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Elimination Methods for 2 by 2 Linear Systems

• 2 by 2 linear system can be solved by eliminating the first variable from the second equation by subtracting a proper multiple of the first equation and then

• by backward substitution• Sometime, we need to switch the order of the first

and the second equation• Sometime we may not be able to complete the

elimination

Page 3: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Singular Systems versus Non-Singular Systems

• A singular system has no solution or infinitely many solution– Row Picture: two line are parallel or the same– Column Picture: Two column vectors are co-

linear

• A non-singular system has a unique solution– Row Picture: two non-parallel lines– Column Picture: two non-colinear column

vectors

Page 4: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Gaussian Elimination in 3D

• Using the first pivot to eliminate x from the next two equations

10732

8394

2242

zyx

zyx

zyx

Page 5: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Gaussian Elimination in 3D

• Using the second pivot to eliminate y from the third equation

125

4

2242

zy

zy

zyx

Page 6: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Gaussian Elimination in 3D

• Using the second pivot to eliminate y from the third equation

84

4

2242

z

zy

zyx

Page 7: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Now We Have a Triangular System

• From the last equation, we have

84

4

2242

z

zy

zyx

Page 8: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Backward Substitution

• And substitute z to the first two equations

2

4

2242

z

zy

zyx

Page 9: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Backward Substitution

• We can solve y

2

42

2442

z

y

yx

Page 10: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Backward Substitution

• Substitute to the first equation

2

2

2442

z

y

yx

Page 11: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Backward Substitution

• We can solve the first equation

2

2

2482

z

y

x

Page 12: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Backward Substitution

• We can solve the first equation

2

2

1

z

y

x

Page 13: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Generalization

• How to generalize to higher dimensions?

• What is the complexity of the algorithm?

• Answer:

Express Elimination with Matrices

Page 14: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Step 1Build Augmented Matrix

10732

8394

2242

zyx

zyx

zyx

Ax = b

10732

8394

2242

bA[A b]

Page 15: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Pivot 1: The elimination of column 1

1

2

10732

8394

2242

10732

4110

2242

12510

4110

2242

Page 16: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Pivot 2: The elimination of column 2

1

12510

4110

2242

8400

4110

2242

Upper triangular matrix

Page 17: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Backward Substitution 1: from the last column to the first

8400

4110

2242

Upper triangular matrix

2100

4110

2242

2100

2010

2242

2100

2010

6042

2100

2010

2002

2100

2010

1001

Page 18: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Expressing Elimination by Matrix Multiplication

Page 19: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Elementary or Elimination Matrix

• The elementary or elimination matrix

That subtracts a multiple l of row j from row i can be obtained from the identity matrix I by adding (-l) in the i,j position

jiE ,

jiE ,

10

010

001

1,3

l

E

Page 20: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Elementary or Elimination Matrix

3,33,12,32,11,31,1

3,22,21,2

3,12,11,1

3,32,31,3

3,22,21,2

3,12,11,1

3,32,31,3

3,22,21,2

3,12,11,1

1,3

10

010

001

alaalaala

aaa

aaa

aaa

aaa

aaa

laaa

aaa

aaa

E

Page 21: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Pivot 1: The elimination of column 1

12510

4110

2242

1

2

Elimination matrix

10732

8394

2242

10732

4110

2242

10732

8394

2242

100

012

001

12510

4110

2242

10732

4110

2242

101

010

001

Page 22: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

The Product of Elimination Matrices

101

012

001

100

012

001

101

010

001

111

012

001

101

012

001

110

010

001

Page 23: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Elimination by Matrix Multiplication

8400

4110

2242

10732

8394

2242

111

012

001

Page 24: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Linear Systems in Higher Dimensions

9

5

2

0

201041

10631

4321

1111

x

Page 25: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Linear Systems in Higher Dimensions

9201041

510631

24321

01111

919930

59520

23210

01111

310300

36300

23210

01111

04000

36300

23210

01111

Page 26: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Linear Systems in Higher Dimensions

04000

36300

23210

01111

01000

36300

23210

01111

01000

30300

20210

00111

01000

10100

20210

00111

01000

10100

00010

10011

01000

10100

00010

10001

Page 27: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

310300

36300

23210

01111

919930

59520

23210

01111

1030

0120

0010

0001

Booking with Elimination Matrices

919930

59520

23210

01111

9201041

510631

24321

01111

1001

0101

0011

0001

04000

36300

23210

01111

310300

36300

23210

01111

1100

0100

0010

0001

Page 28: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Multiplying Elimination Matrices

04000

36300

23210

01111

9201041

510631

24321

01111

1131

0121

0011

0001

Page 29: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Inverse Matrices

• In 1 dimension

13333

39393

11

1

xx

Page 30: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Inverse Matrices• In high dimensions

IAAAAA

bAx

bAx

11

1

1

such that? matrix a thereIs

write?Can we

Page 31: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Inverse Matrices• In 1 dimension

0 iff exists existnot does 0

1

1

a a

!!matrices!singular exist?not doesWhen 1A

• In higher dimensions

Page 32: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Some Special Matrices and Their Inverses

nn d

d

d

d

II

/1

/1

1

1

1

1

Page 33: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Inverses in Two Dimensions

ac

bd

bcaddc

ba 11

Ibcad

bcad

bcaddc

ba

ac

bd

bcad

0

011

Ibcad

bcad

bcadac

bd

bcaddc

ba

0

011

Proof:

Page 34: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Uniqueness of Inverse Matrices

CICCBABACACBBIB

CB IACIBA

:Proof

then and

Page 35: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Inverse and Linear System

bAxbAIx

bAAxA

bA

bAxA

1

1

11

1

:Proof

by given solution unique a has

theninvertible is if

Page 36: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Inverse and Linear System

• Therefore, the inverse of A exists if and only if elimination produces n non-zero pivots (row exchanges allowed)

Page 37: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Inverse, Singular Matrix and Degeneracy

Suppose there is a nonzero vector x such that Ax = 0 [column vectors of A co-linear] then A cannot have an inverse

00

:Proof11

xAAxA

Contradiction:So if A is invertible, then Ax =0 can only have the zero

solution x=0

Page 38: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

One More Property

Proof

111 ABAB

IBBBAABABAB 11111

So

1111 ABCABC

Page 39: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Gauss-Jordan Elimination for Computing A-1

• 1D1 implies 1 axax

• 2D

10

01then

1

0 and

0

1

22

11

2221

1211

2

1

2221

1211

2

1

2221

1211

yx

yx

aa

aa

y

y

aa

aa

x

x

aa

aa

Page 40: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Gauss-Jordan Elimination for Computing A-1

• 3D

100

010

001then

100

and 010

, 001

333

222

111

333231

232221

131211

3

2

1

333231

232221

131211

3

2

1

333231

232221

131211

3

2

1

333231

232221

131211

zyx

zyx

zyx

aaa

aaa

aaa

zzz

aaa

aaa

aaa

yyy

aaa

aaa

aaa

xxx

aaa

aaa

aaa

Page 41: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Gauss-Jordan Elimination for Computing A-1

• 3D: Solving three linear equations defined by A simultaneously

• n dimensions: Solving n linear equations defined by A simultaneously

11 , AIIAA

Page 42: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Example:Gauss-Jordan Elimination for Computing A-1

100

010

001

210

121

012

X

100

010

001

210

121

012

• Make a Big Augmented Matrix

Page 43: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Example:Gauss-Jordan Elimination for Computing A-1

100

010

001

210

121

012

100

012/1

001

210

12/30

012

13/23/1

012/1

001

3/400

12/30

012

Page 44: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Example:Gauss-Jordan Elimination for Computing A-1

13/23/1

012/1

001

3/400

12/30

012

13/23/1

4/32/34/3

001

3/400

02/30

012

13/23/1

4/32/34/3

2/112/3

3/400

02/30

002

Page 45: Lecture 7 Intersection of Hyperplanes and Matrix Inverse

Example:Gauss-Jordan Elimination for Computing A-1

13/23/1

4/32/34/3

2/112/3

3/400

02/30

002

4/32/14/1

2/112/1

4/12/14/3

100

010

002