29
LU Factorization

LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

Embed Size (px)

Citation preview

Page 1: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

LU Factorization

Page 2: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

333231

2221

11

0

00

LLL

LL

L

L

LUA

33

2322

131211

00

0

U

UU

UUU

U

333231

232221

131211

AAA

AAA

AAA

A

Page 3: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

333231

2221

11

0

00

LLL

LL

L

33

2322

131211

00

0

U

UU

UUU

333231

232221

131211

AAA

AAA

AAA

Page 4: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

333323321331223212311131

23221321222212211121

131112111111

ULULULULULUL

ULULULULUL

ULULUL

333231

232221

131211

AAA

AAA

AAA

Page 5: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

311131 AUL 3222321231 AULUL

33333323321331 AULULUL

111111 AUL 121211 AUL 131311 AUL

2323221321 AULUL 211121 AUL 2222221221 AULUL

Equating the elements of the First Row :-

Equating the elements of the 2nd Row :-

Equating the elements of the 3rd Row :-

Page 6: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

We have 12 unknowns but only 9 equations. We need some sort of compromise.

Crout’s Method

Set 1332211 UUU

Dolittle’s Method

Set 1332211 LLL

Page 7: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

Crout's Method

U1 1 1 U

2 2 1 U3 3 1

L1 1

A1 1

U1 1

U1 2

A1 2

L1 1

U1 3

A1 3

L1 1

L2 1

A2 1

U1 1

L2 2

A2 2 L

2 1 U1 2

U2 2

U2 3

A2 3 L

2 1 U1 3

L2 2

Page 8: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

L3 1

A3 1

U1 1

L3 2

A3 2 L

3 1 U1 2

U2 2

L3 3

A3 3 L

3 1 U1 3 L

3 2 U2 3

U3 3

Page 9: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

bLy

bLUx

bAx

Solve for y, and then solve for x.

yUx

Use of LU factors in solving systems of linear equations

Page 10: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

A

2

1

3

1

1

2

3

2

4

B

13

7

5

L

2

1

3

0

0.5

3.5

0

0

25

U

1

0

0

0.5

1

0

1.5

7

1

Page 11: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

Y1

B1

L1 1

Y2

B2

L2 1 Y

1

L2 2

5

7

13

25533

0501

002

3

2

1

Y

Y

Y

.

.

Y3

B3

L3 1 Y

1 L

3 2 Y2

L3 3

Y

6.5

1

0.84

LUX = B LY = B

Page 12: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

840

1

56

100

710

51501

3

2

1

.

...

X

X

X

UX = Y

X3

Y3

U3 3

X2

Y2

U2 3 X

3

U2 2

X1

Y1

U1 2 X

2 U

1 3 X3

U1 1

X

1.8

6.88

0.84

Page 13: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

Elementary Matrices and The LU Factorization

Definition: Any matrix obtained by performing a single elementary row operation (ERO) on the identity (unit) matrix is called an elementary matrix.

There are three elementary operations:Permute rows i and j Multiply row i by a non-zero scalar k Add k times row i to row j

Page 14: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

Corresponding to the three ERO, we have then three elementary matrices:

Type 1: - permute rows i and j in In. Type 2: - multiply row i of In by a non-zero scalar k Type 3: - Add k times row i of In to row j

Page 15: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

100

001

010

12P

100

00

001

2 kkM

100

01

001

12 kkA

Permutation matrix:

Scaling matrix:

Row combination:

Page 16: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

Pre-multiplying a matrix A by an elementary matrix E has the effect of performing the corresponding ERO on A.

Example: We can multiply the First row of the matrix A by 3 (an elementary row operation). The resulting matrix will become

574

132A

574

396

Page 17: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

We can achieve the same result by pre-multiplying A by the corresponding elementary matrix.

574

396

574

132

10

0331 AM

An ERO can be performed on a matrix by pre-multiplying the matrix by a corresponding elementary matrix. Therefore, we can show that any matrix A can be reduced to a row echelon form (REF) by multiplication by a sequence of elementary matrices.

Page 18: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

RAEEE k 21

where R denotes an REF of A.

nk IAEEE 21

Since the unique reduced row echelon form (RREF) of a matrix is the unit matrix

Page 19: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

nk IAEEE 21

nIAA 1

kEEEA 211

nk IEEEA 211

Page 20: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

A nonsingular matrix can be reduced to an upper triangular matrix using elementary row operations of Type 3 only. The elementary matrices corresponding to Type 3 EROs are unit lower triangular matrices. We can write

UAEEE k 21

Page 21: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

Since each elementary matrix is nonsingular (meaning their inverse exist) we can write

UEEEEA kk1

11

21

11

UAEEE k 21

We know that the product of two lower triangular matrices is also a lower triangular matrix. Therefore

LUA 1

11

21

11

EEEEL kk

Page 22: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

Inverses of the three elementary matrices are:

kMkM ii 11

ijij PP 1

)( kAkA ijij 1

Page 23: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

Determine the LU factorization of the matrix

121

213

352

A

First, let us do the EROs to reduce A into an upper triangular matrix.

25290

2132130

352

2123

121

213

352

1312 A,A

Page 24: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

13923A

200

2132130

352

These EROs can be written in terms of their equivalent elementary matrices as

200

2132130

352

321 AEEE

2321139 123132231 AE,AE,AE

Page 25: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

200

2132130

352

U

11

12

13

EEEL

2321139 121

3131

2231

1 AE,AE,AE

11390

010

001

1021

010

001

100

0123

001

L

Page 26: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

113921

0123

001

L

200

2132130

352

113921

0123

001

A

Page 27: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

We can construct the lower triangular matrix L without multiplying the elementary matrices if we utilize the multipliers obtained while we converted matrix A into an upper triangular matrix.

2321139 123132231 AE,AE,AE

Definition: When using ERO of Type 3, the multiple of a specific row i that is subtracted from row j to put a zero in the ji position is called a multiplier, and is denoted as jim

1392123 323121 m,m,m

Page 28: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

113921

0123

001

L

1392123 323121 m,m,m

Page 29: LU Factorization. Equating the elements of the First Row :- Equating the elements of the 2nd Row :- Equating the elements of the 3rd Row :-

If we notice the unit lower triangular matrix L carefully, we see that the elements beneath the leading diagonal are just the corresponding multipliers. This relationship holds in general. Therefore, we can do elementary row operations of Type 3 to reduce A to upper triangular form and then utilize the corresponding multipliers to write L directly.