Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

2. Fourier and Convolution

CNRS & DMA, École Normale Supérieure

Chapter PDF · Complete book

Convolution combines shifted copies of a signal, but evaluating it directly can be costly and obscure the structure of the operation. Fourier coordinates turn convolution into multiplication, providing both efficient algorithms and a way to solve differential equations. We develop this connection on continuous and finite domains, study sampling and the fast Fourier transform, and extend the viewpoint to groups, surfaces, and graphs.

The main reference for this chapter is [23].

2.1 Hilbert Spaces and Fourier Transforms

2.1.1 Orthonormal Bases

Many methods in data science begin by expanding the input signal in a basis. An orthonormal basis gives a simple reconstruction formula and preserves energy, which simplifies the analysis. We first describe these properties in a Hilbert space, such as H=L2([0,1]d)\mathcal{H}=L^2([0,1]^d) for signals on a continuous domain or H=RN\mathcal{H}=\mathbb{R}^N for discrete signals.

A complex Hilbert space (H,,)(\mathcal{H},\langle \cdot,\,\cdot\rangle) is complete for the norm induced by its Hermitian inner product. We take this inner product to be linear in the first argument and conjugate-linear in the second. A separable Hilbert space admits an orthonormal basis (φk)k(\varphi_k)_k (finite in finite dimension), so every fHf\in\mathcal{H} has the expansion

f=kf,φkφkf = \sum_{k} \langle f,\,\varphi_k\rangle \varphi_k

where the norm is determined by  ⁣f ⁣2:=f,f|\!| f |\!|^2 \mathrel{:=}\langle f,\,f\rangle. Convergence means that  ⁣fk=0Nf,φkφk ⁣0|\!| f - \sum_{k=0}^N \langle f,\,\varphi_k\rangle \varphi_k |\!| \rightarrow 0 as N+N \rightarrow +\infty. Parseval’s identity expresses conservation of energy:

 ⁣f ⁣2=kf,φk2.|\!| f |\!|^2 = \sum_k |\langle f,\,\varphi_k\rangle|^2.

The Gram–Schmidt procedure constructs such a basis from a linearly independent family (φˉk)k(\bar\varphi_k)_k with dense span. Set φ0=φˉ0/ ⁣φˉ0 ⁣\varphi_0=\bar\varphi_0/|\!| \bar\varphi_0 |\!| and φk=φ~k/ ⁣φ~k ⁣\varphi_k=\tilde\varphi_k/|\!| \tilde\varphi_k |\!|, where φ~k\tilde\varphi_k is the orthogonal residual φ~k=φˉki<kaiφi\tilde\varphi_k=\bar\varphi_k - \sum_{i<k} a_i \varphi_i. Orthogonality requires ai=φˉk,φia_i = \langle \bar \varphi_k,\,\varphi_i\rangle.

On L2([1,1])L^2([-1,1]) with the usual inner product, orthogonalizing the monomials gives the Legendre polynomials. Their conventional normalization differs from unit L2L^2 norm:

φ0(x)=1,φ1(x)=x,φ2(x)=12(3x21),etc.\varphi_0(x)=1, \quad \varphi_1(x)=x, \quad \varphi_2(x) = \frac{1}{2}(3x^2-1), \quad \text{etc.}

On L2(R,ex2/2dx)L^2(\mathbb{R},e^{-x^2/2}\,\mathrm{d}x), this construction gives the probabilists’ Hermite polynomials P0(x)=1P_0(x)=1, P1(x)=xP_1(x)=x, P2(x)=x21P_2(x)=x^2-1, up to normalization. Multiplying normalized polynomials by ex2/4e^{-x^2/4} instead gives orthonormal Hermite functions for Lebesgue measure. A degree-kk orthogonal polynomial has exactly kk distinct real zeros in the interior of the support of the measure.

The Shannon interpolation theorem gives another example: (sinc(xk))k( \mathop{\mathrm{sinc}}(x-k) )_k is an orthonormal basis of the subspace {fL2(R)  ;  supp(f^)[π,π]}\left\{ f\in L^2(\mathbb{R}) \;;\; \mathop{\mathrm{supp}}(\hat f) \subset [-\pi,\pi] \right\}. Using the continuous representative of ff, the reconstruction formula f=kf(k)sinc(xk)f=\sum_k f(k) \mathop{\mathrm{sinc}}(x-k) identifies the coefficients as f,sinc(xk)=f(k)\langle f,\,\mathop{\mathrm{sinc}}(x-k)\rangle = f(k). The series converges in L2L^2 and pointwise; the previous chapter proves the pointwise formula under additional decay assumptions.

Orthogonal bases can also arise as complete families of eigenvectors of self-adjoint operators. Below, we explain how translation-invariant operators (convolutions) characterize Fourier bases.

2.1.2 Fourier Basis on R/2πZ\mathbb{R}/2\pi\mathbb{Z}

Fourier analysis takes different forms on different domains. On the circle, it gives a countable orthonormal basis. On the real line, frequencies form a continuum, and the Fourier transform is not an expansion in a countable basis of exponential functions.

On L2(T)L^2(\mathbb{T}) where T=R/2πZ\mathbb{T}=\mathbb{R}/2\pi\mathbb{Z}, equipped with f,g:=12πTf(x)gˉ(x)dx\langle f,\,g\rangle \mathrel{:=}\frac{1}{2\pi}\int_\mathbb{T}f(x) \bar g(x) \mathrm{d}x, one can use the Fourier basis

φk(x):=eikxforkZ.(2.1)\varphi_k(x) \mathrel{:=}e^{\mathrm{i}k x} \quad \text{for} \quad k \in \mathbb{Z}. \tag{2.1}

One thus has

f=kZf^keikwheref^k:=12π02πf(x)eikxdx,(2.2)f = \sum_{k\in\mathbb{Z}} \hat f_k e^{\mathrm{i}k \cdot} \quad \text{where} \quad \hat f_k \mathrel{:=}\frac{1}{2\pi}\int_0^{2\pi} f(x) e^{-\mathrm{i}k x} \mathrm{d}x, \tag{2.2}

with convergence in L2(T)L^2(\mathbb{T}). Pointwise convergence is delicate; see Section 1.2.

Figure 2.1, left, shows examples of the real parts of Fourier atoms.

Figure 2.1. Fourier modes (left) and several translated Daubechies wavelets at each scale (right).

We recall that for fL1(R)f \in L^1(\mathbb{R}), its Fourier transform is defined as

ωR,f^(ω):=Rf(x)eixωdx.\forall \,\omega\in \mathbb{R}, \quad \hat f(\omega) \mathrel{:=}\int_\mathbb{R}f(x) e^{-\mathrm{i}x \omega} \mathrm{d}x.

The transform extends to L2(R)L^2(\mathbb{R}) by density.

The following diagram relates the Fourier transform on R\mathbb{R} to Fourier coefficients on T\mathbb{T}:

f(x)Ff^(ω)samplingperiodization(f(n))nFourier seriesnf(n)eiωn.\begin{array}{rcccl} & f(x) & \overset{\mathcal{F}}{\longrightarrow} & \hat f(\omega) &\\ \text{sampling}& \downarrow & & \downarrow &\text{periodization} \\ & (f(n))_n & \overset{\text{Fourier series}}{\longrightarrow} & \sum_n f(n) e^{-\mathrm{i}\omega n} &\\ \end{array}.

The two routes through the diagram give the identity

nf(n)eiωn=nf^(ω2πn)(2.3)\sum_n f(n) e^{-\mathrm{i}\omega n} = \sum_n \hat f(\omega-2\pi n) \tag{2.3}

which is Poisson’s summation formula (Proposition 1.1).

Figure 2.2. Four settings for Fourier analysis, linked by sampling and periodization.

2.2 Convolution on R\mathbb{R} and T\mathbb{T}

2.2.1 Convolution

Figure 2.3. Convolution on R\mathbb{R}. The dashed curve is fgf\star g; the marked value (fg)(x)(f\star g)(x) equals the shaded integral.

On X=R\mathbb{X}=\mathbb{R} or T\mathbb{T}, one defines

fg(x)=Xf(t)g(xt)dt.(2.4)f \star g(x) = \int_\mathbb{X}f(t) g(x-t) \mathrm{d}t. \tag{2.4}

Here and throughout this section, integrals use Lebesgue measure on R\mathbb{R} and normalized Haar measure dt/(2π)\mathrm{d}t/(2\pi) on T\mathbb{T}. With this convention, Young’s inequality states that, for 1p,q,r1\leqslant p,q,r\leqslant\infty and (f,g)Lp(X)×Lq(X)(f,g)\in L^p(\mathbb{X})\times L^q(\mathbb{X}),

1p+1q=1+1rfgLr(X)and ⁣fg ⁣Lr(X) ⁣f ⁣Lp(X) ⁣g ⁣Lq(X).(2.5)\frac{1}{p}+\frac{1}{q}=1+\frac{1}{r} \quad\Longrightarrow\quad f \star g \in L^r(\mathbb{X}) \quad \text{and} \quad |\!| f\star g |\!|_{L^r(\mathbb{X})} \leqslant|\!| f |\!|_{L^p(\mathbb{X})}|\!| g |\!|_{L^q(\mathbb{X})}. \tag{2.5}

In particular, convolution by fL1(X)f\in L^1(\mathbb{X}) defines a bounded linear map from Lp(X)L^p(\mathbb{X}) to itself. When r=r=\infty and 1<p,q<1<p,q<\infty, the convolution fgf\star g has a bounded continuous representative, illustrating its regularizing effect.

On the circle, p<qLq(T)Lp(T)p<q \quad\Longrightarrow\quad L^q(\mathbb{T}) \subset L^p(\mathbb{T}), so L(X)L^\infty(\mathbb{X}) is contained in every space in this scale.

Figure 2.4. Signal filtering with a box filter (running average).

Convolution can regularize functions. For instance, if fL1(X)f \in L^1(\mathbb{X}) and gC1(X)g\in C^1(\mathbb{X}) is bounded with bounded derivative, then fgf \star g is differentiable and (fg)=fg(f \star g)'=f \star g'. To construct an approximate identity, choose a smooth compactly supported ρ0\rho\geqslant 0 with Rρ=1\int_\mathbb{R}\rho=1 and set ρε(x)=ε1ρ(x/ε)\rho_\varepsilon(x)=\varepsilon^{-1}\rho(x/\varepsilon). Then fρεff\star\rho_\varepsilon\to f in Lp(R)L^p(\mathbb{R}) for 1p<1\leqslant p<\infty, and uniformly for bounded uniformly continuous ff. On the circle, use 2πkZρε(2πk)2\pi\sum_{k\in\mathbb{Z}}\rho_\varepsilon(\cdot-2\pi k), whose integral against normalized Haar measure is one.

This smoothing effect is also useful for denoising signals and images.

Figure 2.5. Filtering an irregular signal with Gaussian filters of increasing width σ\sigma.

Figure 2.6. How the Fourier transform converts convolution into multiplication.

This means that F\mathcal{F} is an algebra homomorphism. For instance, if X=R\mathbb{X}=\mathbb{R}, its range lies in the algebra of continuous functions that vanish at ±\pm\infty.

As shown in Figure 2.7, successive convolutions of a box function produce cardinal splines: piecewise polynomials of increasing smoothness.

Figure 2.7. Cardinal splines are defined by successive convolutions.

Convolution also describes the sum of independent random variables. Writing fXf_X for the probability density of a random vector XX with respect to Lebesgue measure, independence of XX and YY gives fX+Y=fXfYf_{X+Y}=f_X \star f_Y. This identity is fundamental in probability and statistics.

Associated code: fourier/test_denoising.m and fourier/test_fft2.m

2.2.2 Translation Invariant Operators

Figure 2.8. Commutative diagram for translation invariance.

Translation-invariant operators commute with translations. In signal and image processing, they apply the same rule at every location.

The following propositions characterize translation-invariant operators as convolutions against kernels that may be distributions. The term “translation equivariant” is more precise: translating the input translates the output by the same amount.

The kernel’s regularity depends on the topologies of the input and output spaces, so the proof differs between the two settings below.

We begin with operators whose outputs are continuous functions.

Formally, the identity f=fδf=f\star\delta suggests that Hf=fHδHf=f\star H\delta for a translation-invariant operator. Since HδH\delta need not be defined under the present hypotheses, the following argument uses bounded evaluation functionals instead.

On T\mathbb{T}, an operator need not produce continuous outputs. Its convolution kernel may then be a distribution, and Fourier coefficients provide a convenient way to define the operator.

Conversely, by Parseval’s identity, a bounded sequence cc defines a bounded Fourier multiplier, which commutes with translations. Translation-invariant operators are therefore diagonal in the Fourier basis.

2.2.3 Poisson’s Formula and Distributions

Informally, the Fourier series

nf(n)eiωn\sum_n f(n) e^{-\mathrm{i}\omega n}

can be viewed as the Fourier transform F(Π1f)\mathcal{F}( \Pi_1 \odot f ) of the discrete distribution

Π1f=nf(n)δnwhereΠs=nδsn\Pi_1 \odot f = \sum_n f(n) \delta_{n} \quad \text{where} \quad \Pi_s = \sum_n \delta_{sn}

for s>0s>0, where δa\delta_a is the Dirac mass at location aRa \in \mathbb{R}, i.e. the distribution such that fdδa=f(a)\int f\,\mathrm{d}\delta_a=f(a) for any continuous ff. A measure can be multiplied by a continuous function; a general distribution can be multiplied by a smooth function. For a tempered distribution μ\mu, its Fourier transform is defined by duality on Schwartz test functions:

gS(R),Rg(x)dF(μ)=RF(g)dμ,whereF(g):=Rg(x)eixdx,\forall \,g \in \mathcal{S}(\mathbb{R}), \quad \int_\mathbb{R}g(x) \mathrm{d}\mathcal{F}(\mu) = \int_\mathbb{R}\mathcal{F}(g) \mathrm{d}\mu, \quad \text{where} \quad \mathcal{F}(g) \mathrel{:=}\int_\mathbb{R}g(x)e^{-\mathrm{i}x\cdot}\,\mathrm{d}x,

Here S(R)\mathcal{S}(\mathbb{R}) is the Schwartz space; the integral notation denotes the distributional pairing.

Figure 2.9. Sine waves summed in the Poisson formula.

The Poisson formula (2.3) can thus be interpreted as

F(Π1f)=nf^(2πn)=Rf^(ω)dΠ2π(ω)=f^Π2π\mathcal{F}(\Pi_1 \odot f) = \sum_n \hat f(\cdot-2\pi n) = \int_\mathbb{R}\hat f(\cdot-\omega) \mathrm{d}\Pi_{2\pi}(\omega) = \hat f \star \Pi_{2\pi}

Since F1=12πSF\mathcal{F}^{-1} = \frac{1}{2\pi} \mathcal{S}\circ \mathcal{F} where S(f)=f()\mathcal{S}(f)=f(-\cdot), applying this operator to both sides gives

Π1f=12πSF(f^Π2π)=S(12πF(f^)Π^2π)=S(12πF(f^))S(Π^2π)=Π^2πf.\Pi_1 \odot f = \frac{1}{2\pi} \mathcal{S}\circ \mathcal{F}(\hat f \star \Pi_{2\pi}) = \mathcal{S}( \frac{1}{2\pi} \mathcal{F}(\hat f) \odot \hat\Pi_{2\pi}) = \mathcal{S}( \frac{1}{2\pi} \mathcal{F}(\hat f) ) \odot \mathcal{S}(\hat\Pi_{2\pi}) = \hat \Pi_{2\pi} \odot f.

This can be interpreted as the relation

Π^2π=Π1Π^1=2πΠ2π.\hat\Pi_{2\pi} = \Pi_{1} \quad\Longrightarrow\quad \hat\Pi_1 = 2\pi \Pi_{2\pi}.

For intuition, consider a finite Fourier series

n=NNeinω=sin((N+1/2)ω)sin(ω/2)\sum_{n=-N}^N e^{-\mathrm{i}n \omega} = \frac{\sin((N+1/2)\omega)}{\sin(\omega/2)}

which is the Dirichlet kernel, with removable singularities at multiples of 2π2\pi. Its value there is 2N+12N+1; in the sense of distributions it converges to 2πΠ2π2\pi\Pi_{2\pi}.

2.3 Finite Fourier Transform and Convolution

2.3.1 Discrete Orthonormal Bases

A discrete signal is a finite-dimensional vector fCNf \in \mathbb{C}^N, where NN is the number of samples and fnf_n is the value at a specified location. For a 2-D image fCNCN0×N0f \in \mathbb{C}^N \simeq \mathbb{C}^{N_0 \times N_0}, we have N=N0×N0N = N_0 \times N_0, with N0N_0 pixels in each direction.

The discrete inner product is the analogue of the continuous L2L^2 inner product:

f,g=n=0N1fngˉn.\langle f,\,g\rangle = \sum_{n=0}^{N-1} f_n \bar g_n.

The corresponding squared Euclidean distance is

 ⁣fg ⁣2=n=0N1fngn2.|\!| f-g |\!|^2 = \sum_{n=0}^{N-1} |f_n-g_n|^2.

Exactly as in the continuous case, a discrete orthonormal basis {ψk}0k<N\{ \psi_k \}_{0 \leqslant k < N } of CN\mathbb{C}^N satisfies

ψk,ψk=δkk.(2.7)\langle \psi_k,\,\psi_{k'}\rangle = \delta_{k-k'}. \tag{2.7}

A signal expands in this orthonormal basis as

f=k=0N1f,ψkψk.f = \sum_{k=0}^{N-1} \langle f,\,\psi_k\rangle \psi_k.

It preserves energy

 ⁣f ⁣2=n=0N1fn2=k=0N1f,ψk2|\!| f |\!|^2 = \sum_{n=0}^{N-1} |f_n|^2 = \sum_{k=0}^{N-1} |\langle f,\,\psi_k\rangle|^2

Computing the set of all inner products {f,ψk}0k<N\{\langle f,\,\psi_k\rangle\}_{0 \leqslant k < N} directly requires O(N2)O(N^2) operations. This cost is prohibitive when NN reaches millions of samples. Structured bases permit faster decompositions: Fourier and wavelet transforms require O(Nlog(N))O(N\log(N)) and O(N)O(N) operations, respectively.

2.3.2 Discrete Fourier transform

We denote f=(fn)n=0N1RNf = (f_n)_{n=0}^{N-1} \in \mathbb{R}^N, and regard its entries as indexed by nZ/NZn \in \mathbb{Z}/N\mathbb{Z}, which is a finite abelian group under addition. This corresponds to using periodic boundary conditions.

The discrete Fourier transform is defined as

k=0,,N1,f^k:=n=0N1fne2iπNkn=f,φkwhereφk:=(e2iπNkn)n=0N1CN(2.8)\forall \,k=0,\ldots,N-1, \quad \hat f_k \mathrel{:=}\sum_{n=0}^{N-1} f_n e^{-\frac{2\mathrm{i}\pi}{N}kn} = \langle f,\,\varphi_k\rangle \quad \text{where} \quad \varphi_k \mathrel{:=}( e^{\frac{2\mathrm{i}\pi}{N}kn} )_{n=0}^{N-1} \in \mathbb{C}^N \tag{2.8}

where the canonical inner product on CN\mathbb{C}^N is u,v=n=0N1unvˉn\langle u,\,v\rangle=\sum_{n=0}^{N-1}u_n\bar v_n for (u,v)(CN)2(u,v) \in (\mathbb{C}^N)^2.

This definition is motivated by sampling the Fourier basis xeikxx \mapsto e^{\mathrm{i}k x} on R/2πZ\mathbb{R}/2\pi\mathbb{Z} at equally spaced points (2πNn)n=0N1( \frac{2\pi}{N}n )_{n=0}^{N-1}.

The next proposition establishes the orthogonality of the discrete Fourier atoms and the associated reconstruction formula.

2.3.3 Fast Fourier transform

Assuming N=2NN=2N', one has

f^2k=n=0N1(fn+fn+N/2)e2iπNknf^2k+1=n=0N1e2iπNn(fnfn+N/2)e2iπNkn.\begin{aligned} \hat f_{2k} &= \sum_{n=0}^{N'-1} (f_n + f_{n+N/2}) e^{ -\frac{2\mathrm{i}\pi}{N'} k n } \\ \hat f_{2k+1} &= \sum_{n=0}^{N'-1} e^{ -\frac{2\mathrm{i}\pi}{N} n } (f_n - f_{n+N/2}) e^{ -\frac{2\mathrm{i}\pi}{N'} k n }. \end{aligned}

For the second line, we used the computation

e2iπN(2k+1)(n+N/2)=e2iπN(2kn+kN+n+N/2)=e2iπNne2iπNkn.e^{-\frac{2\mathrm{i}\pi}{N}(2k+1)(n+N/2)} = e^{-\frac{2\mathrm{i}\pi}{N}(2kn+kN+n+N/2)} = - e^{ -\frac{2\mathrm{i}\pi}{N} n } e^{ -\frac{2\mathrm{i}\pi}{N'} k n }.

Let FN(f)=f^\mathcal{F}_N(f)=\hat f denote the discrete Fourier transform on CN\mathbb{C}^N. Introduce the vectors fe=(fn+fn+N/2)nCNf_e = (f_n + f_{n+N/2})_n \in \mathbb{C}^{N'} and fo=(fnfn+N/2)nCNf_o = (f_n - f_{n+N/2})_n \in \mathbb{C}^{N'} and the twiddle factors αN=(e2iπn/N)n=0N1CN\alpha_N=(e^{-2\mathrm{i}\pi n/N})_{n=0}^{N'-1}\in\mathbb{C}^{N'}. The recursion becomes

FN(f)=IN(FN/2(fe),FN/2(foαN))\mathcal{F}_N(f) = \mathcal{I}_N( \mathcal{F}_{N/2}(f_e), \mathcal{F}_{N/2}(f_o \odot \alpha_N) )

where IN\mathcal{I}_N is the “interleaving” operator, defined by IN(a,b):=(a0,b0,a1,b1,,aN1,bN1)\mathcal{I}_N(a,b) \mathrel{:=}(a_0,b_0,a_1,b_1,\ldots,a_{N'-1},b_{N'-1}).

Recursing yields the radix-two fast Fourier transform (FFT) when NN is a power of two. Other FFT factorizations handle general lengths. Zero-padding to a power of two is also useful, although it changes the transform length and the sampled frequencies.

This algorithm can also be interpreted as a factorization of the Fourier matrix into a product of O(logN)O(\log N) sparse matrices.

Figure 2.10. Diagram of one radix-two FFT step. Both halves of the input enter the sum and difference; the outputs of the two smaller transforms are interleaved into even and odd frequencies.

Let C(N)C(N) denote the number of elementary operations required to compute f^\hat f. The recursion gives

C(N)=2C(N/2)+NK(2.10)C(N) = 2C(N/2)+NK \tag{2.10}

where KNK N accounts for NN complex additions and N/2N/2 multiplications. With the change of variable

:=log2(N)andT():=C(N)N\ell \mathrel{:=}\log_2(N) \quad \text{and} \quad T(\ell) \mathrel{:=}\frac{C(N)}{N}

i.e. C(N)=2T()C(N)=2^\ell T(\ell), the relation (2.10) becomes

2T()=2×21T(1)+2KT()=T(1)+KT()=T(0)+K2^\ell T(\ell) = 2 \times 2^{\ell-1} T(\ell-1) + 2^\ell K \quad\Longrightarrow\quad T(\ell) = T(\ell-1) + K \quad\Longrightarrow\quad T(\ell) = T(0) + K \ell

and using the fact that T(0)=C(1)/1=0T(0)=C(1)/1=0, one obtains

C(N)=KNlog2(N).C(N) = K N \log_2(N).

Direct evaluation instead requires O(N2)O(N^2) operations to compute the NN coefficients (2.8), each involving a sum of size NN.

2.3.4 Finite convolution

For (f,g)(RN)2(f,g) \in (\mathbb{R}^{N})^2, one defines fgRNf\star g \in \mathbb{R}^N as

n=0,,N1,(fg)n:=k=0N1fkgnk=k+=nfkg(2.11)\forall \,n=0,\ldots,N-1, \quad (f \star g)_n \mathrel{:=}\sum_{k=0}^{N-1} f_k g_{n-k} = \sum_{k+\ell=n} f_k g_\ell \tag{2.11}

where ++ and - are interpreted modulo NN (vectors are defined on the group Z/NZ\mathbb{Z}/N\mathbb{Z}, or equivalently, one uses periodic boundary conditions).

This defines a commutative algebra structure (RN,+,)(\mathbb{R}^N,+,\star), with neutral element the “Dirac” δ0:=(1,0,,0)RN\delta_0 \mathrel{:=}(1,0,\ldots,0)^\top \in \mathbb{R}^N. The following proposition shows that F:ff^\mathcal{F}: f \mapsto \hat f is an algebra isomorphism and an isometry (up to a scaling by N\sqrt{N} of the norm) from (CN,+,)(\mathbb{C}^N,+,\star) onto (CN,+,)(\mathbb{C}^N,+,\odot) with neutral element 1N=(1,,1)RN\mathbb{1}_N=(1,\ldots,1) \in \mathbb{R}^N.

This proposition gives an O(NlogN)O(N\log N) convolution algorithm:

fg=F1(f^g^).f \star g = \mathcal{F}^{-1}( \hat f \odot \hat g ).

This is more efficient than directly evaluating formula (2.11) for filters with large support. When Supp(g)=P|\mathop{\mathrm{Supp}}(g)|=P is small, direct evaluation costs O(PN)O(PN) and may be faster. An example is g=[1,1,0,,0,1]/3g=[1,1,0,\ldots,0,1]/3, the moving average, where

(fg)n=fn1+fn+fn+13(f \star g)_n = \frac{f_{n-1}+f_n+f_{n+1}}{3}

needs 3N3N operations.

Convolution as translation invariant operator.

Define translation on Z/NZ\mathbb{Z}/N\mathbb{Z} by (Tτf)n:=fnτ(T_\tau f)_n \mathrel{:=}f_{n-\tau}, with nτn-\tau computed modulo NN. The next proposition is the finite counterpart of the results on R\mathbb{R} and R/2πZ\mathbb{R}/2\pi\mathbb{Z}. On Z/NZ\mathbb{Z}/N\mathbb{Z}, no convergence issues arise, and the impulse response can be defined directly.

Polynomial multiplication.

The FFT can multiply large polynomials. It can also multiply large integers by interpreting their digit expansions in a fixed base as polynomials. Indeed,

(i=0AaiXi)(j=0BbjXj)=k=0A+B(i+j=kaibj)Xk(\sum_{i=0}^A a_i X^i)(\sum_{j=0}^B b_j X^j) = \sum_{k=0}^{A+B} ( \sum_{i+j=k} a_i b_j ) X^k

Setting aside the carry operation, which can be performed in linear time, one can write i+j=kaibj=(aˉbˉ)k\sum_{i+j=k} a_i b_j = (\bar a \star \bar b)_k when one defines aˉ,bˉRA+B+1\bar a,\bar b\in\mathbb{R}^{A+B+1} by zero padding.

2.4 Discretization Issues

The FFT also approximates the continuous Fourier transform and its inverse. Reversing the roles of space and frequency leads to an efficient spectral interpolation method.

2.4.1 Fourier approximation via spatial zero padding.

The discrete Fourier transform (2.8) approximates samples of the continuous Fourier transform (1.2). For a sufficiently smooth ff supported on [0,1][0,1], consider the vector fQ:=(f(n/N))n=0Q1RQf^Q \mathrel{:=}(f(n/N))_{n=0}^{Q-1} \in \mathbb{R}^Q. Taking QNQ\geqslant N pads the original samples with zeros, since continuity and the support condition give f(n/N)=0f(n/N)=0 for nNn\geqslant N. For signed frequency indices Q/2kQ/21-\lfloor Q/2\rfloor\leqslant k\leqslant\lceil Q/2\rceil-1 and T=Q/NT=Q/N,

1Nf^kQ=1Nn=0N1f(n/N)e2πink/Q01f(x)e2πikx/Tdx=f^(2πk/T).\begin{aligned} \frac1N\hat f_k^Q &=\frac1N\sum_{n=0}^{N-1}f(n/N)e^{-2\pi\mathrm{i}nk/Q}\\ &\approx\int_0^1f(x)e^{-2\pi\mathrm{i}kx/T}\,\mathrm{d}x =\hat f(2\pi k/T). \end{aligned}

For a fixed physical frequency, the Riemann-sum error is O(1/N)O(1/N) for fC1f\in C^1. The bound need not be uniform over frequencies growing with NN. Increasing QQ at fixed NN samples the same spectrum more densely; it does not increase the Nyquist frequency.

Figure 2.11. Fourier transform approximation by zero-padding in the spatial domain.

2.4.2 Fourier interpolation via spectral zero padding.

One can reverse the roles of space and frequency in the previous construction.

Given NN uniform discrete samples fN=(fnN)n=0N1f^N=(f^N_n)_{n=0}^{N-1}, one can compute their discrete Fourier transform F(fN)=f^N\mathcal{F}(f^N) = \hat f^N (in O(Nlog(N))O(N \log(N)) operations with the FFT),

f^kN:=n=0N1fnNe2iπNnk,\hat f^N_k \mathrel{:=}\sum_{n=0}^{N-1} f^N_n e^{-\frac{2\mathrm{i}\pi}{N} n k},

and then zero-pad the spectrum to obtain a vector of length QNQ\geqslant N.

For simplicity, assume that N=2N+1N=2N'+1 is odd. Even lengths admit a similar, slightly more involved construction.

With frequency indices NkN-N'\leqslant k\leqslant N', define the padded spectrum by

f~kQ=f^kN(NkN),f~kQ=0otherwise,f~QCQ\tilde f_k^Q=\hat f_k^N\quad(-N'\leqslant k\leqslant N'),\qquad\tilde f_k^Q=0\quad\text{otherwise},\qquad\tilde f^Q\in\mathbb{C}^Q

The signed frequency indices are interpreted modulo QQ when calling an FFT routine. An inverse transform of size QQ, multiplied by Q/NQ/N, then gives in O(QlogQ)O(Q\log Q) operations

QNF1(f~Q)=QN×1Qk=NNf^kNe2iπQk=1Nk=NNn=0N1fnNe2iπNnke2iπQk=n=0N1fnN1Nk=NNe2iπ(nN+Q)k=n=0N1fnNsin[πN(QnN)]Nsin[π(QnN)]=n=0N1fnNsincN(Tn)whereT:=QNandsincN(u):=sin(πu)Nsin(πu/N).\begin{aligned} \frac{Q}{N} \mathcal{F}^{-1}( \tilde f^Q )_\ell &= \frac{Q}{N} \times \frac{1}{Q} \sum_{k=-N'}^{N'} \hat f_k^N e^{ \frac{2\mathrm{i}\pi}{Q} \ell k } = \frac{1}{N} \sum_{k=-N'}^{N'} \sum_{n=0}^{N-1} f^N_n e^{-\frac{2\mathrm{i}\pi}{N} n k} e^{ \frac{2\mathrm{i}\pi}{Q} \ell k } \\ &= \sum_{n=0}^{N-1} f^N_n \frac{1}{N} \sum_{k=-N'}^{N'} e^{ 2\mathrm{i}\pi \left( -\frac{n}{N} + \frac{\ell}{Q} \right) k } = \sum_{n=0}^{N-1} f^N_n \frac{ \sin\left[ \pi N \left( \frac{\ell}{Q} - \frac{n}{N} \right) \right] }{ N \sin\left[ \pi \left( \frac{\ell}{Q} - \frac{n}{N} \right) \right] } \\ &= \sum_{n=0}^{N-1} f^N_n \mathop{\mathrm{sinc}}_N\left( \frac{\ell}{T} - n \right) \quad \text{where} \quad T \mathrel{:=}\frac{Q}{N} \quad \text{and} \quad \mathop{\mathrm{sinc}}_N(u) \mathrel{:=}\frac{ \sin(\pi u) }{ N \sin(\pi u /N) }. \end{aligned}

We use the geometric-series identity with ρ=eiω\rho=e^{\mathrm{i}\omega}, a=ba=-b, ω=2π(nN+Q)\omega= 2\pi \left( -\frac{n}{N} + \frac{\ell}{Q} \right),

i=abρi=ρa12ρb+12ρ12ρ12=sin((b+12)ω)sin(ω/2).\sum_{i=a}^b \rho^i = \frac{ \rho^{a-\frac{1}{2}} - \rho^{b+\frac{1}{2}} }{ \rho^{-\frac{1}{2}} - \rho^{\frac{1}{2}} } = \frac{ \sin( (b+\frac{1}{2}) \omega) }{ \sin(\omega/2) }.

This gives a discrete counterpart of the Shannon interpolation formula (1.9). It evaluates the trigonometric interpolant of the samples exactly on a grid of size QQ, at cost O(Qlog(Q))O(Q\log(Q)). Furthermore, sincN(u)sinc(u)\mathop{\mathrm{sinc}}_N(u)\to\mathop{\mathrm{sinc}}(u) for fixed uu as NN\to\infty, with removable singularities filled by continuity.

Figure 2.12. Interpolation by zero-padding in the frequency domain.

2.5 Fourier in Multiple Dimensions

Tensor products extend the one-dimensional Fourier transform to any finite dimension d>1d>1.

2.5.1 On Continuous Domains

On Rd\mathbb{R}^d.

Figure 2.13. 2-D sine wave.

Tensor products retain a useful feature of Fourier atoms: a product of elementary 1-D complex exponentials is a plane wave

=1deixω=eix,ω\prod_{\ell=1}^d e^{ \mathrm{i}x_\ell \omega_\ell } = e^{ \mathrm{i}\langle x,\,\omega\rangle }

whose constant-phase hyperplanes are orthogonal to the wave vector ω=(ω)=1dRd\omega=(\omega_\ell)_{\ell=1}^d \in \mathbb{R}^d when this vector is nonzero. Here x,ω=xω\langle x,\,\omega\rangle = \sum_\ell x_\ell \omega_\ell is the canonical inner product on Rd\mathbb{R}^d.

The Fourier transform and its inverse are defined by

ωRd,f^(ω):=Rdf(x)eix,ωdx,xRd,f(x)=1(2π)dRdf^(ω)eix,ωdω,\begin{aligned} \forall \,\omega\in \mathbb{R}^d, \quad \hat f(\omega) &\mathrel{:=}\int_{\mathbb{R}^d} f(x) e^{-\mathrm{i}\langle x,\,\omega\rangle} \mathrm{d}x, \\ \forall \,x \in \mathbb{R}^d, \quad f(x) &= \frac{1}{(2\pi)^d} \int_{\mathbb{R}^d}\hat f(\omega)e^{\mathrm{i}\langle x,\,\omega\rangle}\,\mathrm{d}\omega, \end{aligned}

under the same integrability assumptions as in one dimension.

Figure 2.14. 2D Fourier orthogonal bases.

On (R/2πZ)d(\mathbb{R}/2\pi\mathbb{Z})^d.

Given an orthonormal basis (φn1)n1N(\varphi_{n_1})_{n_1 \in \mathbb{N}} of L2(X)L^2(\mathbb{X}), one constructs an orthonormal basis of L2(Xd)L^2(\mathbb{X}^d) by tensorization

k=(k1,,kd)Nd,xXd,φk(x)=φk1(x1)φkd(xd).(2.12)\forall \,k=(k_1,\ldots,k_d) \in \mathbb{N}^d, \quad \forall \,x \in \mathbb{X}^d, \quad \varphi_k(x) = \varphi_{k_1}(x_1) \ldots \varphi_{k_d}(x_d). \tag{2.12}

Fubini’s theorem gives orthogonality. Completeness gives convergence of the rectangular partial sums  ⁣k ⁣Nf,φkφkf\sum_{|\!| k |\!|_\infty \leqslant N} \langle f,\,\varphi_k\rangle \varphi_k \rightarrow f in L2(Xd)L^2(\mathbb{X}^d).

Figure 2.15. The two-dimensional torus T2=(R/2πZ)2\mathbb{T}^2=(\mathbb{R}/2\pi\mathbb{Z})^2.

For the multidimensional torus (R/2πZ)d(\mathbb{R}/2\pi\mathbb{Z})^d, using the Fourier basis (2.1), this gives the basis

kZd,φk(x)=eix,k\forall \,k \in \mathbb{Z}^d, \quad \varphi_k(x) = e^{\mathrm{i}\langle x,\,k\rangle}

which is indeed a Hilbertian orthonormal basis for the inner product f,g:=1(2π)dTdf(x)gˉ(x)dx\langle f,\,g\rangle \mathrel{:=}\frac{1}{(2\pi)^d} \int_{\mathbb{T}^d} f(x)\bar g(x)\mathrm{d}x.

This defines the Fourier transform and the reconstruction formula on L2(Td)L^2(\mathbb{T}^d)

f^k:=1(2π)dTdf(x)eix,kdxandf=kZdf^keix,k.\hat f_k \mathrel{:=}\frac{1}{(2\pi)^d} \int_{\mathbb{T}^d} f(x) e^{-\mathrm{i}\langle x,\,k\rangle} \mathrm{d}x \quad \text{and} \quad f = \sum_{k \in \mathbb{Z}^d} \hat f_k e^{\mathrm{i}\langle x,\,k\rangle}.

2.5.2 On Discrete Domains

Discrete Fourier Transform.

Figure 2.16. Discrete 2-D torus.

On a dd-dimensional discrete domain of the form

n=(n1,,nd)Yd:=[ ⁣[1,N1] ⁣]××[ ⁣[1,Nd] ⁣]n = (n_1,\ldots,n_d) \in \mathbb{Y}_d \mathrel{:=}\lbrack\!\lbrack 1,N_1\rbrack\!\rbrack \times \ldots \times \lbrack\!\lbrack 1,N_d\rbrack\!\rbrack

(we denote [ ⁣[a,b] ⁣]:={iZ  ;  aib}\lbrack\!\lbrack a,b\rbrack\!\rbrack \mathrel{:=} \left\{ i \in \mathbb{Z} \;;\; a \leqslant i \leqslant b \right\}) of N=N1NdN=N_1\ldots N_d points, with periodic boundary conditions, one defines an orthogonal basis (φk)k(\varphi_k)_k by the same tensor product formula as (2.12) but using the 1-D discrete Fourier basis (2.8)

(k,n)Yd2,φk(n)=φk1(n1)φkd(nd)==1de2iπNkn=e2iπk,nYd(2.13)\forall \,(k,n) \in \mathbb{Y}_d^2, \quad \varphi_k(n) = \varphi_{k_1}(n_1) \ldots \varphi_{k_d}(n_d) = \prod_{\ell=1}^d e^{\frac{2\mathrm{i}\pi}{N_\ell} k_\ell n_\ell} = e^{ 2\mathrm{i}\pi \langle k,\,n\rangle_{\mathbb{Y}_d} } \tag{2.13}

where we used the (rescaled) inner product

k,nYd:==1dknN.(2.14)\langle k,\,n\rangle_{\mathbb{Y}_d} \mathrel{:=}\sum_{\ell=1}^d \frac{k_\ell n_\ell}{N_\ell}. \tag{2.14}

The pairing in (2.14) acts on frequency and spatial index vectors. The basis (φk)k(\varphi_k)_k is orthonormal for the signal inner product N1nfngˉnN^{-1}\sum_n f_n\bar g_n. As in one dimension, we define the Fourier coefficients without normalizing by (N)(N_\ell)_\ell:

kYd,f^k:=nYdfne2πik,nYd,nYd,fn=1NkYdf^ke2πik,nYd.\begin{aligned} \forall \,k \in \mathbb{Y}_d, \quad \hat f_k &\mathrel{:=}\sum_{n \in \mathbb{Y}_d} f_n e^{-2\pi\mathrm{i}\langle k,\,n\rangle_{\mathbb{Y}_d}}, \\ \forall \,n \in \mathbb{Y}_d, \quad f_n &= \frac{1}{N} \sum_{k \in \mathbb{Y}_d} \hat f_k e^{2\pi\mathrm{i}\langle k,\,n\rangle_{\mathbb{Y}_d}}. \end{aligned}

Fast Fourier Transform.

We describe the algorithm for d=2d=2; the same construction works in any finite dimension.

A fast algorithm for orthogonal decompositions in two 1-D bases (φk11)k1=1N1(\varphi_{k_1}^{1})_{k_1=1}^{N_1}, (φk22)k2=1N2(\varphi_{k_2}^{2})_{k_2=1}^{N_2} also gives a fast decomposition in the tensor product basis (φk11φk22)k1,k2(\varphi_{k_1}^{1} \otimes \varphi_{k_2}^{2})_{k_1,k_2}: apply the algorithm first to the rows and then to the columns of the matrix (fn)n=(n1,n2)RN1×N2(f_n)_{n=(n_1,n_2)} \in \mathbb{R}^{N_1 \times N_2}. Either order gives the same result.

Indeed

k=(k1,k2),f,φk11φk22=n=(n1,n2)fnφk11(n1)φk22(n2)=n1(n2fn1,n2φk22(n2))φk11(n1).\forall \,k=(k_1,k_2), \quad \langle f,\,\varphi_{k_1}^{1} \otimes \varphi_{k_2}^{2}\rangle = \sum_{n=(n_1,n_2)} f_n\overline{\varphi_{k_1}^{1}(n_1)}\,\overline{\varphi_{k_2}^{2}(n_2)} = \sum_{n_1} \left( \sum_{n_2} f_{n_1,n_2}\overline{\varphi_{k_2}^{2}(n_2)} \right)\overline{\varphi_{k_1}^{1}(n_1)}.

If C(N1)C(N_1) is the cost of the 1-D algorithm on RN1\mathbb{R}^{N_1}, the resulting 2-D transform costs N2C(N1)+N1C(N2)N_2 C(N_1)+N_1 C(N_2). For the FFT, this is O(N1N2log(N1N2))=O(Nlog(N))O(N_1 N_2 \log(N_1 N_2))=O(N \log(N)), where N=N1N2N=N_1 N_2.

Represent fRN1×N2f \in \mathbb{R}^{N_1 \times N_2} as a matrix, and write FN=(e2iπkn/N)k,nF_N=(e^{-2\mathrm{i}\pi kn/N})_{k,n} for the Fourier matrix, whose rows are the φk\varphi_k^*. The 2-D transform can then be expressed as matrix products:

f^=FN1×f×FN2CN1×N2.\hat f = F_{N_1} \times f \times F_{N_2}^{\top}\in\mathbb{C}^{N_1\times N_2}.

In practice, the FFT performs these operations without explicit matrix multiplication.

Figure 2.17. 2-D Fourier analysis of an image (left), and attenuation of the periodicity artifact using masking (right).

Associated code: coding/test_fft2.m

2.5.3 Shannon sampling theorem.

Theorem 1.2 extends to sampling on a uniform Cartesian grid in Rd\mathbb{R}^d by tensorization. Use the continuous representative of the bandlimited function ff. In two dimensions, if supp(f^)[π/s1,π/s1]×[π/s2,π/s2]\mathop{\mathrm{supp}}(\hat f) \subset [-\pi/s_1,\pi/s_1] \times [-\pi/s_2,\pi/s_2] and ff decays sufficiently fast,

xR2,f(x)=nZ2f(n1s1,n2s2)sinc(x1/s1n1)sinc(x2/s2n2)wheresinc(u)=sin(πu)πu.\forall \,x \in \mathbb{R}^2, \quad f(x) = \sum_{n \in \mathbb{Z}^2} f(n_1 s_1,n_2 s_2) \mathop{\mathrm{sinc}}(x_1/s_1-n_1) \mathop{\mathrm{sinc}}(x_2/s_2-n_2) \quad \text{where} \quad \mathop{\mathrm{sinc}}(u) = \frac{\sin(\pi u)}{\pi u}.

2.5.4 Convolution in higher dimension.

Convolution on Xd\mathbb{X}^d, for X=R\mathbb{X}=\mathbb{R} or X=R/2πZ\mathbb{X}=\mathbb{R}/2\pi\mathbb{Z}, is defined as in one dimension:

fg(x)=Xdf(t)g(xt)dt.f \star g(x) = \int_{\mathbb{X}^d} f(t) g(x-t) \mathrm{d}t.

Similarly, finite discrete convolution of vectors fRN1×N2f \in \mathbb{R}^{N_1 \times N_2} extends formula (2.11) as

n[ ⁣[0,N11] ⁣]×[ ⁣[0,N21] ⁣],(fg)n:=k1=0N11k2=0N21fkgnk\forall \,n \in \lbrack\!\lbrack 0,N_1-1\rbrack\!\rbrack \times \lbrack\!\lbrack 0,N_2-1\rbrack\!\rbrack, \quad (f \star g)_n \mathrel{:=}\sum_{k_1=0}^{N_1-1} \sum_{k_2=0}^{N_2-1} f_k g_{n-k}

where additions and subtractions of vectors are performed modulo (N1,N2)(N_1,N_2).

The Fourier-convolution identity F(fg)=f^g^\mathcal{F}(f \star g)=\hat f \odot \hat g holds in each of these settings. In the finite case, it yields an O(Nlog(N))O(N \log(N)) convolution algorithm even when ff and gg have large support.

2.6 Application to ODEs and PDEs

2.6.1 On Continuous Domains

We give the main calculations, leaving analytic details of existence and regularity aside.

On X=R\mathbb{X}=\mathbb{R} or T\mathbb{T}, one has

F(f(k))(ω)=(iω)kf^(ω).\mathcal{F}( f^{(k)} )(\omega) = (\mathrm{i}\omega)^k \hat f(\omega).

Intuitively, f(k)=fδ(k)f^{(k)} = f \star \delta^{(k)} where δ(k)\delta^{(k)} is a distribution with Fourier transform δ^(k)(ω)=(iω)k\hat \delta^{(k)}(\omega) = (\mathrm{i}\omega)^k.

Similarly on X=Rd\mathbb{X}=\mathbb{R}^d (see Section 2.5 for the definition of the Fourier transform in dimension dd), one has

F(Δf)(ω)= ⁣ω ⁣2f^(ω)(2.15)\mathcal{F}(\Delta f)(\omega) = -|\!| \omega |\!|^2 \hat f(\omega) \tag{2.15}

The same identity holds on Td\mathbb{T}^d, with ω\omega replaced by nZdn \in \mathbb{Z}^d.

Fourier transforms and Fourier coefficients provide a powerful tool for studying linear differential equations with constant coefficients by turning them into algebraic equations.

Figure 2.18. Heat diffusion as a convolution.

As a typical example, we consider the heat equation

ftt=Δftω,f^t(ω)t= ⁣ω ⁣2f^(ω).\frac{\partial f_t}{\partial t} = \Delta f_t \quad\Longrightarrow\quad \forall \,\omega, \quad \frac{\partial \hat f_t(\omega)}{\partial t} = -|\!| \omega |\!|^2 \hat f(\omega).

Hence f^t(ω)=f^0(ω)e ⁣ω ⁣2t\hat f_t(\omega) = \hat f_0(\omega) e^{-|\!| \omega |\!|^2 t}. Applying the inverse Fourier transform and the convolution theorem gives

ft=Gtf0whereGt=1(4πt)d/2e ⁣x ⁣24tf_t = G_t \star f_0 \quad \text{where} \quad G_t=\frac{1}{(4\pi t)^{d/2}} e^{-\frac{|\!| x |\!|^2}{4t}}

On Rd\mathbb{R}^d, GtG_t is a Gaussian density with standard deviation 2t\sqrt{2t} in each direction. On the torus, periodize this kernel and adjust its mass to the chosen Haar normalization.

2.6.2 Finite Domain and Discretization

On Z/NZ\mathbb{Z}/N\mathbb{Z}, corresponding to a discrete periodic domain, consider the forward first difference and the centered second difference:

D1f:=N(fn+1fn)n=fd1whered1=N[1,0,,0,1]RN,(2.16)\begin{aligned} D_1 f &\mathrel{:=}N(f_{n+1}-f_n)_n=f\star d_1 \quad \text{where} \quad d_1=N[-1,0,\ldots,0,1]^\top \in \mathbb{R}^N, \end{aligned} \tag{2.16}
D2f=D1D1f:=N2(fn+1+fn12fn)n=fd2whered2=d1dˉ1=N2[2,1,0,,0,1]RN.(2.17)\begin{aligned} D_2 f=-D_1^\top D_1 f & \mathrel{:=}N^2 (f_{n+1}+f_{n-1}-2f_n)_n = f \star d_2 \quad \text{where} \quad d_2=-d_1\star\bar d_1=N^2[-2,1,0,\ldots,0,1]^\top \in \mathbb{R}^N. \end{aligned} \tag{2.17}

Figure 2.19. Comparison of the spectra of Δ\Delta and D2D_2.

Thanks to Proposition 2.5, one can equivalently compute

F(D2f)=d^2f^where(d^2)k=N2(e2iπNk+e2iπNk2)=4N2sin(πkN)2.(2.18)\mathcal{F}( D_2 f ) = \hat d_2 \odot \hat f \quad \text{where} \quad (\hat d_2)_k = N^2 ( e^{\frac{2\mathrm{i}\pi}{N}k}+e^{-\frac{2\mathrm{i}\pi}{N}k} - 2 ) = -4N^2 \sin\left( \frac{\pi k}{N} \right)^2. \tag{2.18}

Here dˉ1[n]=d1[n]\bar d_1[n]=d_1[-n] denotes periodic reflection. For fixed nonzero kk and NN\to\infty, one has (d^2)k(2πk)2(\hat d_2)_k \sim -(2\pi k)^2 which matches the scaling of (2.15).

2.7 A Bit of Group Theory

The reference for this section is [26].

2.7.1 Characters

For (G,+)(G,+) a commutative group, a character is a group morphism χ:(G,+)(C,)\chi : (G,+) \rightarrow (\mathbb{C}^*,\cdot), i.e. it satisfies

(n,m)G,χ(n+m)=χ(n)χ(m).\forall \,(n,m) \in G, \quad \chi(n+m) = \chi(n)\chi(m).

The characters form the dual group (G^,)(\hat G,\odot) under pointwise multiplication (χ1χ2)(n):=χ1(n)χ2(n)(\chi_1 \odot \chi_2)(n) \mathrel{:=}\chi_1(n) \chi_2(n). The inverse of a character χ\chi is χ1(n)=χ(n)\chi^{-1}(n)=\chi(-n).

For a finite group GG with G=N|G|=N, we have N×n=0N \times n=0 for every nGn \in G. Consequently, χ(n)N=χ(Nn)=χ(0)=1\chi(n)^N=\chi(N n)=\chi(0)=1: characters take values among the roots of unity,

χ(n){e2iπNk  ;  0kN1}.(2.19)\chi(n) \in \left\{ e^{\frac{2\mathrm{i}\pi}{N}k} \;;\; 0 \leqslant k \leqslant N-1 \right\} . \tag{2.19}

Thus G^\hat G is a finite group (since there are finitely many maps between two finite sets) and χ1=χˉ\chi^{-1}=\bar\chi. In the case of a cyclic group, the dual is simple to describe.

This proposition thus shows that characters of cyclic groups are exactly the orthogonal discrete Fourier basis defined in (2.8).

Commutative groups.

The structure theorem for finitely generated abelian groups expresses every such group as a product of cyclic groups:

G(Z/N1Z)××(Z/NdZ)×ZQ.(2.20)G \sim (\mathbb{Z}/N_1\mathbb{Z}) \times \ldots \times (\mathbb{Z}/N_d\mathbb{Z}) \times \mathbb{Z}^Q. \tag{2.20}

If GG is finite, then Q=0Q=0 and N=N1NdN=N_1\cdots N_d. In this case, GG is simply a discrete dd-dimensional “rectangle” with periodic boundary conditions.

For two finite groups (G1,G2)(G_1,G_2) one has

G1×G2^=G^1G^2={χ1χ2  ;  (χ1,χ2)G^1×G^2}.(2.21)\widehat{G_1 \times G_2} = \hat G_1 \otimes \hat G_2 = \left\{ \chi_1 \otimes \chi_2 \;;\; (\chi_1,\chi_2) \in \hat G_1 \times \hat G_2 \right\} . \tag{2.21}

Here \otimes is the tensor product of two functions

(n1,n2)G1×G2,(χ1χ2)(n1,n2):=χ1(n1)χ2(n2).\forall \,(n_1,n_2) \in G_1 \times G_2, \quad (\chi_1 \otimes \chi_2)(n_1,n_2) \mathrel{:=}\chi_1(n_1)\chi_2(n_2).

The tensor product χ1χ2\chi_1 \otimes \chi_2 is a character. Conversely, every character has the factorization χ=χ(,0)χ(0,)\chi=\chi(\cdot,0) \otimes \chi(0,\cdot), since (n1,n2)=(n1,0)+(0,n2)(n_1,n_2)=(n_1,0)+(0,n_2).

Combining this factorization with the structure theorem proves the following isomorphism.

The isomorphism G^G\hat G \sim G is noncanonical: it depends on a choice of generators and corresponding roots of unity. As in vector-space duality, the double-dual isomorphism G^^G\hat{\hat{G}} \sim G is canonical and is given by evaluation:

gGegG^^where(eg:χG^χ(g)C.)g \in G \longmapsto e_g \in \hat{\hat{G}} \quad \text{where} \quad \left( e_g : \chi \in \hat G \mapsto \chi(g) \in \mathbb{C}^*. \right)

Discrete Fourier transform from the Character Viewpoint.

This construction also identifies the Fourier basis explicitly. The characters in G^\hat G_\ell are the discrete Fourier atoms (2.8), of the form

(e2iπNkn)n=0N1for some0k<N.( e^{\frac{2\mathrm{i}\pi}{N_\ell} k_\ell n_\ell})_{n_\ell=0}^{N_\ell-1} \quad\text{for some}\quad 0 \leqslant k_\ell < N_\ell.

Identifying GG and G1××GdG_1 \times \ldots \times G_d, their tensor products show that the characters in G^\hat G form exactly the orthogonal multidimensional Fourier basis (2.13).

2.7.2 More General cases

Infinite groups.

For an infinite finitely generated abelian group, the structure theorem has Q>0Q>0. For locally compact abelian groups, the dual consists of continuous characters with values on the unit circle; invariant Haar measure determines integration. For G=ZG=\mathbb{Z}, the characters have a continuous frequency parameter,

Z^={φω:neinωCZ  ;  ωR/2πZ}\hat{\mathbb{Z}}= \left\{ \varphi_\omega: n \mapsto e^{\mathrm{i}n \omega} \in \mathbb{C}^\mathbb{Z} \;;\; \omega\in \mathbb{R}/2\pi\mathbb{Z} \right\}

so that Z^R/2πZ\hat{\mathbb{Z}}\sim \mathbb{R}/2\pi\mathbb{Z}.

The case G=ZQG=\mathbb{Z}^Q follows by tensorization.

The (φω)ω(\varphi_\omega)_\omega are “orthogonal” in the sense that φω,φωZ=2πδ2π(ωω)\langle \varphi_\omega,\,\varphi_{\omega'}\rangle_\mathbb{Z}=2\pi\delta_{2\pi}(\omega-\omega') can be understood as a Dirac kernel (this is similar to the Poisson formula), where u,vZ:=nunvˉn\langle u,\,v\rangle_\mathbb{Z}\mathrel{:=}\sum_n u_n \bar v_n.

Expanding a sequence (cn)nZ(c_n)_{n \in \mathbb{Z}} in characters amounts to forming the Fourier series ncneinω\sum_n c_n e^{-\mathrm{i}n \omega}.

Similarly, for G=R/2πZG=\mathbb{R}/2\pi\mathbb{Z}, one has G^=Z\hat G=\mathbb{Z}, with orthonormal characters φn=ein\varphi_n=e^{\mathrm{i}\cdot n}, so that the decomposition of functions in L2(G)L^2(G) is the computation of Fourier coefficients.

On a compact group, normalized invariant measure provides the natural L2L^2 inner product.

Non-commutative groups.

For a noncommutative group, one-dimensional characters do not recover GG. For example, the symmetric group ΣN\Sigma_N on N2N\geqslant 2 letters has only the characters G^={1,ε}\hat G=\{1,\varepsilon\}, where ε(σ)=(1)q\varepsilon(\sigma) = (-1)^{q} is the signature and qq is the number of transpositions in a decomposition of σΣN\sigma\in \Sigma_N.

To study noncommutative groups, replace homomorphisms χ:GC\chi : G \rightarrow \mathbb{C}^* by homomorphisms ρ:GGL(Cnρ)\rho : G \rightarrow \text{GL}(\mathbb{C}^{n_\rho}) for some nρn_\rho. These are called representations of GG. For (g,g)G(g,g') \in G, writing the group operation multiplicatively on GG, the defining identity is ρ(gg)=ρ(g)ρ(g)\rho(gg')=\rho(g) \circ \rho(g'). When nρ=1n_\rho=1, the identification GL(C)C\text{GL}(\mathbb{C}) \sim \mathbb{C}^* recovers the one-dimensional characters. For any representation ρ\rho, the function χ(g):=tr(ρ(g))\chi(g) \mathrel{:=}\mathop{\mathrm{tr}}(\rho(g)), where tr\mathop{\mathrm{tr}} denotes trace, is called its character. This trace function is generally not a group homomorphism.

For a finite group GG, every subspace VV invariant under all ρ(g)\rho(g) admits an invariant complement WW, so that Cnρ=VW\mathbb{C}^{n_\rho}=V\oplus W with WW also invariant. In a basis adapted to these subspaces, the representation matrices are block diagonal. To construct the complement, use the inner product

x,y:=gGρ(g)x,ρ(g)yCnρ\langle x,\,y\rangle \mathrel{:=}\sum_{g \in G} \langle \rho(g)x,\,\rho(g)y\rangle_{\mathbb{C}^{n_\rho}}

and take the orthogonal complement VV^\bot for this inner product. In an orthonormal basis of Cnρ\mathbb{C}^{n_\rho} for this product, all matrices ρ(g)\rho(g) are unitary.

A representation is irreducible if it has no nonzero proper invariant subspace. These are the elementary representations from which larger ones are built by block-diagonal assembly.

We identify irreducible representations up to isomorphism: (ρ,ρ)(\rho,\rho') are isomorphic if ρ(g)=U1ρ(g)U\rho'(g)=U^{-1}\rho(g)U for every gg, with a single change-of-basis matrix UGL(Cd)U \in \text{GL}(\mathbb{C}^d). Their isomorphism classes form the unitary dual, denoted G^\hat G, which is generally a set rather than a group.

For the symmetric group, there is an explicit description of the set of irreducible representations.

For example, G=Σ3G=\Sigma_3 has G=6|G|=6 elements. It has two one-dimensional representations, the trivial representation and the signature, and one two-dimensional irreducible representation obtained by identifying GG with the isometries of an equilateral triangle in R2\mathbb{R}^2. Their dimensions satisfy 6=G=nρ2=1+1+226 = |G| = \sum n_\rho^2 = 1+1+2^2.

The dimensions nρn_\rho of the irreducible representations ρG^\rho\in\hat G satisfy ρG^nρ2=N\sum_{\rho \in \hat G} n_\rho^2 = N. After choosing unitary representatives, their matrix entries form an orthogonal basis for functions f:GCf : G \rightarrow \mathbb{C}. This basis is noncanonical because it depends on a choice of basis within each representation.

The associated Fourier transform of a function f:GCf:G\rightarrow\mathbb{C} is defined as

ρG^,f^(ρ):=gGf(g)ρ(g)Cnρ×nρ.\forall \,\rho \in \hat G, \quad \hat f(\rho) \mathrel{:=}\sum_{g \in G} f(g) \rho(g) \in \mathbb{C}^{n_\rho \times n_\rho}.

With this sign convention, these are pairings with conjugated matrix entries. Their orthogonality makes the transform invertible.

The next proposition gives the inverse transform.

One can define the convolution of two functions f,h:GCf,h : G \rightarrow \mathbb{C} as

(fh)(a):=bc=af(b)h(c)(f \star h)(a) \mathrel{:=}\sum_{bc=a} f(b) h(c)

Convolution need not be commutative on this group. The Fourier transform block-diagonalizes the convolution operators, as stated next.

Fast algorithms for computing f^\hat f exist for some groups, including permutation groups. Their structure is considerably more involved than for G=Z/NZG=\mathbb{Z}/N\mathbb{Z}.

For infinite compact groups, the theory uses a discrete infinite family of irreducible representations. The rotation group SO(3)(3) is a useful example. Its representations can be described explicitly through the spherical harmonics introduced in Section 2.8.2. There is one representation of dimension 2+12\ell+1 for each frequency index \ell.

2.8 A Bit of Spectral Theory

On a general domain X\mathbb{X}, the group-theoretic approach applies when X=G\mathbb{X}=G is a group or when a group acts transitively on X\mathbb{X}. Another approach defines Fourier-like basis functions as eigenfunctions of a differential operator, following the characterization in Section 2.6. The Laplacian is particularly useful: it is second order, rotation invariant, and has natural counterparts on surfaces and graphs.

2.8.1 On a Surface or a Manifold

Figure 2.20. Computing the Laplacian on a surface.

Let X\mathbb{X} be a smooth compact connected Riemannian manifold of dimension dd, without boundary. The Laplace–Beltrami operator can be characterized, for smooth ff, by the small-ball mean-value expansion

(Δf)(x)=limε02(d+2)ε2(1Vol(Bε(x))Bε(x)f(y)dμ(y)f(x)).(\Delta f)(x)=\lim_{\varepsilon\to0}\frac{2(d+2)}{\varepsilon^2} \left(\frac{1}{\mathrm{Vol}(B_\varepsilon(x))}\int_{B_\varepsilon(x)}f(y)\,\mathrm{d}\mu(y)-f(x)\right).

Here μ\mu is Riemannian volume and Bε(x)B_\varepsilon(x) is the geodesic ball centered at xx. The factor ε2\varepsilon^{-2} is essential.

The operator Δ\Delta is unbounded and self-adjoint on its natural domain in L2(X)L^2(\mathbb{X}); its resolvent is compact. It has a complete orthonormal family of eigenfunctions (φn)n0(\varphi_n)_{n\geqslant 0}, with eigenvalues, counted with multiplicity,

0=λ0>λ1λ2.0=\lambda_0>\lambda_1\geqslant\lambda_2\geqslant\cdots\longrightarrow-\infty.

The constant eigenfunction is φ0=Vol(X)1/2\varphi_0=\mathrm{Vol}(\mathbb{X})^{-1/2}, and the inner product is f,gX=Xf(x)g(x)dμ(x)\langle f,\,g\rangle_\mathbb{X}=\int_\mathbb{X}f(x)\overline{g(x)}\,\mathrm{d}\mu(x). Boundary conditions must be specified if the manifold has a boundary.

On the flat unit torus X=(R/Z)d\mathbb{X}=(\mathbb{R}/\mathbb{Z})^d,

Δf=s=1d2fxs2,φn(x)=e2πin,x,λn=4π2 ⁣n ⁣2,nZd.\Delta f=\sum_{s=1}^d\frac{\partial^2f}{\partial x_s^2}, \qquad\varphi_n(x)=e^{2\pi\mathrm{i}\langle n,\,x\rangle}, \qquad\lambda_n=-4\pi^2|\!| n |\!|^2,\quad n\in\mathbb{Z}^d.

2.8.2 Spherical Harmonics

Figure 2.21. Spherical coordinates.

Consider the (d1)(d-1)-dimensional sphere Sd1={xRd  ;   ⁣x ⁣Rd=1}\mathbb{S}^{d-1} = \left\{ x \in \mathbb{R}^d \;;\; |\!| x |\!|_{\mathbb{R}^d}=1 \right\}.

The Laplacian has explicit eigenfunctions. For d=3d=3, they are indexed by n=(,m)n=(\ell,m):

N,m=,,,φ,m(θ,φ)=eimφPm(cos(θ))\forall \,\ell \in \mathbb{N}, \quad \forall \,m=-\ell,\ldots,\ell, \quad \varphi_{\ell,m}(\theta,\varphi) = e^{\mathrm{i}m \varphi} P_{\ell}^m( \cos(\theta) )

The corresponding eigenvalue is λ,m=(+1)\lambda_{\ell,m} = -\ell(\ell+1). Here PmP_{\ell}^m are associated Legendre functions (polynomials multiplied by (1x2)m/2(1-x^2)^{|m|/2}). Normalization makes the eigenfunctions orthonormal. We use spherical coordinates x=(sinθcosφ,sinθsinφ,cosθ)S2x=(\sin\theta\cos\varphi,\sin\theta\sin\varphi,\cos\theta)\in\mathbb S^2 for (θ,φ)[0,π]×[0,2π](\theta,\varphi) \in [0,\pi] \times [0,2\pi].

The index \ell plays the role of the magnitude of a two-dimensional Fourier frequency.

For a fixed \ell, the space V=span(φ,m)V_\ell = \text{span}( \varphi_{\ell,m} ) is an eigenspace of Δ\Delta, and is also invariant under rotation.

2.8.3 On a Graph

Figure 2.22. Weighted graph.

Let X\mathbb{X} be a graph with NN vertices indexed by {1,,N}\{1,\ldots,N\}. Its geometry is encoded by the weight matrix W=(wi,j)1i,jNW=(w_{i,j})_{1\leqslant i,j\leqslant N}. The notation iji \sim j means that (i,j)(i,j) is an edge, for (i,j)X2(i,j) \in \mathbb{X}^2. Set the weights to zero on nonedges and assume nonnegative, symmetric weights: wi,j=wj,iw_{i,j}=w_{j,i}.

The graph Laplacian Δ:RNRN\Delta:\mathbb{R}^N\to\mathbb{R}^N sums weighted differences between neighboring values

fRN,(Δf)i:=jiwi,jfj(jiwi,j)fiΔ=WD\forall \,f \in \mathbb{R}^N, \quad (\Delta f)_i \mathrel{:=}\sum_{j \sim i} w_{i,j} f_j - (\sum_{j \sim i} w_{i,j}) f_i \quad\Longrightarrow\quad \Delta = W-D

where D:=diagi(jiwi,j)D \mathrel{:=}\mathop{\mathrm{diag}}_i(\sum_{j \sim i} w_{i,j}). In particular, note that Δ1=0\Delta\mathbb{1}=0.

For instance, if X=Z/NZ\mathbb{X}= \mathbb{Z}/N\mathbb{Z} with the graph ii1i \sim i-1 and ii+1i \sim i+1 (modulo NN), then Δ\Delta is the finite difference Laplacian operator Δ=N2D2\Delta=N^{-2}D_2 for unit edge weights defined in (2.17). This extends to any dimension by tensorization.

Thus Δ\Delta is symmetric negative semidefinite and has an orthonormal eigenbasis. One can take φ1=N1/21\varphi_1=N^{-1/2}\mathbb{1}, with 0=λ1λ2λN0=\lambda_1\geqslant\lambda_2\geqslant\cdots\geqslant\lambda_N. The multiplicity of zero is the number of connected components of the graph formed by the positive-weight edges; for a connected graph with N>1N>1, λ2<0\lambda_2<0. On a uniform periodic grid, the Fourier basis is an eigenbasis.

The quadratic energy i<jwij(fifj)2\sum_{i<j}w_{ij}(f_i-f_j)^2 is the discrete analogue of the Dirichlet energy and provides a natural measure of smoothness on a graph.

2.8.4 Further Applications

Polynomial multiplication provides another application (Code text_polymult.m).

Analogous transforms can also be defined over suitable finite fields.