lecture 7 intersection of hyperplanes and matrix inverse shang-hua teng

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

Upload: sheila-barnett

Post on 17-Dec-2015

226 views

Category:

Documents


1 download

TRANSCRIPT

Lecture 7Intersection 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

• 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

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

Gaussian Elimination in 3D

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

10732

8394

2242

zyx

zyx

zyx

Gaussian Elimination in 3D

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

125

4

2242

zy

zy

zyx

Gaussian Elimination in 3D

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

84

4

2242

z

zy

zyx

Now We Have a Triangular System

• From the last equation, we have

84

4

2242

z

zy

zyx

Backward Substitution

• And substitute z to the first two equations

2

4

2242

z

zy

zyx

Backward Substitution

• We can solve y

2

42

2442

z

y

yx

Backward Substitution

• Substitute to the first equation

2

2

2442

z

y

yx

Backward Substitution

• We can solve the first equation

2

2

2482

z

y

x

Backward Substitution

• We can solve the first equation

2

2

1

z

y

x

Generalization

• How to generalize to higher dimensions?

• What is the complexity of the algorithm?

• Answer:

Express Elimination with Matrices

Step 1Build Augmented Matrix

10732

8394

2242

zyx

zyx

zyx

Ax = b

10732

8394

2242

bA[A b]

Pivot 1: The elimination of column 1

1

2

10732

8394

2242

10732

4110

2242

12510

4110

2242

Pivot 2: The elimination of column 2

1

12510

4110

2242

8400

4110

2242

Upper triangular matrix

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

Expressing Elimination by Matrix Multiplication

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

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

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

The Product of Elimination Matrices

101

012

001

100

012

001

101

010

001

111

012

001

101

012

001

110

010

001

Elimination by Matrix Multiplication

8400

4110

2242

10732

8394

2242

111

012

001

Linear Systems in Higher Dimensions

9

5

2

0

201041

10631

4321

1111

x

Linear Systems in Higher Dimensions

9201041

510631

24321

01111

919930

59520

23210

01111

310300

36300

23210

01111

04000

36300

23210

01111

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

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

Multiplying Elimination Matrices

04000

36300

23210

01111

9201041

510631

24321

01111

1131

0121

0011

0001

Inverse Matrices

• In 1 dimension

13333

39393

11

1

xx

Inverse Matrices• In high dimensions

IAAAAA

bAx

bAx

11

1

1

such that? matrix a thereIs

write?Can we

Inverse Matrices• In 1 dimension

0 iff exists existnot does 0

1

1

a a

!!matrices!singular exist?not doesWhen 1A

• In higher dimensions

Some Special Matrices and Their Inverses

nn d

d

d

d

II

/1

/1

1

1

1

1

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:

Uniqueness of Inverse Matrices

CICCBABACACBBIB

CB IACIBA

:Proof

then and

Inverse and Linear System

bAxbAIx

bAAxA

bA

bAxA

1

1

11

1

:Proof

by given solution unique a has

theninvertible is if

Inverse and Linear System

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

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

One More Property

Proof

111 ABAB

IBBBAABABAB 11111

So

1111 ABCABC

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

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

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

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

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

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

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