University of Glasgow · FACULTY OF ECONOMICS

ECON5163 Chap.2 OLS Algebra and Projection Geometry

- one subject, every graph, every model, every mark
7 Chapters3-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 2 of 11 · ECON5163

OLS Algebra and Projection Geometry

OLS Algebra and Projection Geometry treats least squares as a purely numerical problem before any probability enters. The sample mean is the least-squares summary of a vector, the normal equations generalise it to many regressors, and the fitted values are the orthogonal projection of the data onto the column space of the regressors.

Projection and residual-maker matrices make every result compact, from the residual sum of squares to the centred and adjusted R-squared and the partialling-out logic examined in the first tutorial. The unit stresses Davidson and MacKinnon's distinction between numerical properties, which hold because least squares was used, and statistical properties, which need assumptions about how the data were generated.

In this chapter

What this chapter covers

  • 01

    The sample mean as the least-squares summary of a vector

  • 02

    Normal equations and the OLS formula

  • 03

    Perfect collinearity and identification of coefficients

  • 04

    Projection and residual-maker matrices

  • 05

    Orthogonal decomposition of the data vector

  • 06

    Uncentred, centred and adjusted R-squared

  • 07

    Partialling out and reparametrisation

Worked example · free

Project a two-point data vector onto one regressor

Q [4 marks]. With x = (2, 1) and y = (3, 4), regress y on x without a constant. Find the coefficient, the fitted vector and the residual, and verify orthogonality. The marks shown are an AskSia practice weighting, not a University of Glasgow assessment scheme.
With one regressor x = (2, 1) and data y = (3, 4), least squares drops a perpendicular from y onto the span of x; the fitted vector (4, 2) and the residual (-1,With one regressor x = (2, 1) and data y = (3, 4), least squares drops a perpendicular from y onto the span of x; the fitted vector (4, 2) and the residual (-1, 2) meet at a right angle.y = (3, 4)fitted (4, 2)x = (2, 1)residual (-1, 2)span of x
With one regressor x = (2, 1) and data y = (3, 4), least squares drops a perpendicular from y onto the span of x; the fitted vector (4, 2) and the residual (-1, 2) meet at a right angle.
  • 1The coefficient is x'y / x'x = (6 + 4) / 5 = 2.
  • 2The fitted vector is 2x = (4, 2) and the residual is y minus fitted = (-1, 2).
  • 1The residual is orthogonal to x because (-1) x 2 + 2 x 1 = 0.
The fitted vector (4, 2) is the closest point to y on the line spanned by x, and the residual (-1, 2) meets that line at a right angle.
Sia tip — Check every least-squares answer by confirming that the residuals are orthogonal to each regressor.
Glossary

Key terms

Normal equations
The first-order conditions X'y = X'X beta that every OLS solution satisfies.
Projection matrix
The symmetric idempotent matrix that maps any vector onto the column space of the regressors.
Residual-maker matrix
The identity minus the projection matrix, which returns the residuals of a regression.
Adjusted R-squared
A fit measure that scales the residual share by degrees of freedom and can fall when regressors are added.
FAQ

OLS Algebra and Projection Geometry FAQ

What goes wrong under perfect collinearity?

The fitted values are still well defined, but infinitely many coefficient vectors produce them, because one regressor is an exact linear combination of others. The cross-product matrix cannot be inverted. The fix is to drop redundant columns until the regressor matrix has full column rank.

Why can adding a regressor never lower the ordinary R-squared?

The larger model can always reproduce the smaller one by setting the new coefficient to zero, so its minimised residual sum cannot be higher. That holds even for meaningless variables, which is why the adjusted version divides by remaining degrees of freedom and can fall.

What does controlling for another regressor mean algebraically?

The coefficient on one regressor equals the slope from regressing the outcome on that regressor after both have been purged of the other regressor's linear influence. Purging the outcome is optional, but purging the regressor of interest is essential.

Why does the centred R-squared need a constant in the model?

The centred measure compares the residual sum with variation around the sample mean. That comparison is guaranteed to lie between zero and one only when the vector of ones belongs to the regressor span; without a constant the model can fit worse than the mean and the measure can turn negative.

Why are the residuals orthogonal to the fitted values?

The fitted values are a linear combination of the regressors, and the normal equations make the residuals orthogonal to every regressor. Any combination of the regressors is therefore orthogonal to the residuals as well, so the data vector splits into two perpendicular pieces.

Study strategy

Exam move

Treat this chapter as the algebra you will reuse in every later proof. Start by solving the scalar least-squares problem for a sample mean, then redo it in matrix form so the notation for the vector of ones becomes familiar.

Derive the normal equations by differentiating the quadratic loss, and state the rank condition that makes the solution unique; then construct a small collinear example and show that the fitted values survive while the coefficients do not. Move to geometry next. Sketch a two-dimensional projection with invented vectors, compute the fitted vector and residual, and check the right angle numerically.

Write out the projection and residual-maker matrices for a single regressor and verify symmetry, idempotency and the ranks. Then practise the derivations that the first tutorial asks for: the two-regressor coefficients from five inner products, the residual-maker form, the three-step partialling-out procedure, and the sign of the short-regression bias when two regressors are negatively related. Finish with measures of fit.

Compute the centred and adjusted R-squared for a three-point dataset, and explain in words why adding any variable cannot raise the residual sum, while the adjusted version can still fall. A one-page summary table of quantities, symbols and projection formulas is worth writing out from memory before the exam.

Working through OLS Algebra and Projection Geometry in ECON5163? Sia is AskSia’s AI Economics tutor — ask any ECON5163 OLS Algebra and Projection Geometry question and get a clear, step-by-step explanation grounded in how ECON5163 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 26 of your subjects at University of Glasgow, plus 1,000+ more Bibles across the AskSia library.
Sia - your ECON5163 tutor, unlimited, worked the way the exam marks it
The full 3-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works