0
$\begingroup$

$\newcommand{\wh}[1]{{\widehat{#1}}} \newcommand{\R}{{\mathbb{R}}} $I am looking for a proof of the inversion formulas for the discrete sine and cosine transforms, i.e. a proof of the fact that these transforms are involutions (up to a constant factor). For concreteness, let us assume the following definitions.

The linear mapping \begin{equation} \mathrm{DST}\colon \R^{N - 1} \longrightarrow \R^{N - 1}\colon f\longmapsto \wh{f} \end{equation} with \begin{equation} \label{eq:defdst} \wh{f}_n = \sum_{j = 1}^{N - 1} f_j \sin\left(\frac{\pi n j}{N}\right) \end{equation} for $n = 1,\ldots,N - 1$ is called the discrete sine transform (DST).

The linear mapping \begin{equation} \mathrm{DCT}\colon \R^{N + 1} \longrightarrow \R^{N + 1}\colon g\longmapsto \wh{g} \end{equation} with \begin{equation} \wh{g}_n = \frac{g_0}{2} + \sum_{j = 1}^{N - 1} g_j \cos\left(\frac{\pi n j}{N}\right) + \frac{(-1)^n g_N}{2}\text{.} \end{equation} for $n = 0,\ldots,N$ is called the discrete cosine transform (DCT).

The inverse transform to the DST is the DST multiplied by $\frac{2}{N}$, and the same holds for the DCT.

The only proof of this fact that I know can be found in C. van Loan. Computational Frameworks for the Fast Fourier Transform. Society for Industrial and Applied Mathematics, 1992 (section 4.4.7 on page 240), but it is rather lengthy and involved.

I am looking for a shorter, more direct proof of these inverse formulas.

I have asked this question before at MSE without any reactions.

$\endgroup$
2
  • $\begingroup$ Some of the work can be off-loaded if your reader is already familiar with the eigenvectors of the one dimensional discrete Laplacian. Is this an option in your case? $\endgroup$ Commented Aug 20, 2024 at 15:01
  • $\begingroup$ @CarlChristian This sounds interesting. Can you sketch an approach where you would use the discrete Laplacian? $\endgroup$ Commented Aug 20, 2024 at 18:29

2 Answers 2

2
$\begingroup$

Consider the symmetric matrix
$$F:=\Big(\sin\frac{\pi nj}N\colon\, j,n=1,\dots,N-1\Big)$$ of the DST, so that $\hat f=F f$ for $f\in\Bbb R^{N-1}$.

Using the Euler formula $\sin t=\frac{e^{it}-e^{-it}}{2i}$ and the formula for a partial sum of a geometric progression, we get $F^2=\frac N2\,I$, where $I$ is the identity matrix. So, the inverse transform to the DST is the DST multiplied by $\frac2N$.

The DCT case should be similar.


Details of the calculation of $F^2$: For distinct $j$ and $k$ in $\{1,\dots,N-1\}$, $$\begin{aligned} (F^2)_{jk}&=\sum_{n=1}^{N-1} \frac{e^{i\pi nj/N}-e^{-i\pi nj/N}}{2i} \frac{e^{i\pi nk/N}-e^{-i\pi nk/N}}{2i} \\ &=\frac{c_{jk}}{4 e^{i \pi j+i \pi k} \left(e^{\frac{i \pi j}{\text{N}}}-e^{\frac{i \pi k}{\text{N}}}\right) \left(-1+e^{\frac{i \pi j}{\text{N}}+\frac{i \pi k}{\text{N}}}\right)}, \end{aligned}$$ where $$\begin{aligned} c_{jk}&=e^{2 i k \pi +\frac{i j \pi }{N}}-e^{2 i j \pi +2 i k \pi +\frac{i j \pi }{N}}-e^{2 i j \pi +\frac{i k \pi }{N}}+e^{2 i j \pi +2 i k \pi +\frac{i k \pi }{N}} \\ &+e^{\frac{2 i j \pi }{N}+\frac{i k \pi }{N}}-e^{2 i k \pi +\frac{2 i j \pi }{N}+\frac{i k \pi }{N}}-e^{\frac{i j \pi }{N}+\frac{2 i k \pi }{N}}+e^{2 i j \pi +\frac{i j \pi }{N}+\frac{2 i k \pi }{N}} \\ &= e^{\frac{i j \pi }{N}}-e^{\frac{i j \pi }{N}}-e^{\frac{i k \pi }{N}}+e^{\frac{i k \pi }{N}} \\ &+e^{\frac{2 i j \pi }{N}+\frac{i k \pi }{N}}-e^{\frac{2 i j \pi }{N}+\frac{i k \pi }{N}}-e^{\frac{i j \pi }{N}+\frac{2 i k \pi }{N}}+e^{\frac{i j \pi }{N}+\frac{2 i k \pi }{N}}=0. \end{aligned}$$ Similarly, but simpler, $(F^2)_{jj}=N/2$ for $j\in\{1,\dots,N-1\}$.

$\endgroup$
9
  • 1
    $\begingroup$ I am having trouble simplifying the terms I get after summing the geometric progressions. Is there a trick to see how this works out? $\endgroup$ Commented Aug 20, 2024 at 18:53
  • 1
    $\begingroup$ @Bettina : What kind of trouble are you having here? $\endgroup$ Commented Aug 20, 2024 at 20:22
  • 1
    $\begingroup$ If I haven't miscalculated then $(F_N^2)_{kl} = -1/4 \sum_{j=1}^{N-1} \exp(i \pi (k + l) j / N) - \exp(i \pi (k - l) j/N) - \exp(i \pi (l - k) j / N) + \exp(- i \pi (k + l) j / N)$. Now applying the partial sum formula for geometric progressions gives a big mess that I cannot simplify further. $\endgroup$ Commented Aug 20, 2024 at 20:44
  • 1
    $\begingroup$ @Bettina : I have added details. For $j\ne k$, it is $8$ rather simple exponential terms in the numerator. For $j=k$, it even simpler. $\endgroup$ Commented Aug 20, 2024 at 21:40
  • $\begingroup$ Excuse me for being dense, but when I carry out the sums in my previous comment, I arrive at $(F_N^2)_{kl} = \frac{-1}{4} \left[\frac{\exp(i \pi (k + l) / N) - \exp(i \pi (k + l))}{1 - \exp(i \pi (k + l) / N} - \frac{\exp(i \pi (k - l) / N) - \exp(i \pi (k - l))}{1 - \exp(i \pi (k - l) / N)} - \frac{\exp(i \pi (l - k) / N) - \exp(i \pi (l - k))}{1 - \exp(i \pi (l - k) / N)} + \frac{\exp(- i \pi (k + l) / N) - \exp(-i \pi (k + l))}{1 - \exp(-i \pi (k + l) / N}\right]$. If I bring these four fractions to their lowest common denominator, the result doesn't look like your denominator. $\endgroup$ Commented Aug 21, 2024 at 18:52
2
$\begingroup$

Perhaps, this answer is "more illuminating".

Note that $$\sum_{n=1}^{N-1}\cos na=\frac12\,\Big(\frac{\sin(N-1/2)a}{\sin a/2}-1\Big)$$ for (say) $a\in(0,2\pi)$. This can be easily checked, say by induction on $N$. So, for $F$ as in the previous answer and any distinct $j$ and $k$ in $[N-1]:=\{1,\dots,N-1\}$, $$\begin{aligned} 4(F^2)_{jk}&=4\sum_{n=1}^{N-1}\sin\frac{\pi nj}N \sin\frac{\pi nk}N \\ &=2\sum_{n=1}^{N-1}\Big(\cos\frac{\pi n(j-k)}N -\cos\frac{\pi n(j+k)}N\Big) \\ &=2\sum_{n=1}^{N-1}\cos\frac{\pi n(j-k)}N -2\sum_{n=1}^{N-1} \cos\frac{\pi n(j+k)}N \\ &=\big((-1)^{j-k+1}-1\big)-\big((-1)^{j+k+1}-1\big)=0. \end{aligned}$$ So, $(F^2)_{jk}=0$ for distinct $j$ and $k$ in $[N-1]$. Similarly, but simpler, $(F^2)_{jj}=N/2$ for $j\in[N-1]$.

$\endgroup$
1
  • $\begingroup$ @Bettina : Do you have a response to this answer? $\endgroup$ Commented Aug 28, 2024 at 0:06

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.