Download Curve fitting - least squares approximation

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts

Bra–ket notation wikipedia , lookup

List of important publications in mathematics wikipedia , lookup

Line (geometry) wikipedia , lookup

Mathematics of radio engineering wikipedia , lookup

System of polynomial equations wikipedia , lookup

Numerical continuation wikipedia , lookup

Recurrence relation wikipedia , lookup

Partial differential equation wikipedia , lookup

System of linear equations wikipedia , lookup

Transcript
CURVE FITTING - LEAST SQUARES APPROXIMATION
Example 1: Find a solution to
3


 
]
−1
2 [
4
 2 −3  x1 =  1  .
x2
−1
3
2
Solution. The augmented matrix for this system is


−1
2 4
 2 −3 1  .
−1
3 2
After applying row operations we obtain

4
−1 2
 0 1
9 .
0 0 −11
This system is inconsistent, so there isn’t a solution.

□
“Best” approximate solution to our general problem: Now, instead of looking for a solution to our given
system of linear equations (which, in general, we don’t have!) we could look for an approximate
√ solution. To this
T
end, we recall that for a given vector v = [v1 , v2 , . . . , vn ] its length is defined to be ||v|| = v12 + v22 + . . . + vn2 .
(This is a generalized version of Pythagoras’ Theorem!)
If A is an n × m matrix, x is a column vector with m entries and b is a column vector with n entries, a least
b so that the length of the vector Ab
squares solution to the equation Ax = b is a vector x
x − b, that is ||Ab
x − b||,
is as small as possible. In other words
||Ab
x − b|| ≤ ||Az − b||
for every other vector z.
How do we find this? This is answered in the following Theorem.
Theorem:
b to the system of linear equations Ax = b, where A is an n × m matrix with n > m,
The least squares solution x
b to the associated system (of m linear equations in m variables)
is a/the solution x
(AT A) x = AT b,
where AT denotes the transpose matrix of A.
(Note: the matrix AT A in the Theorem is a symmetric, square matrix of size m × m. If it is invertible, we can
then expect exactly one solution...the least squares solution!)
Example 1 (revisited): Find the least squares solution to the system of linear equations

 

]
4
−1
2 [
 2 −3  x1 =  1  .
x2
−1
3
2


[
] −1
[
]
2
−1
2 −1 
6
−11
T

2 −3 =
Solution. We have that A A =
and
2 −3
3
−11 22
−1
3
 
[
] 4
[
]
−1
2 −1  
−4
T
1 =
A b=
. So, using the Theorem, we are looking for solutions to the equation
2 −3
3
11
2
[
][
] [
]
6
−11
x1
−4
=
.
−11 22
x2
11
]
[
]
[
1 0 3
6 −11 −4
is equivalent to
. Hence the least squares solution is x
b1 = 3
The augmented matrix
−11
22 11
0 1 2
and x
b2 = 2.
□