Let $H$ be an infinite-dimensional Hilbert space and consider a $n-dimensional$ closed linear manifold generated by a subset of orthonormal basis, say, $M = span(\{u_1,u_2,\cdots,u_n\})$. Of course, there are possibly infinite $M$.
The Hilbert projection theorem tells us the best approximation of a function $u$ in $H$ which is closest to a $\textbf{given(fixed)}$ $M$. Thus, the best approximation depends on $M$.
I want to fix the dimension of a linear manifold we consider, but not the manifold itself. Among the possible $n-$dimensional linear closed manifolds, what is the best approximation?
Can we answer this question?
That is not what the Hilbert Projection theorem states. It states that in a Hilbert space $H$, given any point $p$ and any closed convex subset $S$, there is a unique best approximation $p' \in S$. More precisely, $p'$ is the unique point in $S$ which satisfies the following relation:
\begin{equation} \|p-p'\| = \inf_{y \in S}\|p-y\| \end{equation}
I'm not quite sure what you're referring to.