Skip to content
Oakfield Operator Calculus Function Reference Site

Gaussian Function

For σ>0\sigma>0 and μR\mu\in\mathbb{R}, a (unit-peak) Gaussian function is defined by

gσ,μ(x)=e(xμ)2/(2σ2)g_{\sigma,\mu}(x) = e^{-(x-\mu)^2/(2\sigma^2)}

where σ>0\sigma > 0 controls the width and μR\mu \in \mathbb{R} is the center. The special case μ=0\mu=0 and σ=1/2\sigma=1/\sqrt{2} gives g(x)=ex2g(x)=e^{-x^2}.


The Gaussian function is defined for all xRx \in \mathbb{R}. It is real-valued, strictly positive, and belongs to Lp(R)L^p(\mathbb{R}) for all 1p1 \le p \le \infty.


The Gaussian function is infinitely differentiable and rapidly decaying:

limxxngσ,μ(x)=0\lim_{|x|\to\infty} x^n g_{\sigma,\mu}(x) = 0

for all integers n0n \ge 0. It is a canonical example of a Schwartz function.


The Gaussian admits a closed-form integral:

ex2dx=π,gσ,μ(x)dx=2πσ\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi}, \qquad \int_{-\infty}^{\infty} g_{\sigma,\mu}(x)\,dx = \sqrt{2\pi}\,\sigma

Normalized Gaussians define probability density functions.


Up to scaling, the Gaussian is invariant under the Fourier transform:

F(ex2)(ξ)=πeξ2/4\mathcal{F}(e^{-x^2})(\xi) = \sqrt{\pi}\,e^{-\xi^2/4}

This property is unique among smooth, rapidly decaying functions.


The Gaussian satisfies a first-order linear ODE:

ddxgσ,μ(x)=xμσ2gσ,μ(x)\frac{d}{dx} g_{\sigma,\mu}(x) = -\frac{x-\mu}{\sigma^2}\,g_{\sigma,\mu}(x)

Higher derivatives yield Hermite polynomials multiplied by the Gaussian.


The convolution of two Gaussians is again Gaussian:

ex2/(2σ12)ex2/(2σ22)ex2/(2(σ12+σ22))e^{-x^2/(2\sigma_1^2)} * e^{-x^2/(2\sigma_2^2)} \propto e^{-x^2/(2(\sigma_1^2+\sigma_2^2))}

This closure property underlies diffusion processes.


The normalized Gaussian

12πex2/2\frac{1}{\sqrt{2\pi}}\,e^{-x^2/2}

defines the standard normal distribution in probability theory.


As a function of space, the fundamental solution of the heat equation at fixed time is Gaussian.


The Gaussian function is closely related to:

  • Gaussian convolution kernels,
  • the heat kernel,
  • Hermite functions,
  • Gabor functions.

It plays a central role in harmonic analysis and PDE theory.


Oakfield uses Gaussian envelopes mostly for stimuli and for simple smoothing kernels:

  • Stimulus envelopes: stimulus_gaussian writes a (possibly moving) Gaussian envelope into a field, and stimulus_gaussian_travel uses a Gaussian envelope inside the sinusoidal stimulus family.
  • Gabor packets: stimulus_gabor evaluates a Gaussian envelope and modulates it by a sinusoidal carrier.
  • Filtering: the sieve operator constructs a normalized discrete Gaussian kernel for low/high-pass convolution.

Carl Friedrich Gauss introduced the Gaussian function in the context of error theory and least-squares estimation.

The Gaussian emerged as a unique function invariant under Fourier transform and central to probability theory.

Gaussian functions are ubiquitous across analysis, statistics, physics, and numerical computation.


  • C. F. Gauss, Theoria combinationis observationum erroribus minimis obnoxiae
  • Abramowitz & Stegun, Handbook of Mathematical Functions
  • NIST Digital Library of Mathematical Functions (DLMF), §7.2