In mathematics, a Gaussian function, often simply referred to as a Gaussian, is a function of the base form f(x)=exp(−x2) and with parametric extension f(x)=aexp(−(x−b)22c2) for arbitrary real constants a, b and non-zero c. It is named after the mathematician Carl Friedrich Gauss. The graph of a Gaussian is a characteristic symmetric "bell curve" shape. The parameter a is the height of the curve's peak, b is the horizontal position of the center of the peak, and c (the standard deviation, sometimes called the Gaussian RMS width) controls the width of the "bell". Gaussian functions are often used to represent the probability density function of a normally distributed random variable with expected value μ = b and variance σ2 = c2. In this case, the Gaussian is of the form g(x)=1σ2πexp(−12(x−μ)2σ2). Gaussian functions are widely used in statistics to describe the normal distributions, in signal processing to define Gaussian filters, in image processing where two-dimensional Gaussians are used for Gaussian blurs, and in mathematics to solve heat equations and diffusion equations and to define the Weierstrass transform. They are also abundantly used in quantum chemistry to form basis sets.
Properties Gaussian functions arise by composing the exponential function with a concave quadratic function: f(x)=exp(αx2+βx+γ), where α=−12c2,β=bc2,γ=lna−b22c2. (Note: a=1σ2π in lna, not to be confused with α=−12c2) The Gaussian functions are thus those functions whose logarithm is a concave quadratic function. The parameter c is related to the full width at half maximum (FWHM) of the peak according to FWHM=22ln2c≈2.35482c. The function may then be expressed in terms of the FWHM, represented by w: f(x)=aexp(−4(ln2)(x−b)2w2). Alternatively, the parameter c can be interpreted by saying that the two inflection points of the function occur at x = b ± c. The full width at tenth of maximum (FWTM) for a Gaussian could be of interest and is FWTM=22ln10c≈4.29193c. Gaussian functions are analytic, and their limit as x → ±∞ is 0. Gaussian functions are among those functions that are elementary but lack elementary antiderivatives; the integral of the Gaussian function is the error function: ∫exp(−x2)dx=π2erfx+C. Nonetheless, their improper integrals over the whole real line can be evaluated exactly, using the Gaussian integral ∫−∞∞exp(−x2)dx=π, and one obtains ∫−∞∞aexp(−(x−b)22c2)dx=a|c|2π.
This integral is 1 if and only if a=1c2π (the normalizing constant), and in this case the Gaussian is the probability density function of a normally distributed random variable with expected value μ = b and variance σ2 = c2: g(x)=1σ2πexp(−(x−μ)22σ2). These Gaussians are plotted in the accompanying figure. The product of two Gaussian functions is a Gaussian, and the convolution of two Gaussian functions is also a Gaussian, with variance being the sum of the original variances: c2=c12+c22. The product of two Gaussian probability density functions (PDFs), though, is not in general a Gaussian PDF. The Fourier uncertainty principle becomes an equality if and only if (modulated) Gaussian functions are considered. Taking the Fourier transform (unitary, angular-frequency convention) of a Gaussian function with parameters a = 1, b = 0 and c yields another Gaussian function, with parameters c, b = 0 and 1/c. So in particular the Gaussian functions with b = 0 and c = a are kept fixed by the Fourier transform (they are eigenfunctions of the Fourier transform with eigenvalue 1). A physical realization is that of the diffraction pattern: for example, a photographic slide whose transmittance has a Gaussian variation is also a Gaussian function. The fact that the Gaussian function is an eigenfunction of the continuous Fourier transform allows us to derive the following interesting identity from the Poisson summation formula: ∑k∈ℤexp(−π⋅(kc)2)=c⋅∑k∈ℤexp(−π⋅(kc)2).
Integral of a Gaussian function The integral of an arbitrary Gaussian function is ∫−∞∞aexp(−(x−b)22c2)dx= a|c|2π. An alternative form is ∫−∞∞kexp(−fx2+gx+h)dx=∫−∞∞kexp(−f(x−g2f)2+g24f+h)dx=kπfexp(g24f+h), where f must be strictly positive for the integral to converge.
Relation to standard Gaussian integral The integral ∫−∞∞aexp(−(x−b)22c2)dx for some real constants a, b, c > 0 can be calculated by putting it into the form of a Gaussian integral. First, the constant a can simply be factored out of the integral. Next, the variable of integration is changed from x to y = x − b: a∫−∞∞exp(−y22c2)dy, and then to z=y2c2: a2c2∫−∞∞exp(−z2)dz. Then, using the Gaussian integral identity ∫−∞∞exp(−z2)dz=π, we have ∫−∞∞aexp(−(x−b)22c2)dx=a2πc2.
Two-dimensional Gaussian function
Base form: f(x,y)=exp(−x2−y2) In two dimensions, the argument of the exponential function in the Gaussian function is any negative-definite quadratic form. Consequently, the level sets of the Gaussian will always be ellipses. A particular example of a two-dimensional Gaussian function is f(x,y)=Aexp(−((x−x0)22σX2+(y−y0)22σY2)). Here the coefficient A is the amplitude, x0, y0 is the center, and σx, σy are the x and y spreads of the blob. The figure on the right was created using A = 1, x0 = 0, y0 = 0, σx = σy = 1. The volume under the Gaussian function is given by V=∫−∞∞∫−∞∞f(x,y)dxdy=2πAσXσY. In general, a two-dimensional elliptical Gaussian function is expressed as f(x,y)=Aexp(−(a(x−x0)2+2b(x−x0)(y−y0)+c(y−y0)2)), where the matrix [abbc] is positive-definite. Using this formulation, the figure on the right can be created using A = 1, (x0, y0) = (0, 0), a = c = 1/2, b = 0.
Meaning of parameters for the general equation For the general form of the equation the coefficient A is the height of the peak and (x0, y0) is the center of the blob. If we set a=cos2θ2σX2+sin2θ2σY2,b=−sinθcosθ2σX2+sinθcosθ2σY2,c=sin2θ2σX2+cos2θ2σY2,then we rotate the blob by a positive, counter-clockwise angle θ (for negative, clockwise rotation, invert the signs in the b coefficient). To get back the coefficients θ, σX and σY from a, b and c use θ=12arctan(2ba−c),θ∈[−π4,π4],σX2=12(a⋅cos2θ+2b⋅cosθsinθ+c⋅sin2θ),σY2=12(a⋅sin2θ−2b⋅cosθsinθ+c⋅cos2θ). Example rotations of Gaussian blobs can be seen in the following examples:
Using the following Octave code, one can easily see the effect of changing the parameters:
… excerpt ends here. Continue reading the full article.





