[proofplan]
We use the [orthogonal projection](/theorems/437) decomposition defining $P_M$: every $x\in H$ splits as $x=P_Mx+(x-P_Mx)$ with $P_Mx\in M$ and $x-P_Mx\in M^\perp$, where $M^\perp$ is the orthogonal complement of $M$. The Pythagorean identity for orthogonal vectors gives $\|P_Mx\|_H\leq \|x\|_H$, so the operator norm is at most $1$. If $M$ contains a nonzero vector, $P_M$ fixes that vector, giving the reverse inequality. If $M=\{0\}$, the range of $P_M$ is contained in $\{0\}$, so $P_M$ is the zero operator.
[/proofplan]
custom_env
admin
[step:Prove that the orthogonal projection is contractive]Let $x\in H$. By the defining property of the orthogonal projection onto $M$, we have $P_Mx\in M$ and $x-P_Mx\in M^\perp$, where $M^\perp$ denotes the orthogonal complement of $M$. Hence $(P_Mx,x-P_Mx)_H=0$. Using the [Hilbert space](/page/Hilbert%20Space) norm induced by the [inner product](/page/Inner%20Product) and applying the Pythagorean identity for orthogonal vectors to the orthogonal pair $P_Mx$ and $x-P_Mx$,
\begin{align*}\|x\|_H^2=\|P_Mx+(x-P_Mx)\|_H^2.\end{align*}
Since the two summands are orthogonal,
\begin{align*}\|x\|_H^2=\|P_Mx\|_H^2+\|x-P_Mx\|_H^2.\end{align*}
Because $\|x-P_Mx\|_H^2\geq 0$, it follows that
\begin{align*}\|P_Mx\|_H^2\leq \|x\|_H^2.\end{align*}
Taking square roots gives
\begin{align*}\|P_Mx\|_H\leq \|x\|_H.\end{align*}[/step]
custom_env
admin
[guided]The key point is that $P_Mx$ and the error $x-P_Mx$ are perpendicular. Let $x\in H$. By definition of the orthogonal projection onto the closed subspace $M$, the vector $P_Mx$ lies in $M$, while the residual vector $x-P_Mx$ lies in $M^\perp$, where $M^\perp$ is the orthogonal complement of $M$. Therefore
\begin{align*}(P_Mx,x-P_Mx)_H=0.\end{align*}
We now expand the Hilbert norm of $x$ using the decomposition
\begin{align*}x=P_Mx+(x-P_Mx).\end{align*}
The norm on $H$ is induced by the inner product, so orthogonal vectors satisfy the Pythagorean identity for orthogonal vectors. Applying this identity to the orthogonal pair $P_Mx$ and $x-P_Mx$ gives
\begin{align*}\|x\|_H^2=\|P_Mx\|_H^2+\|x-P_Mx\|_H^2.\end{align*}
The second term on the right is a squared norm, hence it is nonnegative:
\begin{align*}\|x-P_Mx\|_H^2\geq 0.\end{align*}
Consequently,
\begin{align*}\|P_Mx\|_H^2\leq \|x\|_H^2.\end{align*}
Both sides are nonnegative [real numbers](/page/Real%20Numbers), so taking square roots preserves the inequality:
\begin{align*}\|P_Mx\|_H\leq \|x\|_H.\end{align*}
This proves that projecting orthogonally cannot increase the norm.[/guided]
custom_env
admin
[step:Convert contractivity into the upper operator norm bound]
By the definition of the operator norm on $\mathcal{L}(H)$,
\begin{align*}\|P_M\|_{\mathcal{L}(H)}=\sup\left\{\|P_Mx\|_H:x\in H,\ \|x\|_H\leq 1\right\}.\end{align*}
For every $x\in H$ with $\|x\|_H\leq 1$, the contractive estimate from the previous step gives
\begin{align*}\|P_Mx\|_H\leq \|x\|_H\leq 1.\end{align*}
Taking the supremum over all $x\in H$ with $\|x\|_H\leq 1$ yields
\begin{align*}\|P_M\|_{\mathcal{L}(H)}\leq 1.\end{align*}
[/step]
custom_env
admin
[step:Use a nonzero vector in $M$ to obtain the lower bound]
Assume $M\ne\{0\}$. Choose $m\in M$ with $m\ne 0$. Since $P_M$ is the projection onto $M$, it fixes every vector of $M$, so
\begin{align*}P_Mm=m.\end{align*}
Therefore
\begin{align*}\frac{\|P_Mm\|_H}{\|m\|_H}=\frac{\|m\|_H}{\|m\|_H}=1.\end{align*}
By the definition of the supremum in the operator norm,
\begin{align*}\|P_M\|_{\mathcal{L}(H)}\geq 1.\end{align*}
Combining this with the upper bound $\|P_M\|_{\mathcal{L}(H)}\leq 1$ gives
\begin{align*}\|P_M\|_{\mathcal{L}(H)}=1.\end{align*}
[/step]
custom_env
admin
[step:Identify the zero subspace case]
Assume $M=\{0\}$. For every $x\in H$, the defining property of $P_M$ gives $P_Mx\in M$, hence
\begin{align*}P_Mx=0.\end{align*}
Thus $P_M=0$ as an operator $H\to H$. By the definition of the operator norm,
\begin{align*}\|P_M\|_{\mathcal{L}(H)}=\sup\left\{\|P_Mx\|_H:x\in H,\ \|x\|_H\leq 1\right\}.\end{align*}
For every $x\in H$ with $\|x\|_H\leq 1$, we have $P_Mx=0$, so
\begin{align*}\|P_Mx\|_H=0.\end{align*}
Therefore the supremum in the unit-ball formula is $0$, and hence
\begin{align*}\|P_M\|_{\mathcal{L}(H)}=0.\end{align*}
This proves both cases of the theorem.
[/step]