# Orthogonality of discrete sine functions

can somebody provide a proof of the attached result ? (excerpt from a thesis document). It seemed obvious but I got lost in the calculations. Many thanks Gerald orthogonality of discrete sine functions

In my opinion, the simplest understanding (and proof) of this discrete orthogonality is by recognizing that vectors

$${\bf V_m}:=\begin{pmatrix} \sin\left(1 m \right)\\ \sin\left(2 m\right)\\ \cdots \\ \sin\left(n m \right) \end{pmatrix}$$

are eigenvectors of the following symmetrical matrix:

$${\bf D}=\begin{pmatrix}2&-1&&&&\\-1&2&-1&&&\\&-1&2&-1&&\\&&\ddots&\ddots&\ddots&\\&&&-1&2&-1\\&&&&-1&2 \end{pmatrix}$$

In fact, this matrix is attached to the discrete version of the opposite of the second derivative, because of the classical approximation :

$$$$f''(x)\approx\frac{1}{h^2}(f(x-h)-2f(x)+f(x+h))$$$$

which is easily explained by Taylor expansions of $$f(x+h)$$ et $$f(x-h)$$ at order 2.

If $$\bf{D}$$ is applied to the following vector with $$n$$ coordinates

$$(f(h),f(2h), \cdots f(nh)) \ \ \text{with} \ \ h=\frac{1}{n+1}$$

one gets, up to an unessential scaling factor $$\dfrac{1}{h^2}$$, an approximation of the following vector :

$$-( * , f''(2h),f''(3h),\cdots f''((n-1)h)), * )$$ where the stars at the beginning and at the end mean that two specific rules have to be applied to obtain the values of this discrete 2nd derivative at the borders of the interval.

We are going to show that the eigenvalues and associated eigenvectors can be given simple analytical expressions. Almost everything is contained in the following relationship (that can be verified by using classical trigonometric expressions). For any $$k,m \in \mathbb{R}$$ :

$$$$-\sin((k-1)m)+2\sin(k m)-\sin((k+1)m) \ = \ 4 \sin\left(\frac{m}{2}\right)^2 \sin(k m) \ \ \ (*)$$$$

In this formula, the presence of coefficients $$-1,2,-1$$ can be exploited by grouping, for a fixed $$m$$ ($$1 \leq m \leq n$$), versions of equation (*) , for values $$k=1, 2, \ldots, n$$ under the following common matrix form :

$$$$\bf{D}\bf{V_m}=\lambda_m {\bf V_m}$$$$

with $$\lambda_m:=4 \sin\left(\frac{m}{2}\right)^2.$$

Concerning $$m$$, we will have to consider the very special value

$$$$m:=p\dfrac{\pi}{n+1} \ \ \ (§)$$$$

Why that ? Because, in the exceptional case $$k=n$$, formula (*) needs to be replaced by the following identity:

$$$$-\sin((n-1)m)+2\sin(n m) \ = \ 4 \sin\left(\frac{m}{2}\right)^2 \sin(n m) \ \ \ (**)$$$$

which is possible only if (§) holds (same remark for the very first identity).

Let us give the name $$\bf{S}$$ to the matrix with general coefficient $${\bf S}_{pq}=\sin\left(pq \frac{\pi}{n+1}\right)$$. Its columns are the eigenvectors of symmetrical matrix $${\bf S}$$. Thus they are orthogonal, what was desired.

Remarks :

1) $$\bf{D}$$, having all its eigenvalues $$>0$$ is (Symmetrical) Definite Positive (SDP). It is associated to the so-called (discrete) sine-transform, a relative to the (discrete) Fourier Transform.

2) To go a little further, take a look at the 2nd example in Looking for examples of Discrete / Continuous complementary approaches