Orthogonal projection and least squares
A projection is the shadow of a vector on a line. Subtract the shadow to obtain a perpendicular residual. This geometric picture prepares for the later Least Squares Approximations lesson, which fits several coefficients with normal equations.
What you will learn
- Calculate a projection onto one direction
- View the residual as a perpendicular remainder
- Check the dot product is zero
A shadow and a perpendicular remainder
- Project b=(2,1,3) onto u=(1,1,0): the coefficient is (u·b)/(u·u)=3/2.
- The shadow is p=(3/2)u=(1.5,1.5,0), leaving r=(0.5,−0.5,3).
- u·r=0.5−0.5=0, so the residual is perpendicular to the line.
Objective 1: Calculate a projection onto one direction
- What is the projection coefficient in the example?
- 3/2, from (u·b)/(u·u).
Objective 2: View the residual as a perpendicular remainder
- What vector remains after subtracting the projection?
- b−p=(0.5,−0.5,3).
Objective 3: Check the dot product is zero
- Check that u·r=0.
- 0.5−0.5+0=0.
A common mistake
The fitted output is unique, but coefficients need not be unique when columns are dependent.
Review first
Continue learning
Orthogonality and least squares · Gram–Schmidt, QR and singular values
Interactive diagnosis and practice load in the learning app. You can read these lesson notes without JavaScript.