# Orthogonal functions

In mathematics, orthogonal functions belong to a function space which is a vector space that has a bilinear form. When the function space has an interval as the domain, the bilinear form may be the integral of the product of functions over the interval:

${\displaystyle \langle f,g\rangle =\int {\overline {f(x)}}g(x)\,dx.}$

The functions ${\displaystyle f}$ and ${\displaystyle g}$ are orthogonal when this integral is zero, i.e. ${\displaystyle \langle f,\ g\rangle =0}$ whenever ${\displaystyle f\neq g}$. As with a basis of vectors in a finite-dimensional space, orthogonal functions can form an infinite basis for a function space.

Suppose ${\displaystyle \{f_{0},f_{1},\ldots \}}$ is a sequence of orthogonal functions of nonzero L2-norms ${\displaystyle \Vert f_{n}\Vert _{2}={\sqrt {\langle f_{n},f_{n}\rangle }}=\left(\int f_{n}^{2}\ dx\right)^{\frac {1}{2}}}$. It follows that the sequence ${\displaystyle \left\{f_{n}/\Vert f_{n}\Vert _{2}\right\}}$ is of functions of L2-norm one, forming an orthonormal sequence. To have a defined L2-norm, the integral must be bounded, which restricts the functions to being square-integrable.

## Trigonometric functions

Several sets of orthogonal functions have become standard bases for approximating functions. For example, the sine functions sin nx and sin mx are orthogonal on the interval ${\displaystyle (-\pi ,\pi )}$ when ${\displaystyle m\neq n}$. For then

${\displaystyle 2\sin(mx)\sin(nx)=\cos \left((m-n)x\right)-\cos \left((m+n)x\right),}$

and the integral of the product of the two sine functions vanishes.[1] Together with cosine functions, these orthogonal functions may be assembled into a trigonometric polynomial to approximate a given function on the interval with its Fourier series.