MATH 323 Lecture 21

From Notes
Jump to navigation Jump to search

« previous | Thursday, November 8, 2012 | next »


Least Squares Problem

Given subspace S and a vector v∉S, find the closest approximation pS. p is a vector projection, and p is the α-scalar projection.

When represented by Ax=b, S=R(A) is the column space of A, and x^ is the vector such that p=Ax^. We get r(x^)=bp=bAx^ is the residual vector.

Normal Equation

ATAx^=ATb

Theorem 5.3.2

A is a m×n matrix of rank n (same rank as number of columns). Then the normal equation ATAx=b has a unique solution given by

x^=(ATA)1ATb

And x^ is the unique least squares solution to the sysetm Ax=b.


Proof

Based on premise that ATA is nonsingular.

Assume we have some vector ATAz=0. For ATA to be nonsingular, z=0 must be the only solution.

We know that

  • AzN(AT)
  • AzR(A)
  • and R(A)N(AT)

Therefore

Az(R(A)N(AT))={0}

.

Q.E.D.

Corollary

We already know that p=Ax^, and x^=(ATA)1ATb, so

p=A(ATA)1ATPb

The projection matrix P is interesting because P2=P:

P2=A(ATA)1ATA(ATA)1AT=A(ATA)1AT

Example

Overdetermined system

x1+x2=32x1+3x2=12x1x2=2

A=(112321)AT=(122131)b=(312)

ATAx=ATb

x^=(81507150)

Regression

Given a set of measurements y1,,yn at points x1,,xn, each set of values defines a point at (xi,yi).

Linear Regression

Find equation such that y=c0+c1x that approximates the system of equations

[1x11x21xn][c0c1]=[y1y2yn]

Solution for Ac=y is given by ATAc=ATy


Inner Product Spaces

Vector space V. Suppose we have a function such that for all x,yV, the inner product of x,y (notation x,y) is a real number.

We want to have the following properties:

  1. x,x0 and is equal to 0 iff x=0
  2. x,y=y,x (commutativity)
  3. αx+βy,z=αx,z+βy,z and the same applies for the second component.

Example 1

n, x,y=xy is the scalar product.

Given w weights such that wi0wiw,

x,yw=i=1nwixiyi

Example 2

Given two matrices A,BMm,n(), let A,B=i=1mj=1naijbij.

Example 3

Given two functions f,gC[a,b], let f,g=abf(x)g(x)dx


  1. f,f=abf2(x)dx0 and f,f=abf2(x)dx=0f0

Properties

Given a vector space V and an inner product function ,

We can redefine:

  • length / norm: V=v,v
  • Orthogonality: uvu,v=0
  • Scalar projection: α=u,vv
  • Vector projection: p=α(1vv)=u,vv,vv

Theorem 5.4.1

The Pythagorean Law

If uv, then u+v2=u2+v2

Proof

u+v2=u+v,u+v=u,u+u,v+v,u+v,v=u2+0+0+v2


Orthogonality of Functions

1x, where the inner product is defined as f,g=11f(x)g(x)dx

1,x=111xdx=0


Theorem 5.4.2

The Cauchy-Schwarz Inequality

|u,v|uv

Holds iff u and v are linearly dependent.