In mathematics and in particular, functional analysis, the convolution (German: Faltung) is a mathematical operator which takes two functions and and produces a third function that in a sense represents the amount of overlap between and a reversed and translated version of . A convolution is a kind of very general moving average, as one can see by taking one of the functions to be an indicator function of an interval.
The convolution of and is written . It is defined as the integral of the product of the two functions after one is reversed and shifted.
If and are two independent random variables with probability densities and , respectively, then the probability density of the sum is given by the convolution .
For discrete functions, one can use a discrete version of the convolution. It is then given by
Generalizing the above cases, the convolution can be defined for any two squareintegrable functions defined on a locally compact topological group. A different generalization is the convolution of distributions.
The various convolution operators all satisfy the following properties:
Commutativity:

 Note: This property would be lost were one function not reversed as described above.
 Note: This property would be lost were one function not reversed as described above.
Derivation rule:
Convolutions on Groups
If G is a suitable group endowed with a measure m (for instance, a locally compact Hausdorff topological group with the Haar measure) and if f and g are real or complex valued mintegrable functions of G, then we can define their convolution by