# Fourier series

A Fourier series (/ˈfʊri, -iər/) is a sum that represents a periodic function as a sum of sine and cosine waves. The frequency of each wave in the sum, or harmonic, is an integer multiple of the periodic function's fundamental frequency. Each harmonic's phase and amplitude can be determined using harmonic analysis. A Fourier series may potentially contain an infinite number of harmonics. Summing part of but not all the harmonics in a function's Fourier series produces an approximation to that function. For example, using the first few harmonics of the Fourier series for a square wave yields an approximation of a square wave.

Almost any[A] periodic function can be represented by a Fourier series that converges.[B] Convergence of Fourier series means that as more and more harmonics from the series are summed, each successive partial Fourier series sum will better approximate the function, and will equal the function with a potentially infinite number of harmonics. The mathematical proofs for this may be collectively referred to as the Fourier Theorem (see § Convergence).

Fourier series can only represent functions that are periodic. However, non-periodic functions can be handled using an extension of the Fourier Series called the Fourier transform which treats non-periodic functions as periodic with infinite period. This transform thus can generate frequency domain representations of non-periodic functions as well as periodic functions, allowing a waveform to be converted between its time domain representation and its frequency domain representation.

Since Fourier's time, many different approaches to defining and understanding the concept of Fourier series have been discovered, all of which are consistent with one another, but each of which emphasizes different aspects of the topic. Some of the more powerful and elegant approaches are based on mathematical ideas and tools that were not available in Fourier's time. Fourier originally defined the Fourier series for real-valued functions of real arguments, and used the sine and cosine functions as the basis set for the decomposition. Many other Fourier-related transforms have since been defined, extending his initial idea to many applications and birthing an area of mathematics called Fourier analysis.

## Definition

The Fourier series $s_{\scriptscriptstyle N}(x)$  represents a synthesis of a periodic function $s(x)$  by summing harmonically related sinusoids (called harmonics) whose coefficients are determined by harmonic analysis.

### Common forms

The Fourier series can be represented in different forms. The amplitude-phase form, sine-cosine form, and exponential form are commonly used and are expressed here for a real-valued function $s(x)$ . (See § Complex-valued functions and § Other common notations for alternative forms).

The number of terms summed, $N$ , is a potentially infinite integer. Even so, the series might not converge or exactly equate to $s(x)$  at all values of $x$  (such as a single-point discontinuity) in the analysis interval. For the well-behaved functions typical of physical processes, equality is customarily assumed, and the Dirichlet conditions provide sufficient conditions.

The integer index, $n$ , is also the number of cycles the $n^{\text{th}}$  harmonic makes in the function's period $P$ .[C] Therefore:

• The $n^{\text{th}}$  harmonic's wavelength is ${\tfrac {P}{n}}$  and in units of $x$ .
• The $n^{\text{th}}$  harmonic's frequency is ${\tfrac {n}{P}}$  and in reciprocal units of $x$ .

Fig 1. The top graph shows a non-periodic function s(x) in blue defined only over the red interval from 0 to P. The function can be analyzed over this interval to produce the Fourier series in the bottom graph. The Fourier series is always a periodic function, even if original function s(x) wasn't.

#### Amplitude-phase form

The Fourier series in amplitude-phase form is:

Fourier series, amplitude-phase form
$s_{\scriptscriptstyle N}(x)={\frac {A_{0}}{2}}+\sum _{n=1}^{N}A_{n}\cdot \cos \left({\tfrac {2\pi }{P}}nx-\varphi _{n}\right)$

(Eq.1)

• Its $n^{\text{th}}$  harmonic is $A_{n}\cdot \cos \left({\tfrac {2\pi }{P}}nx-\varphi _{n}\right)$ .
• $A_{n}$  is the $n^{\text{th}}$  harmonic's amplitude and $\varphi _{n}$  is its phase shift.
• The fundamental frequency of $s_{\scriptscriptstyle N}(x)$  is the term for when $n$  equals 1, and can be referred to as the $1^{\text{st}}$  harmonic.
• ${\tfrac {A_{o}}{2}}$  is sometimes called the $0^{\text{th}}$  harmonic or DC component. It is the mean value of $s(x)$ .

Clearly Eq.1 can represent functions that are just a sum of one or more of the harmonic frequencies. The remarkable thing, for those not yet familiar with this concept, is that it can also represent the intermediate frequencies and/or non-sinusoidal functions because of the potentially infinite number of terms ($N$ ).

Fig 2. The blue curve is the cross-correlation of a square wave and a cosine function, as the phase lag of the cosine varies over one cycle. The amplitude and phase lag at the maximum value are the polar coordinates of one harmonic in the Fourier series expansion of the square wave. The corresponding Cartesian coordinates can be determined by evaluating the cross-correlation at just two phase lags separated by 90º.

The coefficients $A_{n}$  and $\varphi _{n}$  can be determined by a harmonic analysis process. Consider a real-valued function $s(x)$  that is integrable on an interval that starts at any $x_{0}$  and has length $P$ . The cross-correlation function:

$\mathrm {X} _{f}(\tau )={\tfrac {2}{P}}\int _{x_{0}}^{x_{0}+P}s(x)\cdot \cos \left(2\pi f(x-\tau )\right)\,dx;\quad \tau \in \left[0,{\tfrac {2\pi }{f}}\right]$

(Eq.2)

is essentially a matched filter, with template $\cos(2\pi fx)$ .[D] The maximum of $\mathrm {X} _{f}(\tau )$  is a measure of the amplitude $(A)$  of frequency $f$  in the function $s(x)$ , and the value of $\tau$  at the maximum determines the phase $(\varphi )$  of that frequency. Figure 2 is an example, where $s(x)$  is a square wave (not shown), and frequency $f$  is the $4^{\text{th}}$  harmonic.

Rather than computationally intensive cross-correlation which requires evaluating every phase, Fourier analysis exploits a trigonometric identity:

Equivalence of polar and Cartesian forms
$\cos \left({\tfrac {2\pi }{P}}nx-\varphi _{n}\right)\ \equiv \ \cos(\varphi _{n})\cdot \cos \left({\tfrac {2\pi }{P}}nx\right)+\sin(\varphi _{n})\cdot \sin \left({\tfrac {2\pi }{P}}nx\right)$

(Eq.3)

Substituting this into Eq.2 gives:

{\begin{aligned}\mathrm {X} _{n}(\varphi )&={\tfrac {2}{P}}\int _{P}s(x)\cdot \cos \left({\tfrac {2\pi }{P}}nx-\varphi \right)\,dx;\quad \varphi \in [0,2\pi ]\\&=\cos(\varphi )\cdot \underbrace {{\tfrac {2}{P}}\int _{P}s(x)\cdot \cos \left({\tfrac {2\pi }{P}}nx\right)\,dx} _{\triangleq \ a_{n}}+\sin(\varphi )\cdot \underbrace {{\tfrac {2}{P}}\int _{P}s(x)\cdot \sin \left({\tfrac {2\pi }{P}}nx\right)\,dx} _{\triangleq \ b_{n}}\\&=\cos(\varphi )\cdot a_{n}+\sin(\varphi )\cdot b_{n}\end{aligned}}

Note the definitions of $a_{n}$  and $b_{n}$ , and that $a_{0}$  and $b_{0}$  can be simplified:

$a_{0}={\tfrac {2}{P}}\int _{P}s(x)dx~,\quad b_{0}=0~.$

The derivative of $\mathrm {X} _{n}(\varphi )$  is zero at the phase of maximum correlation.
$\mathrm {X} '_{n}(\varphi _{n})=\sin(\varphi _{n})\cdot a_{n}-\cos(\varphi _{n})\cdot b_{n}=0\quad \longrightarrow \quad \tan(\varphi _{n})={\frac {b_{n}}{a_{n}}}\quad \longrightarrow \quad \varphi _{n}=\arctan(b_{n},a_{n})$

And the correlation peak value is:
{\begin{aligned}A_{n}\triangleq \mathrm {X} _{n}(\varphi _{n})\ &=\cos(\varphi _{n})\cdot a_{n}+\sin(\varphi _{n})\cdot b_{n}\\&={\frac {a_{n}}{\sqrt {a_{n}^{2}+b_{n}^{2}}}}\cdot a_{n}+{\frac {b_{n}}{\sqrt {a_{n}^{2}+b_{n}^{2}}}}\cdot b_{n}={\frac {a_{n}^{2}+b_{n}^{2}}{\sqrt {a_{n}^{2}+b_{n}^{2}}}}&={\sqrt {a_{n}^{2}+b_{n}^{2}}}.\end{aligned}}

$a_{n}$  and $b_{n}$  are the Cartesian coordinates of a vector with polar coordinates $A_{n}$  and $\varphi _{n}.$   Figure 2 is an example of these relationships.

#### Sine-cosine form

Substituting Eq.3 into Eq.1 gives:

$s_{\scriptscriptstyle N}(x)={\frac {A_{0}}{2}}+\sum _{n=1}^{N}\left[A_{n}\cos(\varphi _{n})\cdot \cos \left({\tfrac {2\pi }{P}}nx\right)+A_{n}\sin(\varphi _{n})\cdot \sin \left({\tfrac {2\pi }{P}}nx\right)\right]}$

In terms of the readily computed quantities, $a_{n}$  and $b_{n}$ , recall that:

$\cos(\varphi _{n})=a_{n}/A_{n}$
$\sin(\varphi _{n})=b_{n}/A_{n}$
$A_{0}={\sqrt {a_{0}^{2}+b_{0}^{2}}}={\sqrt {a_{0}^{2}}}=a_{0}$

Therefore an alternative form of the Fourier series, using the Cartesian coordinates, is the sine-cosine form:[E]

Fourier series, sine-cosine form
$s_{\scriptscriptstyle N}(x)={\frac {a_{0}}{2}}+\sum _{n=1}^{N}\left(a_{n}\cos \left({\tfrac {2\pi }{P}}nx\right)+b_{n}\sin \left({\tfrac {2\pi }{P}}nx\right)\right)$

(Eq.4)

#### Exponential form

Another applicable identity is Euler's formula:

{\begin{aligned}\cos \left({\tfrac {2\pi }{P}}nx-\varphi _{n}\right)&{}\equiv {\tfrac {1}{2}}e^{i\left(2\pi nx/P-\varphi _{n}\right)}+{\tfrac {1}{2}}e^{-i\left(2\pi nx/P-\varphi _{n}\right)}\\[6pt]&=\left({\tfrac {1}{2}}e^{-i\varphi _{n}}\right)\cdot e^{i2\pi (+n)x/P}+\left({\tfrac {1}{2}}e^{-i\varphi _{n}}\right)^{*}\cdot e^{i2\pi (-n)x/P}\end{aligned}}

(Note: the ∗ denotes complex conjugation.)

Therefore, with definitions:

$c_{n}\triangleq \left\{{\begin{array}{lll}A_{0}/2&=a_{0}/2,\quad &n=0\\{\tfrac {A_{n}}{2}}e^{-i\varphi _{n}}&={\tfrac {1}{2}}(a_{n}-ib_{n}),\quad &n>0\\c_{|n|}^{*},\quad &&n<0\end{array}}\right\}={\tfrac {1}{P}}\int _{P}s(x)\cdot e^{-i2\pi nx/P}\,dx,$

the final result is:

Fourier series, exponential form
$s_{_{N}}(x)=\sum _{n=-N}^{N}c_{n}\cdot e^{i2\pi nx/P}$

(Eq.5)

This is the customary form for generalizing to § Complex-valued functions. Negative values of $n$  correspond to negative frequency (explained in Fourier transform § Use of complex sinusoids to represent real sinusoids).

### Example

Plot of the sawtooth wave, a periodic continuation of the linear function $s(x)=x/\pi$  on the interval $(-\pi ,\pi ]$

Consider a sawtooth function:

$s(x)={\frac {x}{\pi }},\quad \mathrm {for} -\pi
$s(x+2\pi k)=s(x),\quad \mathrm {for} -\pi

In this case, the Fourier coefficients are given by

{\begin{aligned}a_{n}&={\frac {1}{\pi }}\int _{-\pi }^{\pi }s(x)\cos(nx)\,dx=0,\quad n\geq 0.\\[4pt]b_{n}&={\frac {1}{\pi }}\int _{-\pi }^{\pi }s(x)\sin(nx)\,dx\\[4pt]&=-{\frac {2}{\pi n}}\cos(n\pi )+{\frac {2}{\pi ^{2}n^{2}}}\sin(n\pi )\\[4pt]&={\frac {2\,(-1)^{n+1}}{\pi n}},\quad n\geq 1.\end{aligned}}

It can be shown that the Fourier series converges to $s(x)$  at every point $x$  where $s$  is differentiable, and therefore:

{\begin{aligned}s(x)&={\frac {a_{0}}{2}}+\sum _{n=1}^{\infty }\left[a_{n}\cos \left(nx\right)+b_{n}\sin \left(nx\right)\right]\\[4pt]&={\frac {2}{\pi }}\sum _{n=1}^{\infty }{\frac {(-1)^{n+1}}{n}}\sin(nx),\quad \mathrm {for} \quad x-\pi \notin 2\pi \mathbb {Z} .\end{aligned}}

(Eq.6)

When $x=\pi$ , the Fourier series converges to 0, which is the half-sum of the left- and right-limit of s at $x=\pi$ . This is a particular instance of the Dirichlet theorem for Fourier series.

This example leads to a solution of the Basel problem.

### Convergence

A proof that a Fourier series is a valid representation of any periodic function (that satisfies the Dirichlet conditions) is overviewed in § Fourier theorem proving convergence of Fourier series.

In engineering applications, the Fourier series is generally presumed to converge almost everywhere (the exceptions being at discrete discontinuities) since the functions encountered in engineering are better-behaved than the functions that mathematicians can provide as counter-examples to this presumption. In particular, if $s$  is continuous and the derivative of $s(x)$  (which may not exist everywhere) is square integrable, then the Fourier series of $s$  converges absolutely and uniformly to $s(x)$ . If a function is square-integrable on the interval $[x_{0},x_{0}+P]$ , then the Fourier series converges to the function at almost every point. It is possible to define Fourier coefficients for more general functions or distributions, in such cases convergence in norm or weak convergence is usually of interest.

### Complex-valued functions

If $s(x)$  is a complex-valued function of a real variable $x,$  both components (real and imaginary part) are real-valued functions that can be represented by a Fourier series. The two sets of coefficients and the partial sum are given by:

$c_{_{Rn}}={\frac {1}{P}}\int _{P}\operatorname {Re} \{s(x)\}\cdot e^{-i{\tfrac {2\pi }{P}}nx}\ dx$  and $c_{_{In}}={\frac {1}{P}}\int _{P}\operatorname {Im} \{s(x)\}\cdot e^{-i{\tfrac {2\pi }{P}}nx}\ dx$
$s_{_{N}}(x)=\sum _{n=-N}^{N}c_{_{Rn}}\cdot e^{i{\tfrac {2\pi }{P}}nx}+i\cdot \sum _{n=-N}^{N}c_{_{In}}\cdot e^{i{\tfrac {2\pi }{P}}nx}=\sum _{n=-N}^{N}\left(c_{_{Rn}}+i\cdot c_{_{In}}\right)\cdot e^{i{\tfrac {2\pi }{P}}nx}.$

Defining $c_{n}\triangleq c_{_{Rn}}+i\cdot c_{_{In}}$  yields:

$s_{_{N}}(x)=\sum _{n=-N}^{N}c_{n}\cdot e^{i{\tfrac {2\pi }{P}}nx}$

(Eq.7)

This is identical to Eq.5 except $c_{n}$  and $c_{-n}$  are no longer complex conjugates. The formula for $c_{n}$  is also unchanged:

{\begin{aligned}c_{n}&={\tfrac {1}{P}}\int _{P}\operatorname {Re} \{s(x)\}\cdot e^{-i{\frac {2\pi }{P}}nx}\ dx+i\cdot {\tfrac {1}{P}}\int _{P}\operatorname {Im} \{s(x)\}\cdot e^{-i{\tfrac {2\pi }{P}}nx}\ dx\\[4pt]&={\tfrac {1}{P}}\int _{P}\left(\operatorname {Re} \{s(x)\}+i\cdot \operatorname {Im} \{s(x)\}\right)\cdot e^{-i{\tfrac {2\pi }{P}}nx}\ dx\ =\ {\tfrac {1}{P}}\int _{P}s(x)\cdot e^{-i{\tfrac {2\pi }{P}}nx}\ dx.\end{aligned}}

### Other common notations

The notation $c_{n}$  is inadequate for discussing the Fourier coefficients of several different functions. Therefore, it is customarily replaced by a modified form of the function ($s$ , in this case), such as ${\hat {s}}[n]$  or $S[n]$ , and functional notation often replaces subscripting:

{\begin{aligned}s_{\infty }(x)&=\sum _{n=-\infty }^{\infty }{\hat {s}}[n]\cdot e^{i\,2\pi nx/P}\\[6pt]&=\sum _{n=-\infty }^{\infty }S[n]\cdot e^{i\,2\pi nx/P}&&{\mathsf {common\ engineering\ notation}}\end{aligned}}

In engineering, particularly when the variable $x$  represents time, the coefficient sequence is called a frequency domain representation. Square brackets are often used to emphasize that the domain of this function is a discrete set of frequencies.

Another commonly used frequency domain representation uses the Fourier series coefficients to modulate a Dirac comb:

$S(f)\ \triangleq \ \sum _{n=-\infty }^{\infty }S[n]\cdot \delta \left(f-{\frac {n}{P}}\right),$

where $f$  represents a continuous frequency domain. When variable $x$  has units of seconds, $f$  has units of hertz. The "teeth" of the comb are spaced at multiples (i.e. harmonics) of ${\tfrac {1}{P}}$ , which is called the fundamental frequency. $s_{\infty }(x)$  can be recovered from this representation by an inverse Fourier transform:

{\begin{aligned}{\mathcal {F}}^{-1}\{S(f)\}&=\int _{-\infty }^{\infty }\left(\sum _{n=-\infty }^{\infty }S[n]\cdot \delta \left(f-{\frac {n}{P}}\right)\right)e^{i2\pi fx}\,df,\\[6pt]&=\sum _{n=-\infty }^{\infty }S[n]\cdot \int _{-\infty }^{\infty }\delta \left(f-{\frac {n}{P}}\right)e^{i2\pi fx}\,df,\\[6pt]&=\sum _{n=-\infty }^{\infty }S[n]\cdot e^{i\,2\pi nx/P}\ \ \triangleq \ s_{\infty }(x).\end{aligned}}

The constructed function $S(f)$  is therefore commonly referred to as a Fourier transform, even though the Fourier integral of a periodic function is not convergent at the harmonic frequencies.[F]

## History

The Fourier series is named in honor of Jean-Baptiste Joseph Fourier (1768–1830), who made important contributions to the study of trigonometric series, after preliminary investigations by Leonhard Euler, Jean le Rond d'Alembert, and Daniel Bernoulli.[G] Fourier introduced the series for the purpose of solving the heat equation in a metal plate, publishing his initial results in his 1807 Mémoire sur la propagation de la chaleur dans les corps solides (Treatise on the propagation of heat in solid bodies), and publishing his Théorie analytique de la chaleur (Analytical theory of heat) in 1822. The Mémoire introduced Fourier analysis, specifically Fourier series. Through Fourier's research the fact was established that an arbitrary (at first, continuous and later generalized to any piecewise-smooth) function can be represented by a trigonometric series. The first announcement of this great discovery was made by Fourier in 1807, before the French Academy. Early ideas of decomposing a periodic function into the sum of simple oscillating functions date back to the 3rd century BC, when ancient astronomers proposed an empiric model of planetary motions, based on deferents and epicycles.

The heat equation is a partial differential equation. Prior to Fourier's work, no solution to the heat equation was known in the general case, although particular solutions were known if the heat source behaved in a simple way, in particular, if the heat source was a sine or cosine wave. These simple solutions are now sometimes called eigensolutions. Fourier's idea was to model a complicated heat source as a superposition (or linear combination) of simple sine and cosine waves, and to write the solution as a superposition of the corresponding eigensolutions. This superposition or linear combination is called the Fourier series.

From a modern point of view, Fourier's results are somewhat informal, due to the lack of a precise notion of function and integral in the early nineteenth century. Later, Peter Gustav Lejeune Dirichlet and Bernhard Riemann expressed Fourier's results with greater precision and formality.

Although the original motivation was to solve the heat equation, it later became obvious that the same techniques could be applied to a wide array of mathematical and physical problems, and especially those involving linear differential equations with constant coefficients, for which the eigensolutions are sinusoids. The Fourier series has many such applications in electrical engineering, vibration analysis, acoustics, optics, signal processing, image processing, quantum mechanics, econometrics, shell theory, etc.

### Beginnings

Joseph Fourier wrote:[dubious ]

$\varphi (y)=a_{0}\cos {\frac {\pi y}{2}}+a_{1}\cos 3{\frac {\pi y}{2}}+a_{2}\cos 5{\frac {\pi y}{2}}+\cdots .$

Multiplying both sides by $\cos(2k+1){\frac {\pi y}{2}}$ , and then integrating from $y=-1$  to $y=+1$  yields:

$a_{k}=\int _{-1}^{1}\varphi (y)\cos(2k+1){\frac {\pi y}{2}}\,dy.$

This immediately gives any coefficient ak of the trigonometrical series for φ(y) for any function which has such an expansion. It works because if φ has such an expansion, then (under suitable convergence assumptions) the integral

{\begin{aligned}a_{k}&=\int _{-1}^{1}\varphi (y)\cos(2k+1){\frac {\pi y}{2}}\,dy\\&=\int _{-1}^{1}\left(a\cos {\frac {\pi y}{2}}\cos(2k+1){\frac {\pi y}{2}}+a'\cos 3{\frac {\pi y}{2}}\cos(2k+1){\frac {\pi y}{2}}+\cdots \right)\,dy\end{aligned}}

can be carried out term-by-term. But all terms involving $\cos(2j+1){\frac {\pi y}{2}}\cos(2k+1){\frac {\pi y}{2}}$  for jk vanish when integrated from −1 to 1, leaving only the $k^{\text{th}}$  term.

In these few lines, which are close to the modern formalism used in Fourier series, Fourier revolutionized both mathematics and physics. Although similar trigonometric series were previously used by Euler, d'Alembert, Daniel Bernoulli and Gauss, Fourier believed that such trigonometric series could represent any arbitrary function. In what sense that is actually true is a somewhat subtle issue and the attempts over many years to clarify this idea have led to important discoveries in the theories of convergence, function spaces, and harmonic analysis.

When Fourier submitted a later competition essay in 1811, the committee (which included Lagrange, Laplace, Malus and Legendre, among others) concluded: ...the manner in which the author arrives at these equations is not exempt of difficulties and...his analysis to integrate them still leaves something to be desired on the score of generality and even rigour.[citation needed]

### Fourier's motivation

The Fourier series expansion of the sawtooth function (above) looks more complicated than the simple formula $s(x)={\tfrac {x}{\pi }}$ , so it is not immediately apparent why one would need the Fourier series. While there are many applications, Fourier's motivation was in solving the heat equation. For example, consider a metal plate in the shape of a square whose sides measure $\pi$  meters, with coordinates $(x,y)\in [0,\pi ]\times [0,\pi ]$ . If there is no heat source within the plate, and if three of the four sides are held at 0 degrees Celsius, while the fourth side, given by $y=\pi$ , is maintained at the temperature gradient $T(x,\pi )=x$  degrees Celsius, for $x$  in $(0,\pi )$ , then one can show that the stationary heat distribution (or the heat distribution after a long period of time has elapsed) is given by

$T(x,y)=2\sum _{n=1}^{\infty }{\frac {(-1)^{n+1}}{n}}\sin(nx){\sinh(ny) \over \sinh(n\pi )}.$

Here, sinh is the hyperbolic sine function. This solution of the heat equation is obtained by multiplying each term of Eq.6 by $\sinh(ny)/\sinh(n\pi )$ . While our example function $s(x)$  seems to have a needlessly complicated Fourier series, the heat distribution $T(x,y)$  is nontrivial. The function $T$  cannot be written as a closed-form expression. This method of solving the heat problem was made possible by Fourier's work.

### Complex Fourier series animation

Complex Fourier series tracing the letter 'e'. (The Julia source code that generates the frames of this animation is here in Appendix B.)

An example of the ability of the complex Fourier series to trace any two dimensional closed figure is shown in the adjacent animation of the complex Fourier series tracing the letter 'e' (for exponential). Note that the animation uses the variable 't' to parameterize the letter 'e' in the complex plane, which is equivalent to using the parameter 'x' in this article's subsection on complex valued functions.

In the animation's back plane, the rotating vectors are aggregated in an order that alternates between a vector rotating in the positive (counter clockwise) direction and a vector rotating at the same frequency but in the negative (clockwise) direction, resulting in a single tracing arm with lots of zigzags. This perspective shows how the addition of each pair of rotating vectors (one rotating in the positive direction and one rotating in the negative direction) nudges the previous trace (shown as a light gray dotted line) closer to the shape of the letter 'e'.

In the animation's front plane, the rotating vectors are aggregated into two sets, the set of all the positive rotating vectors and the set of all the negative rotating vectors (the non-rotating component is evenly split between the two), resulting in two tracing arms rotating in opposite directions. The animation's small circle denotes the midpoint between the two arms and also the midpoint between the origin and the current tracing point denoted by '+'. This perspective shows how the complex Fourier series is an extension (the addition of an arm) of the complex geometric series which has just one arm. It also shows how the two arms coordinate with each other. For example, as the tracing point is rotating in the positive direction, the negative direction arm stays parked. Similarly, when the tracing point is rotating in the negative direction, the positive direction arm stays parked.

In between the animation's back and front planes are rotating trapezoids whose areas represent the values of the complex Fourier series terms. This perspective shows the amplitude, frequency, and phase of the individual terms of the complex Fourier series in relation to the series sum spatially converging to the letter 'e' in the back and front planes. The audio track's left and right channels correspond respectively to the real and imaginary components of the current tracing point '+' but increased in frequency by a factor of 3536 so that the animation's fundamental frequency (n=1) is a 220 Hz tone (A220).

### Other applications

The discrete-time Fourier transform is an example of a Fourier series.

Another application is to solve the Basel problem by using Parseval's theorem. The example generalizes and one may compute ζ(2n), for any positive integern.

## Table of common Fourier series

Some common pairs of periodic functions and their Fourier Series coefficients are shown in the table below.

• $s(x)$  designates a periodic function defined on $0 .
• $a_{0},a_{n},b_{n}$  designate the Fourier Series coefficients (sine-cosine form) of the periodic function $s(x)$ .
Time domain
$s(x)$
Plot Frequency domain (sine-cosine form)
{\begin{aligned}&a_{0}\\&a_{n}\quad {\text{for }}n\geq 1\\&b_{n}\quad {\text{for }}n\geq 1\end{aligned}}
Remarks Reference
$s(x)=A\left|\sin \left({\frac {2\pi }{P}}x\right)\right|\quad {\text{for }}0\leq x  {\begin{aligned}a_{0}=&{\frac {4A}{\pi }}\\a_{n}=&{\begin{cases}{\frac {-4A}{\pi }}{\frac {1}{n^{2}-1}}&\quad n{\text{ even}}\\0&\quad n{\text{ odd}}\end{cases}}\\b_{n}=&0\\\end{aligned}}  Full-wave rectified sine : p. 193
$s(x)={\begin{cases}A\sin \left({\frac {2\pi }{P}}x\right)&\quad {\text{for }}0\leq x  {\begin{aligned}a_{0}=&{\frac {2A}{\pi }}\\a_{n}=&{\begin{cases}{\frac {-2A}{\pi }}{\frac {1}{n^{2}-1}}&\quad n{\text{ even}}\\0&\quad n{\text{ odd}}\end{cases}}\\b_{n}=&{\begin{cases}{\frac {A}{2}}&\quad n=1\\0&\quad n>1\end{cases}}\\\end{aligned}}  Half-wave rectified sine : p. 193
$s(x)={\begin{cases}A&\quad {\text{for }}0\leq x  {\begin{aligned}a_{0}=&2AD\\a_{n}=&{\frac {A}{n\pi }}\sin \left(2\pi nD\right)\\b_{n}=&{\frac {2A}{n\pi }}\left(\sin \left(\pi nD\right)\right)^{2}\\\end{aligned}}  $0\leq D\leq 1$
$s(x)={\frac {Ax}{P}}\quad {\text{for }}0\leq x  {\begin{aligned}a_{0}=&A\\a_{n}=&0\\b_{n}=&{\frac {-A}{n\pi }}\\\end{aligned}}  : p. 192
$s(x)=A-{\frac {Ax}{P}}\quad {\text{for }}0\leq x  {\begin{aligned}a_{0}=&A\\a_{n}=&0\\b_{n}=&{\frac {A}{n\pi }}\\\end{aligned}}  : p. 192
$s(x)={\frac {4A}{P^{2}}}\left(x-{\frac {P}{2}}\right)^{2}\quad {\text{for }}0\leq x  {\begin{aligned}a_{0}=&{\frac {2A}{3}}\\a_{n}=&{\frac {4A}{\pi ^{2}n^{2}}}\\b_{n}=&0\\\end{aligned}}  : p. 193

## Table of basic properties

This table shows some mathematical operations in the time domain and the corresponding effect in the Fourier series coefficients. Notation:

• Complex conjugation is denoted by an asterisk.
• $s(x),r(x)$  designate $P$ -periodic functions or functions defined only for $x\in [0,P].$
• $S[n],R[n]$  designate the Fourier series coefficients (exponential form) of $s$  and $r.$
Property Time domain Frequency domain (exponential form) Remarks Reference
Linearity $a\cdot s(x)+b\cdot r(x)$  $a\cdot S[n]+b\cdot R[n]$  $a,b\in \mathbb {C}$
Time reversal / Frequency reversal $s(-x)$  $S[-n]$  : p. 610
Time conjugation $s^{*}(x)$  $S^{*}[-n]$  : p. 610
Time reversal & conjugation $s^{*}(-x)$  $S^{*}[n]$
Real part in time $\operatorname {Re} {(s(x))}$  ${\frac {1}{2}}(S[n]+S^{*}[-n])$
Imaginary part in time $\operatorname {Im} {(s(x))}$  ${\frac {1}{2i}}(S[n]-S^{*}[-n])$
Real part in frequency ${\frac {1}{2}}(s(x)+s^{*}(-x))$  $\operatorname {Re} {(S[n])}$
Imaginary part in frequency ${\frac {1}{2i}}(s(x)-s^{*}(-x))$  $\operatorname {Im} {(S[n])}$
Shift in time / Modulation in frequency $s(x-x_{0})$  $S[n]\cdot e^{-i{\frac {2\pi x_{0}}{P}}n}$  $x_{0}\in \mathbb {R}$  : p. 610
Shift in frequency / Modulation in time $s(x)\cdot e^{i{\frac {2\pi n_{0}}{P}}x}$  $S[n-n_{0}]\!$  $n_{0}\in \mathbb {Z}$  : p. 610

## Symmetry properties

When the real and imaginary parts of a complex function are decomposed into their even and odd parts, there are four components, denoted below by the subscripts RE, RO, IE, and IO. And there is a one-to-one mapping between the four components of a complex time function and the four components of its complex frequency transform:

${\begin{array}{rccccccccc}{\text{Time domain}}&s&=&s_{_{\text{RE}}}&+&s_{_{\text{RO}}}&+&is_{_{\text{IE}}}&+&\underbrace {i\ s_{_{\text{IO}}}} \\&{\Bigg \Updownarrow }{\mathcal {F}}&&{\Bigg \Updownarrow }{\mathcal {F}}&&\ \ {\Bigg \Updownarrow }{\mathcal {F}}&&\ \ {\Bigg \Updownarrow }{\mathcal {F}}&&\ \ {\Bigg \Updownarrow }{\mathcal {F}}\\{\text{Frequency domain}}&S&=&S_{\text{RE}}&+&\overbrace {\,i\ S_{\text{IO}}\,} &+&iS_{\text{IE}}&+&S_{\text{RO}}\end{array}}$

From this, various relationships are apparent, for example:

• The transform of a real-valued function (sRE + sRO) is the even symmetric function SRE + i SIO. Conversely, an even-symmetric transform implies a real-valued time-domain.
• The transform of an imaginary-valued function (i sIE + i sIO) is the odd symmetric function SRO + i SIE, and the converse is true.
• The transform of an even-symmetric function (sRE + i sIO) is the real-valued function SRE + SRO, and the converse is true.
• The transform of an odd-symmetric function (sRO + i sIE) is the imaginary-valued function i SIE + i SIO, and the converse is true.

## Other properties

### Riemann–Lebesgue lemma

If $S$  is integrable, ${\textstyle \lim _{|n|\to \infty }S[n]=0}$ , ${\textstyle \lim _{n\to +\infty }a_{n}=0}$  and ${\textstyle \lim _{n\to +\infty }b_{n}=0.}$  This result is known as the Riemann–Lebesgue lemma.

### Parseval's theorem

If $s$  belongs to $L^{2}(P)$  (an interval of length $P$ ) then: ${\textstyle \sum _{n=-\infty }^{\infty }{\Bigl |}S[n]{\Bigr |}^{2}={\frac {1}{P}}\int _{P}|s(x)|^{2}\,dx.}$

### Plancherel's theorem

If $c_{0},\,c_{\pm 1},\,c_{\pm 2},\ldots$  are coefficients and ${\textstyle \sum _{n=-\infty }^{\infty }|c_{n}|^{2}<\infty }$  then there is a unique function $s\in L^{2}(P)$  such that $S[n]=c_{n}$  for every $n$ .

### Convolution theorems

Given $P$ -periodic functions, $s_{_{P}}$  and $r_{_{P}}$  with Fourier series coefficients $S[n]$  and $R[n],$  $n\in \mathbb {Z} ,$

• The pointwise product:
$h_{_{P}}(x)\triangleq s_{_{P}}(x)\cdot r_{_{P}}(x)$

is also $P$ -periodic, and its Fourier series coefficients are given by the discrete convolution of the $S$  and $R$  sequences:
$H[n]=\{S*R\}[n].$

• The periodic convolution:
$h_{_{P}}(x)\triangleq \int _{P}s_{_{P}}(\tau )\cdot r_{_{P}}(x-\tau )\,d\tau$

is also $P$ -periodic, with Fourier series coefficients:
$H[n]=P\cdot S[n]\cdot R[n].$

• A doubly infinite sequence $\left\{c_{n}\right\}_{n\in Z}$  in $c_{0}(\mathbb {Z} )$  is the sequence of Fourier coefficients of a function in $L^{1}([0,2\pi ])$  if and only if it is a convolution of two sequences in $\ell ^{2}(\mathbb {Z} )$ . See 

### Derivative property

We say that $s$  belongs to $C^{k}(\mathbb {T} )$  if $s$  is a 2π-periodic function on $\mathbb {R}$  which is $k$  times differentiable, and its $k^{\text{th}}$  derivative is continuous.

• If $s\in C^{1}(\mathbb {T} )$ , then the Fourier coefficients ${\widehat {s'}}[n]$  of the derivative $s'$  can be expressed in terms of the Fourier coefficients ${\widehat {s}}[n]$  of the function $s$ , via the formula ${\widehat {s'}}[n]=in{\widehat {s}}[n]$ .
• If $s\in C^{k}(\mathbb {T} )$ , then ${\widehat {s^{(k)}}}[n]=(in)^{k}{\widehat {s}}[n]$ . In particular, since for a fixed $k\geq 1$  we have ${\widehat {s^{(k)}}}[n]\to 0$  as $n\to \infty$ , it follows that $|n|^{k}{\widehat {s}}[n]$  tends to zero, which means that the Fourier coefficients converge to zero faster than the kth power of n for any $k\geq 1$ .

### Compact groups

One of the interesting properties of the Fourier transform which we have mentioned, is that it carries convolutions to pointwise products. If that is the property which we seek to preserve, one can produce Fourier series on any compact group. Typical examples include those classical groups that are compact. This generalizes the Fourier transform to all spaces of the form L2(G), where G is a compact group, in such a way that the Fourier transform carries convolutions to pointwise products. The Fourier series exists and converges in similar ways to the [−π,π] case.

An alternative extension to compact groups is the Peter–Weyl theorem, which proves results about representations of compact groups analogous to those about finite groups.

### Riemannian manifolds

If the domain is not a group, then there is no intrinsically defined convolution. However, if $X$  is a compact Riemannian manifold, it has a Laplace–Beltrami operator. The Laplace–Beltrami operator is the differential operator that corresponds to Laplace operator for the Riemannian manifold $X$ . Then, by analogy, one can consider heat equations on $X$ . Since Fourier arrived at his basis by attempting to solve the heat equation, the natural generalization is to use the eigensolutions of the Laplace–Beltrami operator as a basis. This generalizes Fourier series to spaces of the type $L^{2}(X)$ , where $X$  is a Riemannian manifold. The Fourier series converges in ways similar to the $[-\pi ,\pi ]$  case. A typical example is to take $X$  to be the sphere with the usual metric, in which case the Fourier basis consists of spherical harmonics.

### Locally compact Abelian groups

The generalization to compact groups discussed above does not generalize to noncompact, nonabelian groups. However, there is a straightforward generalization to Locally Compact Abelian (LCA) groups.

This generalizes the Fourier transform to $L^{1}(G)$  or $L^{2}(G)$ , where $G$  is an LCA group. If $G$  is compact, one also obtains a Fourier series, which converges similarly to the $[-\pi ,\pi ]$  case, but if $G$  is noncompact, one obtains instead a Fourier integral. This generalization yields the usual Fourier transform when the underlying locally compact Abelian group is $\mathbb {R}$ .

## Extensions

### Fourier series on a square

We can also define the Fourier series for functions of two variables $x$  and $y$  in the square $[-\pi ,\pi ]\times [-\pi ,\pi ]$ :

{\begin{aligned}f(x,y)&=\sum _{j,k\in \mathbb {Z} }c_{j,k}e^{ijx}e^{iky},\\[5pt]c_{j,k}&={\frac {1}{4\pi ^{2}}}\int _{-\pi }^{\pi }\int _{-\pi }^{\pi }f(x,y)e^{-ijx}e^{-iky}\,dx\,dy.\end{aligned}}

Aside from being useful for solving partial differential equations such as the heat equation, one notable application of Fourier series on the square is in image compression. In particular, the jpeg image compression standard uses the two-dimensional discrete cosine transform, a discrete form of the Fourier cosine transform, which uses only cosine as the basis function.

For two-dimensional arrays with a staggered appearance, half of the Fourier series coefficients disappear, due to additional symmetry.

### Fourier series of Bravais-lattice-periodic-function

A three-dimensional Bravais lattice is defined as the set of vectors of the form:

$\mathbf {R} =n_{1}\mathbf {a} _{1}+n_{2}\mathbf {a} _{2}+n_{3}\mathbf {a} _{3}$

where $n_{i}$  are integers and $\mathbf {a} _{i}$  are three linearly independent vectors. Assuming we have some function, $f(\mathbf {r} )$ , such that it obeys the condition of periodicity for any Bravais lattice vector $\mathbf {R}$ , $f(\mathbf {r} )=f(\mathbf {R} +\mathbf {r} )$ , we could make a Fourier series of it. This kind of function can be, for example, the effective potential that one electron "feels" inside a periodic crystal. It is useful to make the Fourier series of the potential when applying Bloch's theorem. First, we may write any arbitrary position vector $\mathbf {r}$  in the coordinate-system of the lattice:
$\mathbf {r} =x_{1}{\frac {\mathbf {a} _{1}}{a_{1}}}+x_{2}{\frac {\mathbf {a} _{2}}{a_{2}}}+x_{3}{\frac {\mathbf {a} _{3}}{a_{3}}},$

where $a_{i}\triangleq |\mathbf {a} _{i}|,$  meaning that $a_{i}$  is defined to be the magnitude of $\mathbf {a} _{i}$ , so ${\hat {\mathbf {a} _{i}}}={\frac {\mathbf {a} _{i}}{a_{i}}}$  is the unit vector directed along $\mathbf {a} _{i}$ .

Thus we can define a new function,

$g(x_{1},x_{2},x_{3})\triangleq f(\mathbf {r} )=f\left(x_{1}{\frac {\mathbf {a} _{1}}{a_{1}}}+x_{2}{\frac {\mathbf {a} _{2}}{a_{2}}}+x_{3}{\frac {\mathbf {a} _{3}}{a_{3}}}\right).$

This new function, $g(x_{1},x_{2},x_{3})$ , is now a function of three-variables, each of which has periodicity $a_{1}$ , $a_{2}$ , and $a_{3}$  respectively:

$g(x_{1},x_{2},x_{3})=g(x_{1}+a_{1},x_{2},x_{3})=g(x_{1},x_{2}+a_{2},x_{3})=g(x_{1},x_{2},x_{3}+a_{3}).$

This enables us to build up a set of Fourier coefficients, each being indexed by three independent integers $m_{1},m_{2},m_{3}$ . In what follows, we use function notation to denote these coefficients, where previously we used subscripts. If we write a series for $g$  on the interval $\left[0,a_{1}\right]$  for $x_{1}$ , we can define the following:

$h^{\mathrm {one} }(m_{1},x_{2},x_{3})\triangleq {\frac {1}{a_{1}}}\int _{0}^{a_{1}}g(x_{1},x_{2},x_{3})\cdot e^{-i2\pi {\frac {m_{1}}{a_{1}}}x_{1}}\,dx_{1}$

And then we can write:

$g(x_{1},x_{2},x_{3})=\sum _{m_{1}=-\infty }^{\infty }h^{\mathrm {one} }(m_{1},x_{2},x_{3})\cdot e^{i2\pi {\frac {m_{1}}{a_{1}}}x_{1}}$

Further defining:

{\begin{aligned}h^{\mathrm {two} }(m_{1},m_{2},x_{3})&\triangleq {\frac {1}{a_{2}}}\int _{0}^{a_{2}}h^{\mathrm {one} }(m_{1},x_{2},x_{3})\cdot e^{-i2\pi {\frac {m_{2}}{a_{2}}}x_{2}}\,dx_{2}\\[12pt]&={\frac {1}{a_{2}}}\int _{0}^{a_{2}}dx_{2}{\frac {1}{a_{1}}}\int _{0}^{a_{1}}dx_{1}g(x_{1},x_{2},x_{3})\cdot e^{-i2\pi \left({\frac {m_{1}}{a_{1}}}x_{1}+{\frac {m_{2}}{a_{2}}}x_{2}\right)}\end{aligned}}

We can write $g$  once again as:

$g(x_{1},x_{2},x_{3})=\sum _{m_{1}=-\infty }^{\infty }\sum _{m_{2}=-\infty }^{\infty }h^{\mathrm {two} }(m_{1},m_{2},x_{3})\cdot e^{i2\pi {\frac {m_{1}}{a_{1}}}x_{1}}\cdot e^{i2\pi {\frac {m_{2}}{a_{2}}}x_{2}}$

Finally applying the same for the third coordinate, we define:

{\begin{aligned}h^{\mathrm {three} }(m_{1},m_{2},m_{3})&\triangleq {\frac {1}{a_{3}}}\int _{0}^{a_{3}}h^{\mathrm {two} }(m_{1},m_{2},x_{3})\cdot e^{-i2\pi {\frac {m_{3}}{a_{3}}}x_{3}}\,dx_{3}\\[12pt]&={\frac {1}{a_{3}}}\int _{0}^{a_{3}}dx_{3}{\frac {1}{a_{2}}}\int _{0}^{a_{2}}dx_{2}{\frac {1}{a_{1}}}\int _{0}^{a_{1}}dx_{1}g(x_{1},x_{2},x_{3})\cdot e^{-i2\pi \left({\frac {m_{1}}{a_{1}}}x_{1}+{\frac {m_{2}}{a_{2}}}x_{2}+{\frac {m_{3}}{a_{3}}}x_{3}\right)}\end{aligned}}

We write $g$  as:

$g(x_{1},x_{2},x_{3})=\sum _{m_{1}=-\infty }^{\infty }\sum _{m_{2}=-\infty }^{\infty }\sum _{m_{3}=-\infty }^{\infty }h^{\mathrm {three} }(m_{1},m_{2},m_{3})\cdot e^{i2\pi {\frac {m_{1}}{a_{1}}}x_{1}}\cdot e^{i2\pi {\frac {m_{2}}{a_{2}}}x_{2}}\cdot e^{i2\pi {\frac {m_{3}}{a_{3}}}x_{3}}$

Re-arranging:

$g(x_{1},x_{2},x_{3})=\sum _{m_{1},m_{2},m_{3}\in \mathbb {Z} }h^{\mathrm {three} }(m_{1},m_{2},m_{3})\cdot e^{i2\pi \left({\frac {m_{1}}{a_{1}}}x_{1}+{\frac {m_{2}}{a_{2}}}x_{2}+{\frac {m_{3}}{a_{3}}}x_{3}\right)}.$

Now, every reciprocal lattice vector can be written (but does not mean that it is the only way of writing) as $\mathbf {G} =m_{1}\mathbf {g} _{1}+m_{2}\mathbf {g} _{2}+m_{3}\mathbf {g} _{3}$ , where $m_{i}$  are integers and $\mathbf {g} _{i}$  are reciprocal lattice vectors to satisfy $\mathbf {g_{i}} \cdot \mathbf {a_{j}} =2\pi \delta _{ij}$  ($\delta _{ij}=1$  for $i=j$ , and $\delta _{ij}=0$  for $i\neq j$ ). Then for any arbitrary reciprocal lattice vector $\mathbf {G}$  and arbitrary position vector $\mathbf {r}$  in the original Bravais lattice space, their scalar product is:

$\mathbf {G} \cdot \mathbf {r} =\left(m_{1}\mathbf {g} _{1}+m_{2}\mathbf {g} _{2}+m_{3}\mathbf {g} _{3}\right)\cdot \left(x_{1}{\frac {\mathbf {a} _{1}}{a_{1}}}+x_{2}{\frac {\mathbf {a} _{2}}{a_{2}}}+x_{3}{\frac {\mathbf {a} _{3}}{a_{3}}}\right)=2\pi \left(x_{1}{\frac {m_{1}}{a_{1}}}+x_{2}{\frac {m_{2}}{a_{2}}}+x_{3}{\frac {m_{3}}{a_{3}}}\right).$

So it is clear that in our expansion of $g(x_{1},x_{2},x_{3})=f(\mathbf {r} )$ , the sum is actually over reciprocal lattice vectors:

$f(\mathbf {r} )=\sum _{\mathbf {G} }h(\mathbf {G} )\cdot e^{i\mathbf {G} \cdot \mathbf {r} },$

where

$h(\mathbf {G} )={\frac {1}{a_{3}}}\int _{0}^{a_{3}}dx_{3}\,{\frac {1}{a_{2}}}\int _{0}^{a_{2}}dx_{2}\,{\frac {1}{a_{1}}}\int _{0}^{a_{1}}dx_{1}\,f\left(x_{1}{\frac {\mathbf {a} _{1}}{a_{1}}}+x_{2}{\frac {\mathbf {a} _{2}}{a_{2}}}+x_{3}{\frac {\mathbf {a} _{3}}{a_{3}}}\right)\cdot e^{-i\mathbf {G} \cdot \mathbf {r} }.$

Assuming

$\mathbf {r} =(x,y,z)=x_{1}{\frac {\mathbf {a} _{1}}{a_{1}}}+x_{2}{\frac {\mathbf {a} _{2}}{a_{2}}}+x_{3}{\frac {\mathbf {a} _{3}}{a_{3}}},$

we can solve this system of three linear equations for $x$ , $y$ , and $z$  in terms of $x_{1}$ , $x_{2}$  and $x_{3}$  in order to calculate the volume element in the original cartesian coordinate system. Once we have $x$ , $y$ , and $z$  in terms of $x_{1}$ , $x_{2}$  and $x_{3}$ , we can calculate the Jacobian determinant:
${\begin{vmatrix}{\dfrac {\partial x_{1}}{\partial x}}&{\dfrac {\partial x_{1}}{\partial y}}&{\dfrac {\partial x_{1}}{\partial z}}\\[12pt]{\dfrac {\partial x_{2}}{\partial x}}&{\dfrac {\partial x_{2}}{\partial y}}&{\dfrac {\partial x_{2}}{\partial z}}\\[12pt]{\dfrac {\partial x_{3}}{\partial x}}&{\dfrac {\partial x_{3}}{\partial y}}&{\dfrac {\partial x_{3}}{\partial z}}\end{vmatrix}}$

which after some calculation and applying some non-trivial cross-product identities can be shown to be equal to:
${\frac {a_{1}a_{2}a_{3}}{\mathbf {a} _{1}\cdot (\mathbf {a} _{2}\times \mathbf {a} _{3})}}$

(it may be advantageous for the sake of simplifying calculations, to work in such a Cartesian coordinate system, in which it just so happens that $\mathbf {a} _{1}$  is parallel to the x axis, $\mathbf {a} _{2}$  lies in the xy-plane, and $\mathbf {a} _{3}$  has components of all three axes). The denominator is exactly the volume of the primitive unit cell which is enclosed by the three primitive-vectors $\mathbf {a} _{1}$ , $\mathbf {a} _{2}$  and $\mathbf {a} _{3}$ . In particular, we now know that

$dx_{1}\,dx_{2}\,dx_{3}={\frac {a_{1}a_{2}a_{3}}{\mathbf {a} _{1}\cdot (\mathbf {a} _{2}\times \mathbf {a} _{3})}}\cdot dx\,dy\,dz.$

We can write now $h(\mathbf {G} )$  as an integral with the traditional coordinate system over the volume of the primitive cell, instead of with the $x_{1}$ , $x_{2}$  and $x_{3}$  variables:

$h(\mathbf {G} )={\frac {1}{\mathbf {a} _{1}\cdot (\mathbf {a} _{2}\times \mathbf {a} _{3})}}\int _{C}d\mathbf {r} f(\mathbf {r} )\cdot e^{-i\mathbf {G} \cdot \mathbf {r} }$

writing $d\mathbf {r}$  for the volume element $dx\,dy\,dz$ ; and where $C$  is the primitive unit cell, thus, $\mathbf {a} _{1}\cdot (\mathbf {a} _{2}\times \mathbf {a} _{3})$  is the volume of the primitive unit cell.

### Hilbert space interpretation

In the language of Hilbert spaces, the set of functions $\left\{e_{n}=e^{inx}:n\in \mathbb {Z} \right\}$  is an orthonormal basis for the space $L^{2}([-\pi ,\pi ])$  of square-integrable functions on $[-\pi ,\pi ]$ . This space is actually a Hilbert space with an inner product given for any two elements $f$  and $g$  by:

$\langle f,\,g\rangle \;\triangleq \;{\frac {1}{2\pi }}\int _{-\pi }^{\pi }f(x)g^{*}(x)\,dx,$  where $g^{*}(x)$  is the complex conjugate of $g(x).$

The basic Fourier series result for Hilbert spaces can be written as

$f=\sum _{n=-\infty }^{\infty }\langle f,e_{n}\rangle \,e_{n}.$

Sines and cosines form an orthonormal set, as illustrated above. The integral of sine, cosine and their product is zero (green and red areas are equal, and cancel out) when $m$ , $n$  or the functions are different, and π only if $m$  and $n$  are equal, and the function used is the same.

This corresponds exactly to the complex exponential formulation given above. The version with sines and cosines is also justified with the Hilbert space interpretation. Indeed, the sines and cosines form an orthogonal set:

$\int _{-\pi }^{\pi }\cos(mx)\,\cos(nx)\,dx={\frac {1}{2}}\int _{-\pi }^{\pi }\cos((n-m)x)+\cos((n+m)x)\,dx=\pi \delta _{mn},\quad m,n\geq 1,$

$\int _{-\pi }^{\pi }\sin(mx)\,\sin(nx)\,dx={\frac {1}{2}}\int _{-\pi }^{\pi }\cos((n-m)x)-\cos((n+m)x)\,dx=\pi \delta _{mn},\quad m,n\geq 1$

(where δmn is the Kronecker delta), and
$\int _{-\pi }^{\pi }\cos(mx)\,\sin(nx)\,dx={\frac {1}{2}}\int _{-\pi }^{\pi }\sin((n+m)x)+\sin((n-m)x)\,dx=0;$

furthermore, the sines and cosines are orthogonal to the constant function $1$ . An orthonormal basis for $L^{2}([-\pi ,\pi ])$  consisting of real functions is formed by the functions $1$  and ${\sqrt {2}}\cos(nx)$ , ${\sqrt {2}}\sin(nx)$  with n= 1,2,.... The density of their span is a consequence of the Stone–Weierstrass theorem, but follows also from the properties of classical kernels like the Fejér kernel.

## Fourier theorem proving convergence of Fourier series

These theorems, and informal variations of them that don't specify the convergence conditions, are sometimes referred to generically as Fourier's theorem or the Fourier theorem.

The earlier Eq.6

$s_{_{N}}(x)=\sum _{n=-N}^{N}S[n]\ e^{i{\tfrac {2\pi }{P}}nx},$

is a trigonometric polynomial of degree $N$  that can be generally expressed as:
$p_{_{N}}(x)=\sum _{n=-N}^{N}p[n]\ e^{i{\tfrac {2\pi }{P}}nx}.$

### Least squares property

Parseval's theorem implies that:

Theorem — The trigonometric polynomial $s_{_{N}}$  is the unique best trigonometric polynomial of degree $N$  approximating $s(x)$ , in the sense that, for any trigonometric polynomial $p_{_{N}}\neq s_{_{N}}$  of degree $N$ , we have:

$\|s_{_{N}}-s\|_{2}<\|p_{_{N}}-s\|_{2},$

where the Hilbert space norm is defined as:
$\|g\|_{2}={\sqrt {{1 \over P}\int _{P}|g(x)|^{2}\,dx}}.$

### Convergence theorems

Because of the least squares property, and because of the completeness of the Fourier basis, we obtain an elementary convergence result.

Theorem — If $s$  belongs to $L^{2}(P)$  (an interval of length $P$ ), then $s_{\infty }$  converges to $s$  in $L^{2}(P)$ , that is,  $\|s_{_{N}}-s\|_{2}$  converges to 0 as $N\to \infty$ .

We have already mentioned that if $s$  is continuously differentiable, then $(i\cdot n)S[n]$  is the $n^{\text{th}}$  Fourier coefficient of the derivative $s'$ . It follows, essentially from the Cauchy–Schwarz inequality, that $s_{\infty }$  is absolutely summable. The sum of this series is a continuous function, equal to $s$ , since the Fourier series converges in the mean to $s$ :

Theorem — If $s\in C^{1}(\mathbb {T} )$ , then $s_{\infty }$  converges to $s$  uniformly (and hence also pointwise.)

This result can be proven easily if $s$  is further assumed to be $C^{2}$ , since in that case $n^{2}S[n]$  tends to zero as $n\rightarrow \infty$ . More generally, the Fourier series is absolutely summable, thus converges uniformly to $s$ , provided that $s$  satisfies a Hölder condition of order $\alpha >1/2$ . In the absolutely summable case, the inequality:

$\sup _{x}|s(x)-s_{_{N}}(x)|\leq \sum _{|n|>N}|S[n]|$

proves uniform convergence.

Many other results concerning the convergence of Fourier series are known, ranging from the moderately simple result that the series converges at $x$  if $s$  is differentiable at $x$ , to Lennart Carleson's much more sophisticated result that the Fourier series of an $L^{2}$  function actually converges almost everywhere.

### Divergence

Since Fourier series have such good convergence properties, many are often surprised by some of the negative results. For example, the Fourier series of a continuous T-periodic function need not converge pointwise.[citation needed] The uniform boundedness principle yields a simple non-constructive proof of this fact.

In 1922, Andrey Kolmogorov published an article titled Une série de Fourier-Lebesgue divergente presque partout in which he gave an example of a Lebesgue-integrable function whose Fourier series diverges almost everywhere. He later constructed an example of an integrable function whose Fourier series diverges everywhere (Katznelson 1976).