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(b1−a12x2−a13x3−…−a1nxn)x2=1a22(b2−a21x1−a23x3−…−a2nxn)xi=1aii(bi−…)xn=1ann(bn−an1x2−an2x3−…−an,n−1xn−1)

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→=D−1(rest).

Therefore x→(k)=Tx→(k−1)+C

If ρ(T)<1, then limk→∞x→(k)=x→.

Hence the equation for xi(k) in our matrix above is xi(k)=1aii(bi−ai1x1(k)−ai2x2(k)−…−ai,i−1x(k)−ai,i+1xi+1(k−1)−…−ainxn(k−1))


Quiz

Find LU decomposition for A:

A=[110321−113−1−12−123−1]


Method 1

[110321−113−1−12−123−1]→[11030−1−1−50−4−1−70332]

and

L=[10002100310−11]


[11030−1−1−50−4−1−70332]→[11030−1−1−500313000−13]=U

and

L=[100021003410−1−301]


Method 2

If we wanted Uii=1 for i=1…4, 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=1…n, find P(x)=ax+b such that P(xi)=fi

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

Does such a minimum exist?

‖e‖22=∑i=1n(axi+bi−fi)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)=‖e‖22. Then the minimum of g(a,b) occurs when ∇g=(0,0):

∇g=(∂g∂b,∂g∂a)=2(∑i=1n(axi+b−fi)2),∑i=0n(axi+b−fi)xi)


Break apart the components of ∇g:

{a∑i=1nxi+bn−∑i=1nfi=0a∑i=1nxi2+b∑i=1nxi−∑i=1nxifi=0

Thus we have a system of the form:

[∑i=1n1∑i=1nxi∑i=1nxi∑i=1nxi2][ab]=[∑i=1nfi∑i=1nxifi]


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

[∑i=1n1∑i=1nxi∑i=1nxi∑i=1nxi2]=ATA

and

[∑i=1nfi∑i=1nxifi]=ATf→

Hence

ATAx→=ATf→

The resulting system is called the normal equations.


Now this method works for any parameterized equation.