[proofplan]
We use the defining [orthogonal decomposition](/theorems/436) associated with the projection: every $x\in H$ decomposes as $x=P_Mx+(x-P_Mx)$ with $P_Mx\in M$ and $x-P_Mx\in M^\perp$. Uniqueness of this decomposition gives linearity of $P_M$. Orthogonality gives the Pythagorean identity, hence $\|P_Mx\|_H\le \|x\|_H$ for all $x\in H$, which proves boundedness and the [operator norm](/page/Operator%20Norm) upper bound. If $M$ contains a nonzero vector, the projection fixes that vector, giving the reverse norm inequality.
[/proofplan]
custom_env
admin
[step:Use uniqueness of orthogonal decompositions to prove linearity]Define
\begin{align*}
M^\perp:=\{h\in H:(h,m)_H=0\text{ for every }m\in M\}.
\end{align*}
Since $P_M$ is the [orthogonal projection](/theorems/437) onto $M$, for every $x\in H$ we have $P_Mx\in M$ and $x-P_Mx\in M^\perp$, and this decomposition is unique: if $x=m+n$ with $m\in M$ and $n\in M^\perp$, then $m=P_Mx$.
Let $x,y\in H$ and let $\alpha,\beta\in\mathbb F$. Since $M$ is a linear subspace, $\alpha P_Mx+\beta P_My\in M$. Since $M^\perp$ is a linear subspace,
\begin{align*}
\alpha(x-P_Mx)+\beta(y-P_My)\in M^\perp.
\end{align*}
Moreover,
\begin{align*}
\alpha x+\beta y=(\alpha P_Mx+\beta P_My)+(\alpha(x-P_Mx)+\beta(y-P_My)).
\end{align*}
By uniqueness of the orthogonal decomposition of $\alpha x+\beta y$, it follows that
\begin{align*}
P_M(\alpha x+\beta y)=\alpha P_Mx+\beta P_My.
\end{align*}
Thus $P_M:H\to H$ is linear.[/step]
custom_env
admin
[guided]We want to prove that $P_M$ respects addition and scalar multiplication. The only structural information we need is the uniqueness of the orthogonal decomposition into an $M$-part and an $M^\perp$-part.
Define
\begin{align*}
M^\perp:=\{h\in H:(h,m)_H=0\text{ for every }m\in M\}.
\end{align*}
For each $x\in H$, the statement that $P_M$ is the orthogonal projection onto $M$ means precisely that $P_Mx\in M$, $x-P_Mx\in M^\perp$, and $x=P_Mx+(x-P_Mx)$. The $M$-component is unique: if $x=m+n$ with $m\in M$ and $n\in M^\perp$, then $m=P_Mx$.
Now fix $x,y\in H$ and scalars $\alpha,\beta\in\mathbb F$. Because $M$ is a linear subspace,
\begin{align*}
\alpha P_Mx+\beta P_My\in M.
\end{align*}
Because $M^\perp$ is also a linear subspace,
\begin{align*}
\alpha(x-P_Mx)+\beta(y-P_My)\in M^\perp.
\end{align*}
These two vectors add to $\alpha x+\beta y$:
\begin{align*}
\alpha x+\beta y=(\alpha P_Mx+\beta P_My)+(\alpha(x-P_Mx)+\beta(y-P_My)).
\end{align*}
This is an orthogonal decomposition of $\alpha x+\beta y$ with first component in $M$ and second component in $M^\perp$. By uniqueness of that decomposition, the first component must be the projection of $\alpha x+\beta y$ onto $M$. Therefore
\begin{align*}
P_M(\alpha x+\beta y)=\alpha P_Mx+\beta P_My.
\end{align*}
This proves that $P_M$ is linear.[/guided]
custom_env
admin
[step:Use orthogonality to obtain the contraction estimate]
Let $x\in H$. The vectors $P_Mx$ and $x-P_Mx$ are orthogonal. Therefore
\begin{align*}
\|x\|_H^2=\|P_Mx+(x-P_Mx)\|_H^2=\|P_Mx\|_H^2+\|x-P_Mx\|_H^2.
\end{align*}
Since $\|x-P_Mx\|_H^2\ge 0$, we obtain
\begin{align*}
\|P_Mx\|_H^2\le \|x\|_H^2.
\end{align*}
Taking nonnegative square roots gives
\begin{align*}
\|P_Mx\|_H\le \|x\|_H.
\end{align*}
[/step]
custom_env
admin
[step:Conclude boundedness and the upper bound for the operator norm]
The estimate just proved holds for every $x\in H$. Since $P_M$ is linear and
\begin{align*}
\|P_Mx\|_H\le 1\cdot \|x\|_H
\end{align*}
for all $x\in H$, the map $P_M$ is bounded. Hence $P_M\in\mathcal L(H)$. By the definition of the operator norm as the least admissible global Lipschitz constant for a [bounded linear operator](/page/Bounded%20Linear%20Operator),
\begin{align*}
\|P_M\|_{\mathcal L(H)}\le 1.
\end{align*}
[/step]
custom_env
admin
[step:Evaluate the norm on a nonzero vector in the range]
Assume $M\ne\{0\}$. Choose $m\in M$ with $m\ne 0$. Since $m\in M$, the orthogonal projection fixes $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 operator norm as a supremum over nonzero vectors,
\begin{align*}
\|P_M\|_{\mathcal L(H)}\ge 1.
\end{align*}
Combining this lower bound with $\|P_M\|_{\mathcal L(H)}\le 1$ gives
\begin{align*}
\|P_M\|_{\mathcal L(H)}=1.
\end{align*}
[/step]