Definition and illustration
Motivating example: Euclidean space
One of the most familiar examples of a Hilbert space is the Euclidean space consisting of threedimensional vectors, denoted by ℝ^{3}, and equipped with the dot product. The dot product takes two vectors x and y, and produces a real number x · y. If x and y are represented in Cartesian coordinates, then the dot product is defined by
 ${\begin{pmatrix}x_{1}\\x_{2}\\x_{3}\end{pmatrix}}\cdot {\begin{pmatrix}y_{1}\\y_{2}\\y_{3}\end{pmatrix}}=x_{1}y_{1}+x_{2}y_{2}+x_{3}y_{3}\,.$
The dot product satisfies the properties:
 It is symmetric in x and y: x · y = y · x.
 It is linear in its first argument: (ax_{1} + bx_{2}) · y = ax_{1} · y + bx_{2} · y for any scalars a, b, and vectors x_{1}, x_{2}, and y.
 It is positive definite: for all vectors x, x · x ≥ 0 , with equality if and only if x = 0.
An operation on pairs of vectors that, like the dot product, satisfies these three properties is known as a (real) inner product. A vector space equipped with such an inner product is known as a (real) inner product space. Every finitedimensional inner product space is also a Hilbert space. The basic feature of the dot product that connects it with Euclidean geometry is that it is related to both the length (or norm) of a vector, denoted x, and to the angle θ between two vectors x and y by means of the formula
 $\mathbf {x} \cdot \mathbf {y} =\\mathbf {x} \\,\\mathbf {y} \\,\cos \theta \,.$
Completeness means that if a particle moves along the broken path (in blue) travelling a finite total distance, then the particle has a
welldefined net displacement (in orange).
Multivariable calculus in Euclidean space relies on the ability to compute limits, and to have useful criteria for concluding that limits exist. A mathematical series
 $\sum _{n=0}^{\infty }\mathbf {x} _{n}$
consisting of vectors in ℝ^{3} is absolutely convergent provided that the sum of the lengths converges as an ordinary series of real numbers:^{[1]}
 $\sum _{k=0}^{\infty }\\mathbf {x} _{k}\<\infty \,.$
Just as with a series of scalars, a series of vectors that converges absolutely also converges to some limit vector L in the Euclidean space, in the sense that
 $\left\\mathbf {L} \sum _{k=0}^{N}\mathbf {x} _{k}\right\\to 0\quad {\text{as }}N\to \infty \,.$
This property expresses the completeness of Euclidean space: that a series that converges absolutely also converges in the ordinary sense.
Hilbert spaces are often taken over the complex numbers. The complex plane denoted by ℂ is equipped with a notion of magnitude, the complex modulus z which is defined as the square root of the product of z with its complex conjugate:
 $z^{2}=z{\overline {z}}\,.$
If z = x + iy is a decomposition of z into its real and imaginary parts, then the modulus is the usual Euclidean twodimensional length:
 $z={\sqrt {x^{2}+y^{2}}}\,.$
The inner product of a pair of complex numbers z and w is the product of z with the complex conjugate of w:
 $\langle z,w\rangle =z{\overline {w}}\,.$
This is complexvalued. The real part of ⟨z,w⟩ gives the usual twodimensional Euclidean dot product.
A second example is the space ℂ^{2} whose elements are pairs of complex numbers z = (z_{1}, z_{2}). Then the inner product of z with another such vector w = (w_{1},w_{2}) is given by
 $\langle z,w\rangle =z_{1}{\overline {w}}_{1}+z_{2}{\overline {w}}_{2}\,.$
The real part of ⟨z,w⟩ is then the fourdimensional Euclidean dot product. This inner product is Hermitian symmetric, which means that the result of interchanging z and w is the complex conjugate:
 $\langle w,z\rangle ={\overline {\langle z,w\rangle }}\,.$
Definition
A Hilbert space H is a real or complex inner product space that is also a complete metric space with respect to the distance function induced by the inner product.^{[2]} To say that H is a complex inner product space means that H is a complex vector space on which there is an inner product ⟨x,y⟩ associating a complex number to each pair of elements x, y of H that satisfies the following properties:
 The inner product of a pair of elements is equal to the complex conjugate of the inner product of the swapped elements:

 $\langle y,x\rangle ={\overline {\langle x,y\rangle }}\,.$
 The inner product is linear in its first^{[nb 1]} argument. For all complex numbers a and b,

 $\langle ax_{1}+bx_{2},y\rangle =a\langle x_{1},y\rangle +b\langle x_{2},y\rangle \,.$

 $\langle x,x\rangle \geq 0$
 where the case of equality holds precisely when x = 0.
It follows from properties 1 and 2 that a complex inner product is antilinear in its second argument, meaning that
 $\langle x,ay_{1}+by_{2}\rangle ={\bar {a}}\langle x,y_{1}\rangle +{\bar {b}}\langle x,y_{2}\rangle \,.$
A real inner product space is defined in the same way, except that H is a real vector space and the inner product takes real values. Such an inner product will be bilinear: that is, linear in each argument.
The norm is the realvalued function
 $\x\={\sqrt {\langle x,x\rangle }}\,,$
and the distance d between two points x, y in H is defined in terms of the norm by
 $d(x,y)=\xy\={\sqrt {\langle xy,xy\rangle }}\,.$
That this function is a distance function means firstly that it is symmetric in x and y, secondly that the distance between x and itself is zero, and otherwise the distance between x and y must be positive, and lastly that the triangle inequality holds, meaning that the length of one leg of a triangle xyz cannot exceed the sum of the lengths of the other two legs:
 $d(x,z)\leq d(x,y)+d(y,z)\,.$

This last property is ultimately a consequence of the more fundamental Cauchy–Schwarz inequality, which asserts
 ${\bigl }\langle x,y\rangle {\bigr }\leq \x\\,\y\$
with equality if and only if x and y are linearly dependent.
Relative to a distance function defined in this way, any inner product space is a metric space, and sometimes is known as a preHilbert space.^{[3]} Any preHilbert space that is additionally also a complete space is a Hilbert space. Completeness is expressed using a form of the Cauchy criterion for sequences in H: a preHilbert space H is complete if every Cauchy sequence converges with respect to this norm to an element in the space. Completeness can be characterized by the following equivalent condition: if a series of vectors
 $\sum _{k=0}^{\infty }u_{k}$
converges absolutely in the sense that
 $\sum _{k=0}^{\infty }\u_{k}\<\infty \,,$
then the series converges in H, in the sense that the partial sums converge to an element of H.
As a complete normed space, Hilbert spaces are by definition also Banach spaces. As such they are topological vector spaces, in which topological notions like the openness and closedness of subsets are welldefined. Of special importance is the notion of a closed linear subspace of a Hilbert space that, with the inner product induced by restriction, is also complete (being a closed set in a complete metric space) and therefore a Hilbert space in its own right.
Second example: sequence spaces
The sequence space l^{2} consists of all infinite sequences z = (z_{1},z_{2},...) of complex numbers such that the series
 $\sum _{n=1}^{\infty }z_{n}^{2}$
converges. The inner product on l^{2} is defined by
 $\langle \mathbf {z} ,\mathbf {w} \rangle =\sum _{n=1}^{\infty }z_{n}{\overline {w_{n}}}\,,$
with the latter series converging as a consequence of the Cauchy–Schwarz inequality.
Completeness of the space holds provided that whenever a series of elements from l^{2} converges absolutely (in norm), then it converges to an element of l^{2}. The proof is basic in mathematical analysis, and permits mathematical series of elements of the space to be manipulated with the same ease as series of complex numbers (or vectors in a finitedimensional Euclidean space).^{[4]}