_{j}} of elements of X is called an orthonormal basis for X if the following are true:

- B is a basis for X
*in the analyst's sense*, that is, the finite linear combinations α_{1}b_{1}+ ... + α_{k}b_{k}(where α_{i}are scalars from k, and b_{i}are any elements of B) are*dense*in X. Compare and oppose Hamel basis. - Each b
_{j}is normalized, that is, (b_{j}| b_{j}) = 1 for every j. - The b
_{j}are orthogonal, that is, (b_{j}| b_{k}) = 0 if j ≠ k.

Orthonormal bases are most commonly encountered when dealing with function spaces which happen to be Hilbert spaces. Under these circumstances we can approximate any function in the space by a finite sum of basis elements (by the density property above). If we can choose a special orthonormal basis for our function space whose elements have some nice property, then we may be able to use that property to prove things about arbitrary elements of the space.

For instance, harmonic analysis or Fourier analysis begins by considering the space L^{2}(**T**), which is *roughly* the set of real- or complex-valued functions on the unit circle **T**, whose squares are Lebesgue integrable. (See Hilbert space for details.) This space has an orthonormal basis {x → (2π)^{-1/2} e^{inx} | n ∈ **Z**} (in the complex-valued case) or {x → π^{-1/2} sin(nx); x → π^{-1/2} cos(nx) | n ∈ **N**} (in the real-valued case). Approximation in this basis is precisely the Fourier transform.

Other orthonormal bases are used for approximating functions by polynomials, for instance the Chebyshev polynomials and Legendre polynomials.