TITLE: restriction of unitary operator is unitary?
QUESTION [5 upvotes]: Let $\mathcal{U}: \mathcal{H} \rightarrow \mathcal{H}$ be a unitary operator on a Hilbert space $\mathcal{H}$.  If $\mathcal{K}\subset \mathcal{H}$ is a closed subspace such that $\mathcal{U}(\mathcal{K})\subset \mathcal{K}$, is it necessarily the case that $\mathcal{U}(\mathcal{K})=\mathcal{K}$?    Thank you.

REPLY [2 votes]: Let $\mathcal H$ be the Hilbert space of square summable sequences indexed by $\mathbb Z$, so $$\mathcal H = \{ (a_n)_{n \in \mathbb Z} \, | \, \sum_n |a_n|^2 < \infty \}.$$
Let $U : \mathcal H \to \mathcal H$ be the shift operator $(a_n)_{n \in \mathbb Z} \mapsto (a_{n-1})_{n \in \mathbb Z}$.  If $\mathcal K$ denotes the subspace
of sequences such that $a_n  = 0$ if $n < 0$, then $\mathcal K$ is invariant under $U$, but $U$ is not surjective when restricted to $\mathcal K$.