# Orthogonal functions

## Orthogonality

Two functions $f_{n}(t)$ and $f_{m}(t)$ are said to be orthogonal if and only if

$\int _{a}^{b}f_{n}(t)f_{m}(t)\;dt=0$ if $m=n$ and is nonzero if and only if $m=n$ .

The term orthogonal means at right angles to implying an analogy between functions and vectors. The orthogonal set of functions may be considered to play the role of unit or basis vectors, and the integration process fills the role of the scalar or dot product.

### Examples of orthogonal functions

It is not difficult to show that the following collections of functions are orthogonal

• $\left\{\cos \left({\frac {n\pi t}{T}}\right)\right\}_{n=0}^{\infty }$ • $\left\{\sin \left({\frac {n\pi t}{T}}\right)\right\}_{n=0}^{\infty }$ • $\left\{\sin \left({\frac {n\pi t}{T}}\right)\right\}_{n=0}^{\infty }$ are orthogonal to $\left\{\cos \left({\frac {n\pi t}{T}}\right)\right\}_{n=0}^{\infty }$ .

### Orthogonality of the cosines

We consider the integral of the product of two cosine functions

$I=\int _{-T}^{T}\cos \left({\frac {n\pi t}{T}}\right)\cos \left({\frac {m\pi t}{T}}\right)\;dt=2\int _{0}^{T}\cos \left({\frac {n\pi t}{T}}\right)\cos \left({\frac {m\pi t}{T}}\right)\;dt$ which follows from the evenness of cosine. There are three cases to consider

#### Case 1: $m=n=0$ $I=2\int _{0}^{T}dt=2T$ #### Case 2: $m=n\neq 0$ Applying the appropriate double angle identity, we may write

$I=\int _{-T}^{T}\cos ^{2}\left({\frac {n\pi t}{T}}\right)\;dt=\int _{0}^{T}\left[1+\cos \left({\frac {2n\pi t}{T}}\right)\right]\;dt=T$ #### Case 3: $m\neq n$ By the evenness of cosine, we may write

$I=2\int _{0}^{T}\cos \left({\frac {n\pi t}{T}}\right)\cos \left({\frac {m\pi t}{T}}\right)\;dt$ .

Employing the identity relating the product of cosines to a difference of cosines

$I=\int _{0}^{T}\left[\cos \left({\frac {(n+m)\pi t}{T}}\right)-\cos \left({\frac {(n-m)\pi t}{T}}\right)\right]\;dt$ $\qquad \qquad \qquad ={\frac {T}{(n+m)\pi }}\sin((m+n)\pi )-{\frac {T}{(n-m)\pi }}\sin((m-n)\pi )=0$ owing to the fact that $\sin(k\pi )=0$ for all integers $k$ .

Hence, the set of cosines is orthogonal.

### Orthogonality of the sines

By the fact that the product of odd functions is even we may write

$J=\int _{-T}^{T}\sin \left({\frac {m\pi t}{T}}\right)\sin \left({\frac {n\pi t}{T}}\right)\;dt=2\int _{0}^{T}\sin \left({\frac {m\pi t}{T}}\right)\sin \left({\frac {n\pi t}{T}}\right)\;dt$ #### Case 1: $m=n=0$ $J=0$ because $\sin(0)=0$ .

#### Case 2: $m=n\neq 0$ Employing the double angle formula for sine

$J=2\int _{0}^{T}\sin ^{2}\left({\frac {m\pi t}{T}}\right)\;dt=\int _{0}^{T}\left[1+\cos \left({\frac {2n\pi t}{T}}\right)\right]\;dt=T.$ #### Case 3: $m\neq n$ Employing the identity relating the product of sines to a difference of cosines, we may write

$J=2\int _{0}^{T}\sin \left({\frac {m\pi t}{T}}\right)\sin \left({\frac {n\pi t}{T}}\right)\;dt$ $J=\int _{-T}^{T}\sin \left({\frac {m\pi t}{T}}\right)\sin \left({\frac {n\pi t}{T}}\right)\;dt=$ 