structural:reformatting, quality:corruption
Two-dimensional Gaussian function

Base form: f (x, y) = exp (− x 2 − y 2) {\displaystyle f(x,y)=\exp(-x^{2}-y^{2})}

In two dimensions, the power to which e is raised 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) = A exp (− ((x − x 0) 2 2 σ X 2 + (y − y 0) 2 2 σ Y 2)). {\displaystyle f(x,y)=A\exp \left(-\left({\frac {(x-x_{0})^{2}}{2\sigma _{X}^{2}}}+{\frac {(y-y_{0})^{2}}{2\sigma _{Y}^{2}}}\right)\right).}

Here the coefficient A is the amplitude, x, y is the center, and σ, σ are the x and y spreads of the blob. The figure on the right was created using A = 1, x = 0, y = 0, σ = σ = 1.

The volume under the Gaussian function is given by V = ∫ − ∞ ∞ ∫ − ∞ ∞ f (x, y) d x d y = 2 π A σ X σ Y. {\displaystyle V=\int _{-\infty }^{\infty }\int _{-\infty }^{\infty }f(x,y)\,dx\,dy=2\pi A\sigma _{X}\sigma _{Y}.}

In general, a two-dimensional elliptical Gaussian function is expressed as f (x, y) = A exp (− (a (x − x 0) 2 + 2 b (x − x 0) (y − y 0) + c (y − y 0) 2)), {\displaystyle f(x,y)=A\exp {\Big (}-{\big (}a(x-x_{0})^{2}+2b(x-x_{0})(y-y_{0})+c(y-y_{0})^{2}{\big)}{\Big)},} where the matrix {\displaystyle {\begin{bmatrix}a&b\\b&c\end{bmatrix}}} is positive-definite.

Using this formulation, the figure on the right can be created using A = 1, (x, y) = (0, 0), a = c = 1/2, b = 0.