ACCFIN5277 Chap.8 Projection Matrices and Quadratic Forms
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.
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
- 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.
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.
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.
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.