I want to prove the following theorem.
Let $V$ be an $n$-dimensional inner product space and $S$ be a maximal orthonormal subset of $V$. Then show that $S$ consists of exactly $n$ elements.
Followings are my trial; Naively, For inner product space, via Gram-Schmidt process one can always make orthonormal basis. The maximal orthonormal subset should be that particular one. But how one prove this rigoursly?
$\dim(V) =n$
$S\subset V$ maximal orthonormal set.
Claim : $|S|=n$
Suppose, $|S|=m<n$
And $S=\{x_1,x_2,...,x_m\}$
Clearly $S$ is linearly independent.
$span(S)$ is a proper closed linear subspace of $V$ (Hilbert space) . Hence, $\exists x_0 \in V\setminus span(S) $ with $\|x_0\|=1 $ such that $x_0 \perp span(S) $ .
(In that case it is easy to find explicit $x_0$)
$x_0 = \frac{x_0 -\sum_{i=0}^{m} \langle x_0,x_i \rangle x_i}{\| {x_0 -\sum_{i=0}^{m} \langle x_0,x_i \rangle x_i}\| }$
$x_0 \perp span(S) \implies x_0 \perp S $
Hence, $S'=\{x_1,x_2,...,x_m,x_0\}$ is an orthonormal set of vectors contradicting the maximality of $S$ as $S$ is proper subset of $S'$.