Example
Theorem
In many practical cases, has no solutions, e.g. = tall matrix (more equations than unknowns)
Let , the best approximation is to minimize minimize , i.e. Least Square Approximations
Example (Linear fit)
Find the closest line to points
Let the line:
Let and minimize
Theorem (Orthogonality principle)
Let and let be the solution to min = min , then and where is the projection matrix onto and is the solution to
Given a quadratic (二次的) equation with observations
with points, the equations for an exact fit are usually unsolvable
Least Squares: solve
A vector spaces can be spanned by different bases. A basis containing all orthogonal vectors is called an orthogonal basis.
Recall that vectors are orthogonal if
Define (Orthonormal): The vectors are orthonormal (orthogonal and normalized) if
(normalized to unit vector)
Theorem
Let where are orthonormal. Then . Moreover, if is square, then
Example
Permutation matrix is orthogonal
Example
Rotation matrix rotates a vector counterclockwise by and is orthogonal
Theorem
Orthonormal matrices preserve length of a vector, i.e.
Moreover, it preserves dot products, i.e.
Recall that for projecting a vector onto a subspace spanned by columns of they are basis for
when we have an orthogonal basis of the subspace
Then
Projection of onto a subspace is the sum of the projection of onto each orthonormal vector in the orthonormal basis of the subspace
Let
A systematic way to create orthonormal basis from an arbitrary basis
Input: ( non-zero vectors)
Output:
Step1: Let
Step2+:
Express by the newly obtained orthonormal basis
, consider the least square approximation where
Example
Determinant of matrix
Properties