Euler Hall — free maths guides

Check that a projection matrix equals its transpose

Verify PT = P by comparing mirrored entries. The idea in plain words, a worked example, and a check with the answers shown — part of the free Linear Algebra guides.

The transpose is the cheapest test you own

Here is a matrix that projects onto a line:

P=15[1224].\def\arraystretch{1.6}P = \frac{1}{5}\begin{bmatrix}1&2\\2&4\end{bmatrix}.

Look at it for one second. The two off-diagonal entries are equal. That is not a coincidence and it is not a decoration — it is the statementPT=PP^{T} = P, and every orthogonal projection matrix has it.

Here is a matrix that also satisfiesP2=PP^2 = P:

O=[1300].O = \begin{bmatrix}1&3\\0&0\end{bmatrix}.

Its off-diagonal entries are33 and00. It is not symmetric, and it is not an orthogonal projection — it is an oblique projection, which slides a vector along the horizontal instead of dropping it perpendicular.

So symmetry is the property that distinguishes the two kinds of projection, and it is one comparison of two entries. That is the best value-per-second test in this whole chapter.

Symmetry comes free from the formula — one line of algebra

You do not have to verifyPT=PP^{T} = P by hand, because the formula forces it. WriteP=A(ATA)−1ATP = A(A^{T}A)^{-1}A^{T} and transpose the whole thing, remembering that(XYZ)T=ZTYTXT(XYZ)^{T} = Z^{T}Y^{T}X^{T}:

PT=(AT)T((ATA)−1)TAT=A ((ATA)−1)TAT.P^{T} = (A^{T})^{T}\Big((A^{T}A)^{-1}\Big)^{T}A^{T} = A\,\Big((A^{T}A)^{-1}\Big)^{T}A^{T}.

Two facts finish it. First,(ATA)T=ATA(A^{T}A)^{T} = A^{T}A, soATAA^{T}A is symmetric — you can see that from the entries, since(ATA)ij=ai⋅aj=aj⋅ai(A^{T}A)_{ij} = a_i\cdot a_j = a_j\cdot a_i. Second, the inverse of a symmetric matrix is symmetric. So((ATA)−1)T=(ATA)−1\big((A^{T}A)^{-1}\big)^{T} = (A^{T}A)^{-1} and

PT=A(ATA)−1AT=P.P^{T} = A(A^{T}A)^{-1}A^{T} = P.

The shape of the argument is worth remembering on its own: any matrix of the formMSMTM S M^{T} withSS symmetric is symmetric. The projection matrix is that pattern withS=(ATA)−1S = (A^{T}A)^{-1}.

What symmetry buys, geometrically.P2=PP^2 = P gives a splitb=Pb+(I−P)bb = Pb + (I-P)b into two pieces, but says nothing about the angle between them. Symmetry is exactly the statement that those two pieces are perpendicular:

(Pb)⋅((I−P)b)=bTPT(I−P)b=bT(P−P2)b=0.(Pb)\cdot\big((I-P)b\big) = b^{T}P^{T}(I-P)b = b^{T}\big(P - P^{2}\big)b = 0.

That usesPT=PP^{T} = P on the first step andP2=PP^2 = P on the second. Without symmetry the cross term isbT(P−P2)bb^{T}(P - P^2)b withPTP^{T} in place ofPP, and it need not vanish.

The exam's shape: find the missing entry that makes M an orthogonal projection

A matrix is claimed to be the orthogonal projection onto a line:

M=[152525k].\def\arraystretch{1.6}M = \begin{bmatrix}\frac{1}{5}&\frac{2}{5}\\[2pt]\frac{2}{5}&k\end{bmatrix}.

Symmetry is already satisfied — the off-diagonal entries agree — so the missing entry is decided by idempotence.

Route 1: the determinant. A rank-one projection is singular, sodet⁡M=0\det M = 0:

k5−425=0⟹k=45.\frac{k}{5} - \frac{4}{25} = 0 \quad\Longrightarrow\quad k = \frac{4}{5}.

Route 2: the trace. A rank-one projection has trace 1, so15+k=1\frac{1}{5} + k = 1, givingk=45k = \frac{4}{5} ✓.

Both routes agree, which is the check that the answer is right. ThenM=15[1224]\def\arraystretch{1.6}M = \frac{1}{5}\begin{bmatrix}1&2\\2&4\end{bmatrix}, which is indeedaaT/(aTa)aa^{T}/(a^{T}a) fora=(1,2)a = (1,2).

Which route to use on an exam. The trace route is instant for a2×22\times2 and a good sanity check for a3×33\times3. The determinant route generalises further, but the trace alone is not enough in3×33\times3 (three unknowns, one equation).

By the end you can
  • Verify P^T = P by comparing mirrored entries
  • Explain from (XYZ)^T = Z^T Y^T X^T why A(A^T A)^-1 A^T is always symmetric
  • Use symmetry to prove the projection and the error are perpendicular
Two questions

(a)PP is3×33\times3, symmetric, idempotent, andtrace⁡P=2\operatorname{trace}P = 2. What isrank⁡P\operatorname{rank}P, and what doesPP project onto?

(b)M=[1224]M = \begin{bmatrix}1&2\\2&4\end{bmatrix}. Is it a projection matrix? Give the decisive check.

Answers

(a)rank⁡P=2\operatorname{rank}P = 2, and it projects onto a 2-dimensional subspace ofR3\mathbb{R}^{3} — a plane through the origin.

(b) No. It is symmetric, so it passes the first test — but its determinant is4−4=04 - 4 = 0 with rank 1, and its trace is5≠15 \ne 1. A rank-one projection must have trace 1, and squaring gives[5101020]≠M\begin{bmatrix}5&10\\10&20\end{bmatrix} \ne M in any case. This is the(a,b;b,k)(a,b;b,k) pattern with the wrong denominator: the correct projection onto the line through(1,2)(1,2) is15M\frac{1}{5}M.

Work out where to start — free, no accountAnswer six real questions — free, no account