Given
Given many data points, construct a matrix equation in the form of a linear equation (this matrix equation will be overdetermined). The matrix equation below is
Goal
Using Best Approximation, find a vector in subspace
In other words,

Normal Equations
The least squares solutions to
- Turns the
equation from above and transforms it into a square matrix equation
Derivation

is the Least Squares Solution to
Normal Equation Usage
- Use when non-square matrix
- Over/Under determined
- Regression
Theorem (Unique Solutions for Least Squares)
If A is m x n
- Ax = b has a unique least squares solution for each b in Rm
- Cols of A are linearly independent
- The matrix A^T A is invertible If the above hold, the unique least square solution is
If the above conditions are not true, there may be infinitely many solutions, or some other nonunique amount of solutions, in which case you should consider
Note:
Theorem (Least Squares and QR)
Examples
Hampton Explanation for Least Squares
Let
- Essentially, minimize
is the minimal distance between the different solutions
- Goal: Find
s.t. is closest to in this context just denotes the special/unique that minimizes the distances between and
b is closer to Axhat than to Ax for all other x in Col A- If b in Col A, then xhat is…
- Seek
so that is as close to as possible, i.e. should solve Axhat = bhat