Questions about Hilbert spaces, linear subspaces and orthonormal bases I've been looking over some old assignments in my analysis course to get ready for my upcoming exam - I've just run into something that I have no idea how to solve, though, mainly because it looks nothing like anything I've done before. The assignment is as follows:
"Let $H$ be a Hilbert space, and let $(e_n)_{n\in\mathbb{N}}$ be an orthonormal basis for $H$. Let $E$ be the linear subspace spanned by the three elements $e_1 + e_2$, $e_3 + e_4$, $e_2 + e_3$. Let $P_E : H \to E$ be the projection onto $E$."
How would one then do the following three things:


*

*Determine an orthonormal basis for $E$

*Compute $P_E e_1$

*Calculate $\|e_1\|^2$, $\|P_E e_1\|^2$ and $\|e_1 - P_E e_1\|^2$


Usually when we've looked at these types of assignments we've gotten actual basis vectors, $e$. How does one do these things symbollically?
I've tried doing Gram-Schmidt for the first part, but I've no idea if it's right, what I'm doing. I end up with three basis vectors looking something like
$u_1 = \frac{e_1+e_2}{2}$  ,  $u_2 = \frac{e_3+e_4}{2}$  ,  $u_3 = \frac{e_1+e_4}{2}$
Any help would be much appreciated, right now I'm getting nowhere, haha.
 A: For part one, Gram-Schmidt is indeed the way to go. Let $f_1 = e_1 + e_2$, $f_2 = e_3 + e_4$, $f_3 = e_2 + e_3$. Then, since $f_1$ and $f_2$ are already orthogonal to each other, you need only to normalize them. Since $e_1$ and $e_2$ are orthogonal, you have $||f_1||^2 = ||e_1||^2 + ||e_2||^2 = 2$ so $||f_1|| = \sqrt{2}$ and $u_1 = \frac{e_1 + e_2}{\sqrt{2}}$. Similarly, $u_2 = \frac{e_3 + e_4}{\sqrt{2}}$. Then
$$ u_3 = \frac{f_3 - \left< f_3, u_1 \right> \cdot u_1 - \left< f_3, u_2 \right> \cdot u_2}{||f_3 - \left< f_3, u_1 \right> \cdot u_1 - \left< f_3, u_2 \right> \cdot u_2||} = \frac{e_2 + e_3 - \frac{\left<e_2 + e_3, e_1 + e_2 \right>}{2} \cdot (e_1 + e_2) - \frac{\left< e_2 + e_3, e_3 + e_4 \right>}{2} \cdot (e_3 + e_4)}{||\cdot||} = \frac{e_2 + e_3 - \frac{1}{2}(e_1 + e_2) -\frac{1}{2}(e_3 + e_4)}{||\cdot||} = 
\frac{\frac{1}{2}(e_2 + e_3 - e_1 - e_4)}{\frac{\sqrt{4}}{2}} = \frac{e_2 + e_3 - e_1 - e_4}{2}. $$
The projection $P_E(e_1)$ is then readily computed as
$$ P_E(e_1) = \left< e_1, u_1 \right> u_1 + \left< e_1, u_2 \right> u_2 + \left< e_1, u_3 \right> u_3 = \frac{e_1 + e_2}{2} + 0 - \frac{e_2 + e_3 - e_1 - e_4}{4.} $$
A: Your idea of using Graham-Schmidt for determining the orthogonal basis is absolutely right, but the answer you present has gone wrong.  All you know about the $e_i$ is that for all $i$, $e_i \cdot e_i = 1$ and for all $i \neq j$, $e_i \cdot e_j = 0$. But that is quite a lot to know, and enough to do G.S.
Start from basis element $b_1 =k e_1$; normalizing gives 
$$
b_1 = \frac{1}{\sqrt{2}} (e_1 + e_2)
$$
Now, following G.S., take $b_2$ proportional to $(e_3+e_4) - b_1 \cdot (e_3+e_4) b_1$  Since in this case the dot product is zero, $b_2$ will be normalized to
$$
b_2 = \frac{1}{\sqrt{2}} (e_3 + e_4)
$$
Lastly, take $b_3$ proportional to 
$$(e_2+e_3) - b_1 \cdot (e_2+e_3) b_1 - b_2 \cdot (e_2+e_3) b_2
= \frac{1}{\sqrt{2}}  \left(  -e_1 + (\sqrt{2}-1) e_2  + (\sqrt{2}-1) e_3  -e_4 \right)
$$ 
If you normalize that, you get
$$b_3 = \frac{1}{\sqrt{4+2\sqrt{2}}}  \left(  -e_1 + (\sqrt{2}-1) e_2  + (\sqrt{2}-1) e_3  -e_4 \right)
$$
Otther bases are of course possible.  For example, if you had started with the vector $(e_2+e_3)$ you would have gotten a different basis.
For the second question, 
$$p_E e_1 = b_1\cdot e_1 + b_2\cdot e_2 + b_3\cdot e_3 = \frac{1}{\sqrt{2}} e_1 + 0 +  \frac{\sqrt{2}-1}{\sqrt{4+2\sqrt{2}}} e_3
$$
The third part is then straightforward (of course  $\|e_1\|^2$ is trivially 1)
given the expresion for $P_E e_1$.
A: You know that $\{e_n\}_{n\in \mathbb{N}}$ is orthonormal. So let $(a,b)$ be the notation for inner product of the space. Gram-Schmidt is the way to go actually,as you guessed. Convince yourself that with Gram-Schmidt you find
$$
f_1 = \frac{e_1+e_2}{\sqrt{2}}, \quad f_2=\frac{e_3+e_4}{\sqrt{2}}, 
\quad f_3=\frac{e_1-e_2-e_3+e_4}{2}
$$
The last vector is basically $(e_1+e_2)+(e_3+e_4)-2(e_2+e_3)$.
For part (2), note that a projection to $E$ is obtained as (for $h\in H$)
$$P_E(h) = (h,f_1) f_1 + (h,f_2)f_2 + (h, f_3)f_3$$
To see this first note that if $h\in E$, then the above formula says $P_E(h)=h$. And if $h\notin E$, then $P_E(h)\in E$ (Check these). Also $P_E(P_E(h))=P_E(h)$ (Check this too) so $P_E$ is indeed the desired projection.
