TITLE: Is every projection on a Hilbert space orthogonal?
QUESTION [5 upvotes]: I'm highly doubtful that the answer is "yes," but I fail to see what's incorrect about this very basic proof I've thought of. If someone could point out my error, I'd appreciate it. My logic is as follows:
Claim: Every projection on a Hilbert space is orthogonal.
"Proof":
 1. For any linear space $X$, it is true that given a projection $P: X \rightarrow X$ (where $P$ is a projection iff $P$ is linear and satisfies $P^2 = P$), we have $X = \text{ran}(P) \oplus \text{ker}(P)$.
 2. Assume X is a Hilbert space (which is, by definition, linear). Since $\text{ker}(P)$ is a closed linear subspace of $X$, then by the projection theorem, $X = \text{ker}(P) \oplus \text{ker}(P)^\perp$ is an orthogonal direct sum.
 3. Therefore, $\text{ker}(P)^\perp = \text{ran}(P)$, so $X = \text{ran}(P) \oplus \text{ker}(P)$ is an orthogonal direct sum. Thus, $P$ is an orthogonal projection.

REPLY [2 votes]: A projection $P$ should be thought of as being onto a subspace $A$ relative to a subspace $B$.
As a simple example, look at $\mathbb{R}^{2}$ with standard basis $\{ e_1, e_2\}$. Another basis for $\mathbb{R}^{2}$ is $\{ e_1, e_1+e_2 \}$. The orthogonal projection of $\mathbb{R}^{2}$ onto $[\{e_1\}]$ is $Px = (x,e_1)e_1$. However, if you want to write $x$ in terms of the second basis,
\begin{align}
                 x & = (x,e_1)e_1+(x,e_2)e_2 \\
                   & = (x,e_1)e_1+(x,e_2)(e_1+e_2)-(x,e_2)e_1 \\
                   & = \{ (x,e_1) - (x,e_2) \}e_1 + (x,e_2)(e_1+e_2).
\end{align}
This gives rise to a second projection onto $[\{e_1\}]$:
$$
                 Qx = (x,e_1-e_2)e_1.
$$
You can check that this is a projection onto $[\{e_1\}]$ as well:
\begin{align}
          Q^{2}x & = (Qx,e_1-e_2)e_1 \\
                 & = ((x,e_1-e_2)e_1,e_1-e_2)e_1) \\
                 & = (x,e_1-e_2)(e_1,e_1-e_2)e_1 \\
                 & = (x,e_1-e_2)e_1 = Qx.
\end{align}
Both projections are onto $[\{e_1\}]$, but the first is relative to $[\{e_2\}]$, while the second is relative to $[\{e_2-e_1\}]$; these are different even though
$[\{e_1\}]\oplus[\{e_2\}] = [\{e_1\}]\oplus[\{e_2-e_1\}]$.