Model
System of equations:
Where is , is and is .
and are given (known), is unknown.
This may not have an explicit solution if:
- Overdetermined:
- More equations than unknowns
- If the extra equations are inconsistent with the others, may fall outside .
- Ex. forms a plane in but
- Underdetermined:
- Fewer equations than unknowns
- Even though there might be infinitely many solutions if , if isn’t in the span of the few available columns, no solution exists
Objective
In this case, we want to find the vector that minimizes the distance between and .
Visualization
Such a vector is the orthogonal projection of onto the subspace spanned by .
This is from the definition of orthogonal projection.
An interesting connection with the visual is the Pythagorean theorem and triangle inequality.
Solution 1
We observe from above:
This is saying that is orthogonal to each column of .
Thus, the dot product of the columns of and the vector must be 0:
Expanding
Solution 2
Calculus approach to min the objective. TODO.