In mathematics (in particular, functional analysis), convolution is a mathematical operation on two functions (f and g) that produces a third function (fg) that expresses how the shape of one is modified by the other. The term convolution refers to both the result function and to the process of computing it. It is defined as the integral of the product of the two functions after one is reversed and shifted. The integral is evaluated for all values of shift, producing the convolution function.
Some features of convolution are similar to cross-correlation: for real-valued functions, of a continuous or discrete variable, it differs from cross-correlation (f\star g) only in that either f(x) or g(x) is reflected about the y-axis; thus it is a cross-correlation of g(-x) and f(x), or f(−x) and g(x). For complex-valued functions, the cross-correlation operator is the adjoint of the convolution operator.
Convolution has applications that include probability, statistics, acoustics, spectroscopy, signal processing and image processing, geophysics, engineering, physics, computer vision and differential equations.
The convolution can be defined for functions on Euclidean space and other groups. For example, periodic functions, such as the discrete-time Fourier transform, can be defined on a circle and convolved by periodic convolution. A discrete convolution can be defined for functions on the set of integers.
Generalizations of convolution have applications in the field of numerical analysis and numerical linear algebra, and in the design and implementation of finite impulse response filters in signal processing.
Computing the inverse of the convolution operation is known as deconvolution.