TITLE: What is the purpose of defining a Hilbert Space?
QUESTION [29 upvotes]: I understand that the Hilbert space is an infinite dimensional analogue of Euclidean space. However, one thing I have thought about for a while is why certain problems define a variable living within a Hilbert space. 
In other words, why do we need to formally define a vector space before working with certain problems? Why can we not just directly do calculations without having to first formally define it?
It seems to me often times that problems involving vectors would be defined as living in a vector space, as a formality, before the real math occurs. Why do we constantly need to mention vector spaces?

REPLY [3 votes]: In addition to other good answers, I think there is a clarification needed. Indeed, Dirac, Bethe, and other luminaries often did not express themselves in formal mathematics, yet/and correctly predicted physical phenomena. It's not that they reached true conclusions from false premises. Rather, they reached true conclusions from vague (from a mathematician's viewpoint) premises, but fortified by some physical intuition. In subsequent years, Stone, von Neumann, Schwartz, Grothendieck, and others showed that there is a formal/rigorous mathematical viewpoint which makes much of optimistic symbol manipulation legitimate within the range it was needed.
A historic precursor to this kind of event-sequence was the notorious "Dirichlet principle" in the 19th century, which is basically a minimum principle (that a convex, closed set in a complete topological vector space has a unique point nearest $0$). This "principle" is literally false, except in Hilbert spaces, and not in pathological ways, but many of the ways it was used by Riemann and others in the 19th century did not happen to use the "false" aspects. It was not until 1906 that B. Levi, Frobenius, Hilbert, and others realized that the naive formulation of the Dirichlet principle was irretrievably false, but that a formulation in terms of (what would later be called) Sobolev spaces (originally, B. Levi spaces, and Hilbert spaces by design) would suffice to give the results needed in applications.
A thing I've only recently explicitly appreciated is that much of mathematics works surprisingly well, even if we do not have proofs of everything. Often, many people fail to imagine what could go wrong, but nothing bad happens, because in fact it does not go wrong, but the proof that it won't is much more sophisticated than the apparent issue.