MATH 417 Lecture 23

From Notes
Jump to navigation Jump to search

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


Conjugate Gradient

Given a system

The solution to is given by

Given (for sequence ), find using in the RHS.

We have , we have .

We want , where .

Therefore

If , then .

Hence the equation for in our matrix above is


Quiz

Find LU decomposition for :


Method 1

and


and


Method 2

If we wanted for , we multiply row 2 by , row 3 by , and row 4 by 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 for , find such that

Let's look at the error: . We want to minimize .

Does such a minimum exist?

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 . Then the minimum of occurs when :

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \nabla g = \left( \frac{\partial g}{\partial b}, \frac{\partial g}{\partial a} \right) = 2 \, \left( \sum_{i=1}^{n} \left( a \, x_i + b - f_i)^2 \right), \, \sum_{i=0}^{n} \left( a \, x_i + b - f_i \right) \, x_i \right)}


Break apart the components of Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \nabla g} :

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{cases} a \, \sum_{i=1}^n x_i + b \, n - \sum_{i=1}^n f_i = 0 \\ a \, \sum_{i=1}^n {x_i}^2 + b \, \sum_{i=1}^n x_i - \sum_{i=1}^n x_i \, f_i = 0 \end{cases}}

Thus we have a system of the form:

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{bmatrix} \sum_{i=1}^n 1 & \sum_{i=1}^n x_i \\ \sum_{i=1}^n x_i & \sum_{i=1}^n {x_i}^2 \end{bmatrix} \, \begin{bmatrix} a \\ b \end{bmatrix} = \begin{bmatrix} \sum_{i=1}^n f_i \\ \sum_{i=1}^n x_i \, f_i \end{bmatrix}}


The matrix of sums is symmetric and positive definite. Observe that for the overdefined system Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle A \, \vec{x} = \vec{f}} , we have

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{bmatrix} \sum_{i=1}^n 1 & \sum_{i=1}^n x_i \\ \sum_{i=1}^n x_i & \sum_{i=1}^n {x_i}^2 \end{bmatrix} = A^T \, A}

and

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{bmatrix} \sum_{i=1}^n f_i \\ \sum_{i=1}^n x_i \, f_i \end{bmatrix} = A^T \, \vec{f}}

Hence

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle A^T \, A \, \vec{x} = A^T \, \vec{f}}

The resulting system is called the normal equations.


Now this method works for any parameterized equation.