Specials Methods

22
SPECIAL METHODS

Transcript of Specials Methods

Page 1: Specials Methods

SPECIAL METHODS

Page 2: Specials Methods

THOMAS METHOD

This method emerges as a simplification of an LU factorization of a tridiagonal matrix.

We know that a positive definite matrix A has a unique symmetric square root F such that :

Now if we do not insist on symmetry, there is a very large set of (non symmetric) matrices G such that :

and which may also be regarded as "square roots" of A. The positive definite matrix A is then said to be factored into the "square" of its square root.

Page 3: Specials Methods

One of these factorizations is of particular interest, both from theoretical and practical standpoints: Cholesky Decomposition, which is expressed as follows.

THOMAS METHOD

• Let A be a positive definite matrix.

Then there exists a unique lower triangular matrix L with positive diagonal elements such that : A = LL’

Page 4: Specials Methods

Based on the matrix product shown above gives the following expressions:

THOMAS METHOD

00

,

1

,11,,

1,1

1,11,

111

n

nnnnnnn

nnn

nn

nnn

cya

Where

ULbU

cU

U

aL

bU

Page 5: Specials Methods

As far as making the sweep from k = 2 to n leads to the following:

THOMAS METHOD

kkkkkkk

kkk

kk

kkk

ULbU

cU

U

aL

,11,,

1,1

1,11,

Page 6: Specials Methods

If Lux and Ux = r = d then Ld = r, therefore:

THOMAS METHOD

11,

11

2

kkkkk dLrd

nUntilkfrom

rd

Page 7: Specials Methods

Finally we solve Ux = d from a backward place:

nn

nn U

dx

Where

,

,

kk

n

kjjkjk

k U

xUd

x

untilnkfor

,

1

,11

THOMAS METHOD

Page 8: Specials Methods

Solve the following system using the method of Thomas:

Vectors are identified a, b, c and r as follows:

EXAMPLE

4

9

17

2

2

4

32

321

21

xx

xxx

xx

4

9

17

021

121

401

3

2

1

333

222

111

r

r

r

cab

cab

cab

Page 9: Specials Methods

9

7)1(*

9

21

1

9

2

9

2

3

9)4(*)2(1

4

21

2

2

1

2332333

223

22

332

1221222

112

11

221

111

ULbU

cU

U

aL

kFor

ULbU

cU

U

aL

kFor

bU

We obtain the following equalities:

EXAMPLE

Page 10: Specials Methods

Now once known L and U, Ld = r is solved by a progressive replacement:

4

9

17

192

12

1

3

2

1

d

d

d

EXAMPLE

914)25)(92(4

3

25)17)(2(9

2

17

23233

12122

11

dLrd

KPara

dLrd

KPara

rd

Page 11: Specials Methods

Finally Ux = d is solved by replacing regressive:

EXAMPLE

914

25

17

97

19

41

3

2

1

x

x

x

5

1

)3*4(17)(

12

39

)2*1(25)(

21

297

914

11

21211

22

32322

33

33

U

xUdx

nkPara

U

xUdx

nkPara

U

dx

Page 12: Specials Methods

So the solution vector is:

EXAMPLE

5

3

2

x

Page 13: Specials Methods

If A is only positive semi-definite, the diagonal elements of L can only be said to be non negative.

The Cholesky factorization can be symbolically represented by :

CHOLESKY METHODS

nnnnnnnn

nnnnnnnn

nnnnnnnn

nnn

nnn

nn

nnnn

nnnnnn

nnn

nnn

nnnnnnnn

nnnnnn

nnnn

aaaaa

aaaaa

aaaaa

aaaaa

aaaaa

L

LL

LLL

LLLL

LLLLL

LLLLL

LLLL

LLL

LL

L

,1,2,2,1,

,11,12,12,11,1

,21,22,22,21,2

,21,22,22221

,11,12,11211

,

1,1,1

2,2,12,2

2,2,12,222

1,1,11,22111

,1,2,2,1,

1,12,12,11,1

2,22,21,2

2221

11

L LT

A =LLTA

Page 14: Specials Methods

The Cholesky factorization is the prefered numerical method for calculating :

The inverse, and the determinant of a positive definite matrix (in particular of a covariance matrix), as well as for the simulation of a random multivariate normal variable.

CHOLESKY METHODS

Page 15: Specials Methods

From the product of the n-th row of L by the n-th column of LT we have:

1

1

2,

1

1

2,

2

21,

22,

22,

21,

2

221,

22,

22,

21,

n

jjnnnnn

n

jjnnnnn

nnnnnnnnnn

nnnnnnnnnn

LaL

LaL

LLLLaL

aLLLLL

CHOLESKY METHODS

Page 16: Specials Methods

1

1

2,

k

jjkkkkk LaL

Making the sweep from k = 1 to n we have:

CHOLESKY METHODS

Page 17: Specials Methods

2

1,1,1,1,

1,1

2,12,2,12,1,11,1,1,

1,1,11,2,12,2,12,1,11,

n

jjnjnnnnn

nn

nnnnnnnnnnnn

nnnnnnnnnnnnnn

LLaL

L

LLLLLLaL

aLLLLLLLL

On the other hand if we multiply the n-th row of L by the column (n-1) LT we have:

CHOLESKY METHODS

Page 18: Specials Methods

By scanning for k = 1 to n we have:

CHOLESKY METHODS

11

1

1,,,,

kiwhere

LLaLi

jjijkikik

Page 19: Specials Methods

Apply Cholesky for symmetric matrix decomposed as follows:

For k = 1:

211

121

112

A

21111 aL

EXAMPLE

Page 20: Specials Methods

For k = 2:

For k = 3:

EXAMPLE

23)21(2

12

1

22212222

11

2121

LaL

iwhenL

aL

32)61()21(2

26123

)21(*)21(1

12

1

22232

2313333

22

21313232

11

3131

LLaL

iwhenL

LLaL

iwhenL

aL

Page 21: Specials Methods

326121

02321

002

L

EXAMPLE

Finally, as a result of decomposition was found that:

Page 22: Specials Methods

BIBLIOGRAPHY

http://www.google.com.co/imgres?imgurl=http://userweb.cs.utexas.edu/~plapack/icpp98/img38.gif&imgrefurl=http://www.cs.utexas.edu/~plapack/icpp98/node2.html&usg=__lcX8ioMpUm91zLexBn6t8JE72_Q=&h=823&w=751&sz=20&hl=es&start=3&um=1&itbs=1&tbnid=cWGkKDGz2Os9EM:&tbnh=144&tbnw=131&prev=/images%3Fq%3Dcholesky%26um%3D1%26hl%3Des%26ndsp%3D20%26tbs%3Disch:1