The Least-Squares Solution of a Linear System (With Collinearity)
When the columns of the design matrix are linearly dependent, is singular and the standard least-squares formula does not apply. This lesson covers how to detect collinearity, how to characterize the entire family of least-squares solutions via the normal equations, and why the fitted values remain unique regardless of which solution is chosen.
Tutorial
When the Columns of $X$ Are Collinear
In the previous lesson, we computed the least-squares solution
under the assumption that the columns of the design matrix were linearly independent.
When the columns of are linearly dependent, we say that exhibits collinearity. In that case, is singular (), so does not exist and the formula above cannot be applied.
The normal equations
are still valid—any least-squares solution must satisfy them—but the system is now consistent with infinitely many solutions. There is an entire family of vectors that minimize the residual sum of squares .
To detect collinearity, we form and check whether . For instance, with
column 2 is times column 1, so the columns are linearly dependent. Computing
confirms that is singular.