MATH 417 Lecture 23

From Notes
Jump to navigation Jump to search

« previous | Tuesday, April 15, 2014 | next »


Conjugate Gradient

Given a system

Ax=b

The solution to x is given by

x1=1a11(b1a12x2a13x3a1nxn)x2=1a22(b2a21x1a23x3a2nxn)xi=1aii(bi)xn=1ann(bnan1x2an2x3an,n1xn1)

Given x(0) (for sequence x(k)), find x(1) using x(0) in the RHS.

We have Ax=b, we have A=D+(rest).

We want Dx=RHS, where x=D1(rest).

Therefore x(k)=Tx(k1)+C

If ρ(T)<1, then limkx(k)=x.

Hence the equation for xi(k) in our matrix above is xi(k)=1aii(biai1x1(k)ai2x2(k)ai,i1x(k)ai,i+1xi+1(k1)ainxn(k1))


Quiz

Find LU decomposition for A:

A=[1103211131121231]


Method 1

[1103211131121231][1103011504170332]

and

L=[1000210031011]


[1103011504170332][110301150031300013]=U

and

L=[1000210034101301]


Method 2

If we wanted Uii=1 for i=14, we multiply row 2 by 1, row 3 by 13, and row 4 by 113 along the way. (this is where I made my mistake)


Traces back to Gauss

Objects orbit in an ellipse. An ellipse has two parameters. Suppose we have a bunch of measurements that are points close to an elliptical trajectory. We want to find an ellipse that best fits the data we have.


Given (xi,fi) for i=1n, find P(x)=ax+b such that P(xi)=fi

Let's look at the error: ei=p(xi)fi. We want to minimize e2.

Does such a minimum exist?

e22=i=1n(axi+bifi)2 is a sum of all nonnegative terms. The minimum possible value of each term is 0, so if this is the case, the line is a perfect fit.

Let g(b,a)=e22. Then the minimum of g(a,b) occurs when g=(0,0):

g=(gb,ga)=2(i=1n(axi+bfi)2),i=0n(axi+bfi)xi)


Break apart the components of g:

{ai=1nxi+bni=1nfi=0ai=1nxi2+bi=1nxii=1nxifi=0

Thus we have a system of the form:

[i=1n1i=1nxii=1nxii=1nxi2][ab]=[i=1nfii=1nxifi]


The matrix of sums is symmetric and positive definite. Observe that for the overdefined system Ax=f, we have

[i=1n1i=1nxii=1nxii=1nxi2]=ATA

and

[i=1nfii=1nxifi]=ATf

Hence

ATAx=ATf

The resulting system is called the normal equations.


Now this method works for any parameterized equation.