Why sine and cosine are orthogonal over continuum and over discrete set?

497 Views Asked by At

Consider functions of $x$:

$$ 1,\quad \sin \frac{\pi n}{N} x, \quad \cos \frac{\pi n}{N} x, \quad \cos \pi x $$

where $n$ runs $1,\,2,\, \ldots,\,N - 1$

Those functions are orthogonal if the inner product is defined as $$ \int_0^{2 N} f(x) g(x) \, dx $$

but also if it is $$ \sum_{x = 0}^{2 N - 1} f(x)g(x) $$ What is special about the sine and the cosine? Do other sets of functions have a similar property.

As @badjohn suggested I experimented with four triangular functions:

The integrals and the sums are zero. The sums are zero also with a shift ($0 \le \delta < 1$, $N = 2$):

$$ \sum_{x = 0}^{2 N - 1} f(x + \delta)g(x + \delta) $$