From a Projection to Two Matrix Identities
A projection leaves the part of a vector already in a subspace unchanged and removes the part outside it. For an orthogonal projection, that removed part lies in the orthogonal complement of the subspace. The corresponding matrix has two characteristic properties: applying it twice has the same effect as applying it once, and transposing it does not change it. The first property expresses the act of projecting; the second distinguishes an orthogonal projection from other kinds of projection.
Throughout, matrices act on column vectors in \(\mathbb{R}^n\), and orthogonality uses the dot product \(\mathbf{x}\cdot\mathbf{y}=\mathbf{x}^{\top}\mathbf{y}\). For a subspace \(U\subseteq\mathbb{R}^n\), its orthogonal complement is \(U^\perp=\{\mathbf{z}\in\mathbb{R}^n:\mathbf{z}\cdot\mathbf{u}=0\text{ for every }\mathbf{u}\in U\}\). The orthogonal decomposition theorem says that each \(\mathbf{x}\in\mathbb{R}^n\) has a unique expression \(\mathbf{x}=\mathbf{u}+\mathbf{z}\), where \(\mathbf{u}\in U\) and \(\mathbf{z}\in U^\perp\).
These matrix conditions express different features. If \(\mathbf{P}\) is a projection, its output is already in \(U\), where another projection does nothing; this leads to idempotence. Symmetry reflects that the part retained and the part removed are orthogonal. The characterization below proves both implications and states precisely which subspaces are encoded by the matrix.
Proof. First suppose \(\mathbf{P}\) represents the orthogonal projection onto \(U\). For every \(\mathbf{x}\), the vector \(\mathbf{P}\mathbf{x}\) lies in \(U\), and projecting a vector in \(U\) leaves it unchanged. Hence \(\mathbf{P}(\mathbf{P}\mathbf{x})=\mathbf{P}\mathbf{x}\) for every \(\mathbf{x}\), which gives \(\mathbf{P}^2=\mathbf{P}\). Also, write \(\mathbf{x}=\mathbf{u}+\mathbf{z}\) and \(\mathbf{y}=\mathbf{v}+\mathbf{w}\), with \(\mathbf{u},\mathbf{v}\in U\) and \(\mathbf{z},\mathbf{w}\in U^\perp\). Then \(\mathbf{P}\mathbf{x}=\mathbf{u}\) and \(\mathbf{P}\mathbf{y}=\mathbf{v}\), so \(\langle\mathbf{P}\mathbf{x},\mathbf{y}\rangle=\mathbf{u}\cdot(\mathbf{v}+\mathbf{w})=\mathbf{u}\cdot\mathbf{v}\) and \(\langle\mathbf{x},\mathbf{P}\mathbf{y}\rangle=(\mathbf{u}+\mathbf{z})\cdot\mathbf{v}=\mathbf{u}\cdot\mathbf{v}\). Thus \(\mathbf{x}^{\top}\mathbf{P}^{\top}\mathbf{y}=\mathbf{x}^{\top}\mathbf{P}\mathbf{y}\) for all \(\mathbf{x},\mathbf{y}\). Taking \(\mathbf{x}\) and \(\mathbf{y}\) to be standard basis vectors shows that every entry of \(\mathbf{P}^{\top}-\mathbf{P}\) is zero, so \(\mathbf{P}^{\top}=\mathbf{P}\). The image is \(U\): every output lies in \(U\), and every \(\mathbf{u}\in U\) is the output of \(\mathbf{u}\) itself. The null space is \(U^\perp\): \(\mathbf{P}\mathbf{x}=\mathbf{0}\) exactly when the \(U\)-component of \(\mathbf{x}\) is zero, which means \(\mathbf{x}\in U^\perp\).
Conversely, suppose \(\mathbf{P}^2=\mathbf{P}\) and \(\mathbf{P}^{\top}=\mathbf{P}\), and set \(U=\operatorname{im}T=\operatorname{Col}\mathbf{P}\). We first prove \(\ker T=U^\perp\). If \(\mathbf{z}\in\ker T\) and \(\mathbf{u}\in U\), then \(\mathbf{u}=\mathbf{P}\mathbf{y}\) for some \(\mathbf{y}\), and \(\mathbf{u}\cdot\mathbf{z}=(\mathbf{P}\mathbf{y})^{\top}\mathbf{z}=\mathbf{y}^{\top}\mathbf{P}^{\top}\mathbf{z}=\mathbf{y}^{\top}\mathbf{P}\mathbf{z}=0\). Thus \(\ker T\subseteq U^\perp\). If instead \(\mathbf{z}\in U^\perp\), then \(\mathbf{P}\mathbf{z}\in U\), so \(\mathbf{z}\cdot\mathbf{P}\mathbf{z}=0\). Symmetry and idempotence give \(\|\mathbf{P}\mathbf{z}\|^2=\mathbf{z}^{\top}\mathbf{P}^{\top}\mathbf{P}\mathbf{z}=\mathbf{z}^{\top}\mathbf{P}^2\mathbf{z}=\mathbf{z}^{\top}\mathbf{P}\mathbf{z}=0\). A vector with squared norm zero is the zero vector, so \(\mathbf{P}\mathbf{z}=\mathbf{0}\); hence \(U^\perp\subseteq\ker T\). Finally, for any \(\mathbf{x}\), \(\mathbf{P}\mathbf{x}\in U\), and \(\mathbf{P}(\mathbf{x}-\mathbf{P}\mathbf{x})=\mathbf{P}\mathbf{x}-\mathbf{P}^2\mathbf{x}=\mathbf{0}\), so \(\mathbf{x}-\mathbf{P}\mathbf{x}\in\ker T=U^\perp\). Therefore \(\mathbf{x}\) is decomposed as a vector in \(U\) plus a vector in \(U^\perp\), and \(\mathbf{P}\mathbf{x}\) is its \(U\)-component. This is the orthogonal projection onto \(U\), and the image and null-space identities follow. \(\square\)
Reading the Image and Null Space
The theorem makes the geometry recoverable directly from the matrix. Its columns span the image, so they describe the subspace onto which vectors are projected. The solutions of \(\mathbf{P}\mathbf{x}=\mathbf{0}\) form the null space, which is exactly the orthogonal complement of that subspace. These are different roles: the image contains the retained components, while the null space contains the components removed completely.
Idempotence alone says that applying the map twice changes nothing after the first application. It does not say that the removed component is orthogonal to the retained subspace. Symmetry supplies that missing condition. The examples below illustrate both the full characterization and why neither identity should be ignored.
Worked Example: Projection Onto a Line in \(\mathbb{R}^2\)
Consider \(\mathbf{P}=\begin{bmatrix}\tfrac15&\tfrac25\\[2pt]\tfrac25&\tfrac45\end{bmatrix}\). We verify that it projects orthogonally onto the line spanned by \(\mathbf{v}=(1,2)^{\top}\), and determine its null space.
The matrix is symmetric because its off-diagonal entries agree. Multiplication gives
By the characterization, \(\mathbf{P}\) is an orthogonal projection. For \(\mathbf{x}=(x,y)^{\top}\), \(\mathbf{P}\mathbf{x}=\bigl((x+2y)/5,\;2(x+2y)/5\bigr)^{\top}\), so every output is a multiple of \((1,2)^{\top}\). Also \(\mathbf{P}(1,2)^{\top}=(1,2)^{\top}\), confirming that its image is exactly \(\operatorname{span}\{(1,2)^{\top}\}\). The output is zero exactly when \(x+2y=0\), giving \(\operatorname{Nul}\mathbf{P}=\operatorname{span}\{(-2,1)^{\top}\}\).
Check: \((1,2)\cdot(-2,1)=-2+2=0\), as required for the image and null space to be orthogonal. For \(\mathbf{x}=(3,1)^{\top}\), \(\mathbf{P}\mathbf{x}=(1,2)^{\top}\), and \((3,1)^{\top}=(1,2)^{\top}+(2,-1)^{\top}\), where the second summand is orthogonal to \((1,2)^{\top}\).
Worked Example: Idempotent but Not an Orthogonal Projection
Let \(\mathbf{Q}=\begin{bmatrix}1&1\\0&0\end{bmatrix}\). This matrix illustrates why idempotence by itself is insufficient.
Its square is \(\mathbf{Q}^2=\begin{bmatrix}1&1\\0&0\end{bmatrix}\begin{bmatrix}1&1\\0&0\end{bmatrix}=\begin{bmatrix}1&1\\0&0\end{bmatrix}=\mathbf{Q}\), but \(\mathbf{Q}^{\top}=\begin{bmatrix}1&0\\1&0\end{bmatrix}\ne\mathbf{Q}\). Its output on \((x,y)^{\top}\) is \((x+y,0)^{\top}\), so its image is \(\operatorname{span}\{(1,0)^{\top}\}\). Its null space is given by \(x+y=0\), or \(\operatorname{span}\{(1,-1)^{\top}\}\).
Check: \((1,0)\cdot(1,-1)=1\ne0\), so the null space is not the orthogonal complement of the image. The matrix is a projection in the general idempotent sense, but it is not an orthogonal projection.
Worked Example: A Projection in \(\mathbb{R}^3\)
Consider \(\mathbf{R}=\begin{bmatrix}\tfrac12&\tfrac12&0\\[2pt]\tfrac12&\tfrac12&0\\0&0&1\end{bmatrix}\). It is symmetric. Squaring gives
Thus it is an orthogonal projection. Its action is \(\mathbf{R}(x,y,z)^{\top}=((x+y)/2,(x+y)/2,z)^{\top}\). The image is \(\{(a,a,c)^{\top}:a,c\in\mathbb{R}\}=\operatorname{span}\{(1,1,0)^{\top},(0,0,1)^{\top}\}\), because every output has this form and each such vector is unchanged by \(\mathbf{R}\). The null space is \(\{(x,-x,0)^{\top}:x\in\mathbb{R}\}=\operatorname{span}\{(1,-1,0)^{\top}\}\).
Check: the null-space generator is orthogonal to both image generators: \((1,-1,0)\cdot(1,1,0)=0\) and \((1,-1,0)\cdot(0,0,1)=0\). For \(\mathbf{x}=(3,1,4)^{\top}\), the output is \((2,2,4)^{\top}\), and the difference \((1,-1,0)^{\top}\) lies in the stated null space.
Why the Two Conditions Must Be Checked
A common mistake is to see a symmetric matrix and conclude that it is an orthogonal projection. For example, \(\mathbf{D}=\begin{bmatrix}1&0\\0&2\end{bmatrix}\) is symmetric, but \(\mathbf{D}^2=\begin{bmatrix}1&0\\0&4\end{bmatrix}\ne\mathbf{D}\). It therefore fails the characterization. In fact, it sends \((0,1)^{\top}\) to \((0,2)^{\top}\), and applying it again gives \((0,4)^{\top}\); the output is not fixed by a second application.
The converse error is to treat every idempotent matrix as orthogonal. The matrix \(\mathbf{Q}\) above satisfies \(\mathbf{Q}^2=\mathbf{Q}\), yet its image and null space are not perpendicular. Always check both conditions. Once they hold, the theorem supplies the geometric interpretation without requiring a separate guess about the target subspace: take the column space for the image and the null space for its orthogonal complement.
There is also only one orthogonal projection onto a given subspace. This fact ensures that specifying the target subspace determines a unique map, rather than merely a collection of possible matrices.
Proof. Let \(T_1\) and \(T_2\) be orthogonal projections onto \(U\), and fix any \(\mathbf{x}\in\mathbb{R}^n\). Write \(\mathbf{x}=T_1(\mathbf{x})+\mathbf{r}_1=T_2(\mathbf{x})+\mathbf{r}_2\), where \(T_1(\mathbf{x}),T_2(\mathbf{x})\in U\) and \(\mathbf{r}_1,\mathbf{r}_2\in U^\perp\). Rearranging gives \(T_1(\mathbf{x})-T_2(\mathbf{x})=\mathbf{r}_2-\mathbf{r}_1\). The left side belongs to \(U\), and the right side belongs to \(U^\perp\). A vector \(\mathbf{q}\) in both \(U\) and \(U^\perp\) satisfies \(\mathbf{q}\cdot\mathbf{q}=0\), hence \(\mathbf{q}=\mathbf{0}\). Therefore \(T_1(\mathbf{x})=T_2(\mathbf{x})\). Since this holds for every \(\mathbf{x}\), the maps are equal. \(\square\)
Check Your Understanding
Use both matrix conditions and the image-null-space description in your reasoning.
- For \(\mathbf{A}=\begin{bmatrix}0&0\\0&1\end{bmatrix}\), verify the two identities and state its image and null space.
- Explain why \(\begin{bmatrix}1&0\\0&0\end{bmatrix}\) is an orthogonal projection, while \(\begin{bmatrix}1&1\\0&0\end{bmatrix}\) is not.
- Determine the image and null space of \(\mathbf{P}=\tfrac12\begin{bmatrix}1&1\\1&1\end{bmatrix}\), and check that they are orthogonal.
- Give a symmetric matrix that is not idempotent, and use the characterization to explain why it is not an orthogonal projection.
- If \(\mathbf{P}^2=\mathbf{P}\) and \(\mathbf{P}^{\top}=\mathbf{P}\), explain why \(\mathbf{x}-\mathbf{P}\mathbf{x}\) belongs to \(\operatorname{Nul}\mathbf{P}\) for every \(\mathbf{x}\).