The role of completeness in Hilbert Spaces Why do Hilbert spaces have to be complete?
I've been studying (teaching myself about) Hilbert spaces for a while now as they have a habit of popping up in many of the papers I'm come across (I'm a computer scientist). I understand what completeness means (re Cauchy sequences), most texts make that clear. What I wish the texts made clearer is why completeness is necessary.
I'd appreciate, simple explanations if possible.
Thanks.
 A: This isn't as much about Hilbert Spaces per se. But generally, the Hilbert spaces that are interesting (to me) and arise naturally (say in quantum mechanics) are infinite dimensional. 
Now once one tries to do linear algebra on infinite dimensional normed spaces, analysis becomes crucial. It is just a general principle that when doing analysis on some space, you want it to be complete. 
The point is that you want to use analysis to approximate things, meaning that in order to study things, you instead study approximations, 
(i.e. sequences that converge to them). So to do this properly you want to know that the sequences which you know should converge (Cauchy seq), actually do converge (Completeness).
Note: The requirement that it be complete isn't really a restriction, since any inner product space can be embedded densely into a complete one. 
A: Many points have been mentioned, but scanning through old questions I found this here: nobody mentioned that one can classify Hilbert spaces so easily via the size of the Hilbert basis. If you would only have pre Hilbert spaces, then there is an abundance of possibilities beyond any reasonable classification. Only after completions these differences become whiped out.
So completion has always two aspects for me: one get's something for free (and getting more is always better), the new limit point. On the other hand, one looses information about the dense subspace one started with. This might or might not be an advantage (classification becomes easier, but also coarser...)
A: I would recommend browsing through some books on the theory of signal processing for engineers, e.g. the ones by Martin Vetterli and his co-authors, see e.g:
http://www.sp4comm.org/docs/sp4comm.pdf
It is remarkable how they "sell" completeness of Hilbert spaces through the use of orthonormal bases, in the sense that these allow to decompose EVERY signal of finite energy! Once in a seminar talk, I heard Vetterli exclaiming: "If Hilbert spaces weren't complete, we would have no television!". As a pure mathematician, I could only appreciate...
A: The answers already posted are quite satisfying, I'd just like to add one more point of view (at the risk of making the thing more confused for the OP :). When Sobolev started solving PDEs, he did not have reasonable function spaces available: working in $C^2$ is a nightmare as soon as you want to do calculus of variations, and it is immediately clear that 'something is missing'. You naturally construct solutions by approximating them (with minimizing sequences, with smooth approximations etc. etc.). The original approach of Sobolev was: well, all I have is this approximating sequence, so THIS SEQUENCE is my solution, whatever that means. This was his original definition of 'weak solution'.
As you see, he was dispensing completely with completeness, and working only with functions in a dense subspace. This is perfectly fine, and I'm tempted to answer to the original question with the paradox: completeness is not really necessary, even from a theoretical standpoint, since of course you can embed every normed space in a complete one. But this is very awkward; it is vastly more economical to 'define' the limit of your approximating sequence. Indeed, this procedure is precisely what is called completion. Working in a complete space makes it possible to take the limit of your approximation and define a solution as a concrete object. 100 yeasr later, we find this approach totally natural. I think this was one of the driving forces behind the universal adoption of complete spaces in analysis.
A: I had a thought about this today.  Completing a space is a bit like getting a bank loan to buy something really nice (bear with me on this).  Because:


*

*If you have enough money already, getting a bank loan isn't worth the hassle.
If you can do your analysis without needing completion, then it's simpler to just do it.

*The loan still has to be paid back, but having a loan means that you put off paying until later.
As others have said, a common use of completion is to use Hilbert space techniques to study non-Hilbert spaces.  But often one wants to know that the final result is in the original space.  So using Hilbert space techniques is a way of putting off questions of existence until later.

*If you're a financial wizard, you can take out the load, use the money to make more money, repay the original loan and end up ahead of the game.
Sometimes, just sometimes, once you've done the Hilbert space stuff then all the rest just falls in to place.
The point, such as it is, is that when you have an incomplete Hilbert space then completing it adds in stuff that you didn't want - if you did want it then you would have put it there to begin with.  Thus when we complete continuous functions to square-integrable ones, we do so in the knowledge that we'd really rather be using continuous functions as they're much better behaved than these nasty not-quite-functions.
John Baez is fond of a quotation attributed to Grothendieck: "It's better to work in a nice category with nasty objects than in a nasty category with nice objects.".  One could adapt that to Hilbert spaces: "It's better to work in a nice vector space with nasty elements than in a nasty vector space with nice elements.".  In this respect, Schwarz functions are some of the nicest functions you could met, but they live in student accommodation.  On the other hand, square-integrable functions have some undesirable personal habits but live in a fantastic mansion.
And to underline my last point, sometimes it's possible to go to a party hosted by the Square Integrables in their posh mansion, but spend the whole time hanging out with the Schwarz family.
A: There are many uses of completeness. One of the first (and one of the most striking) is the fact that a closed subspace has a complement. This in turn uses the fact that for a point not on the closed subspace there is a point in the subspace which is closest to it. This in turn is shown by constructing a Cauchy sequence whose limit (which exists by completeness) is the desired point. (Note that the construction also uses that we have not just a norm but a scalar product and that the scalar product is also used in proving the uniqueness.)
A: It's interesting the way that you phrase the question. I always thought of Hilbert spaces as Banach spaces with extra structure and just took for granted that completeness is always desirable. (Banach are also complete, but their norm does not necessarily arise from an inner product.) Torsten names an important consequence. Another one: completeness ensures that all Hilbert spaces have an orthonormal basis. The basis allows one to handle Hilbert spaces much the same way that one thinks of finite dimensional vector spaces. 
Whereas in the finite dimensional case a linear combination like $y= c_1x_1 + \cdots c_nx_n$ makes perfect sense, to say that $y$ equals some infinite sum $\sum_k c_k x_k$ is not so easy to interpret. When one defines "equals" topologically, i.e., $y$ equals the sum when the limit of partial sums 
$y_n = \sum_{k=0}^n c_kx_k$ converges to $y$, as one does for series of real and complex numbers, the analogy between the finite dimensional and infinite dimensional case works. 
A: One of the nice properties of Hilbert spaces is the Riesz representation theorem: every bounded linear functional f on a Hilbert space H can be written as f(x)=⟨x,y⟩ by using some y∈H.
A: Let me add one more consequence of completeness in a Hilbert (or Banach) space $H$ : if $\sum\|x_n\|<\infty$, then $\sum x_n$ converges in $H$.
A: We should not forget the famous Riesz-Fischer Theorem: 

Let $H$ be a Hilbert space and let $\{u_{\alpha}:\alpha\in A\}$ be an
  orthonormal set in $H$. Suppose $\phi$
  is in the $l^2$-space of $(A,\mu)$ where $\mu$ is the counting measure on $A$. Then
  $\phi=\widehat{x}$ for some $x\in H$ where
  $\widehat{x}:A\to \mathbb{C}$ is
  defined by
  $\widehat{x}(\alpha)=(x,u_{\alpha})$,
  the inner product of $x$ with
  $u_{\alpha}$, for each $\alpha\in A$.

(I quote Theorem 4.17, page 89, in the second edition of Walter Rudin's Real and Complex Analysis.) In fact, I do not think it would be an exaggeration to say that the Riesz-Fischer Theorem is nothing but a reformulation of the completeness of $H$ - that is how crucial the assumption of completeness is to the proof.
A: Imagine if your computer program performed a Newton iteration on a non-complete space.  The answer that pops out could be ``random'', as Newton iteration produces a Cauchy sequences, and will simply stop at your error tolerance without having converged.
A: I'm not sure what to make of the following Cauchy sequence of functions whose limit is the dirac delta function.
$f_{\epsilon}(x) \; = \; \frac{1}{\pi} \frac{\epsilon}{x^2 + \epsilon^2} \; \; \; ( \epsilon > 0 )$
$f_t(x) \; = \; \frac{1}{2\sqrt{\pi t}} exp\left( - \frac{x^2}{4t} \right) \; \; \; ( t > 0 )$
$f_{\nu}(x) \; = \; \frac{1}{\pi} \frac{ sin \nu x}{x} \; \; \; ( 0 < \nu < \infty )$
(Furthermore, the dirac delta function does not have an $\mathcal{L}^p$ norm, when $p > 1$.) Is this the entry point into the space of generalized functions?
