University of Glasgow · FACULTY OF FINANCE

ACCFIN5277 Chap.8 Projection Matrices and Quadratic Forms

- one subject, every graph, every model, every mark
6 Chapters3-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 8 of 12 · ACCFIN5277

Projection Matrices and Quadratic Forms

Projection Matrices and Quadratic Forms explains two pieces of matrix algebra that sit underneath every regression in the course. An idempotent matrix returns itself when squared, and the identity minus an idempotent matrix is idempotent as well. Least squares uses both: the matrix X(X'X)^-1X' maps the data onto fitted values, while the identity minus that matrix produces the residuals.

The first is called a projection matrix; it is square, symmetric and idempotent, and the sum of its diagonal equals its rank, the number of independent regressor columns. The second half of the chapter turns to quadratic forms, scalars written as x'Ax that collect every weighted pairwise product of a vector's elements. Any coefficient matrix can be replaced by its symmetric average with its transpose without changing the form.

The sign of the form then classifies the matrix as positive or negative definite, semi-definite, or indefinite, and for a 2×2 matrix that classification needs only the determinant and the diagonal entries. A small hand-built projection matrix and a decision tree make both ideas checkable.

In this chapter

What this chapter covers

  • 01

    Idempotent matrices and the identity minus M

  • 02

    Least squares coefficients and conformity of dimensions

  • 03

    Projection matrix and residual maker

  • 04

    Trace equals rank for a projection

  • 05

    Quadratic forms and symmetric coefficient matrices

  • 06

    Definiteness tests for 2×2 matrices

Worked example · free

Build a projection matrix for three observations

Q [6 marks]. With an intercept and a centred signal x = (-1, 0, 1), and returns y = (2, 5, 5), compute the least squares coefficients, the projection matrix, the fitted values and the residuals, then check the trace. The marks shown are an original practice weighting, not a university allocation.
The tree classifies a symmetric 2×2 coefficient matrix: the sign of its determinant is read first, and when the determinant is positive the sign of the top-leftThe tree classifies a symmetric 2×2 coefficient matrix: the sign of its determinant is read first, and when the determinant is positive the sign of the top-left entry decides the definite case, while a zero determinant needs both diagonal signs. Symmetric 2×2 A det(A) < 0 det(A) = 0 det(A) > 0 Indefinite diagonal ≥ 0 psd diagonal ≤ 0 nsd a11 > 0 pd a11 < 0 nd
The tree classifies a symmetric 2×2 coefficient matrix: the sign of its determinant is read first, and when the determinant is positive the sign of the top-left entry decides the definite case, while a zero determinant needs both diagonal signs.
  • 2X'X = diag(3, 2) and X'y = (12, 3), so the intercept is 4 and the slope 1.5.
  • 2Each entry of P is 1/3 + x_i x_j / 2, giving rows (5/6, 1/3, -1/6), (1/3, 1/3, 1/3) and (-1/6, 1/3, 5/6).
  • 1Fitted values Py = (2.5, 4, 5.5) and residuals (I - P)y = (-0.5, 1, -0.5), whose squares sum to 1.5.
  • 1The trace of P is 5/6 + 1/3 + 5/6 = 2, equal to the two columns of X.
The fit is 4 + 1.5x, the fitted values are 2.5, 4 and 5.5, the residuals are -0.5, 1 and -0.5 with a residual sum of squares of 1.5, and the projection matrix has trace 2, matching its rank.
Sia tip — Check a projection matrix in two seconds: its diagonal must sum to the number of independent columns in X.
Glossary

Key terms

Idempotent matrix
A square matrix that is unchanged when multiplied by itself.
Residual maker
The matrix equal to the identity minus the projection matrix, which turns the data vector into least squares residuals.
Quadratic form
A scalar of the shape x'Ax that adds every pairwise product of a vector's elements, each weighted by a matrix entry.
Positive definite matrix
A symmetric matrix whose quadratic form is strictly positive for every non-null vector.
FAQ

Projection Matrices and Quadratic Forms FAQ

What makes a matrix a projection matrix rather than just idempotent?

A projection matrix in the notes is idempotent and also symmetric. Idempotence alone means applying the matrix twice changes nothing more; symmetry adds that the discarded part is perpendicular to what is kept. The least squares matrix X(X'X)^-1X' has both properties, which is why fitted values and residuals are orthogonal, and why their squared lengths add up to the squared length of the data.

Why is the trace of a projection matrix equal to its rank?

The notes state this as a property of projection matrices: summing the diagonal gives the dimension of the space the data are projected onto. In regression that dimension is the number of independent columns in X, so a fit with an intercept and one regressor gives a trace of two, which makes a fast check on any hand calculation.

Why replace A by the average of A and its transpose?

A quadratic form is a single number, so it equals its own transpose. That means only the sum of each pair of off-diagonal entries affects the value. Averaging A with its transpose keeps the form identical and produces a symmetric matrix, which is the version the definiteness tests are written for.

How do I classify a 2×2 matrix quickly?

Symmetrise it, then look at the determinant. A negative determinant means the form is indefinite. A positive determinant gives positive definite if the top-left entry is positive and negative definite if it is negative. A zero determinant gives the semi-definite cases: both diagonal entries non-negative means positive semi-definite, both non-positive means negative semi-definite.

Confirm the verdict by evaluating the form at one or two vectors.

Can I invert the projection matrix to recover the data?

No. Any idempotent matrix other than the identity is singular, because projecting discards the part of the vector that lies outside the column space of X. The residual maker discards the opposite part. Together they split the data exactly, but neither on its own can be undone, so solve for coefficients with X'X instead.

Study strategy

Assessment move

Work this chapter with small matrices you can multiply by hand. Build P for a three-observation regression, then verify three things: P squared equals P, P equals its transpose, and the diagonal sums to the number of regressors. Repeat the check in NumPy so you trust your code.

For quadratic forms, practise symmetrising a matrix first, then apply the determinant and diagonal-sign tests, and confirm each verdict by evaluating the form at two or three vectors. Keep a short list of the five definiteness classes with one example of each.

Working through Projection Matrices and Quadratic Forms in ACCFIN5277? Sia is AskSia’s AI Finance tutor — ask any ACCFIN5277 Projection Matrices and Quadratic Forms question and get a clear, step-by-step explanation grounded in how ACCFIN5277 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 ACCFIN5277 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
ACCFIN5277 · Finance Programming in Python and Databases - independent study guide on the AskSia Library. More University of Glasgow subjects · Microeconomics across all universities