Visual comparison of convolution,cross-correlation, andautocorrelation. For the operations involving function, and assuming the height of is 1.0, the value of the result at 5 different points is indicated by the shaded area below each point. The symmetry of is the reason and are identical in this example.
Inmathematics (in particular,functional analysis),convolution is amathematical operation on twofunctions and that produces a third function, as theintegral of the product of the two functions after one is reflected about the y-axis and shifted. The termconvolution refers to both the resulting function and to the process of computing it. The integral is evaluated for all values of shift, producing the convolution function. The choice of which function is reflected and shifted before the integral does not change the integral result (seecommutativity). Graphically, it expresses how the 'shape' of one function is modified by the other.
Some features of convolution are similar tocross-correlation: for real-valued functions, of a continuous or discrete variable, convolution differs from cross-correlation only in that either or is reflected about the y-axis in convolution; thus it is a cross-correlation of and, or and.[A] For complex-valued functions, the cross-correlation operator is theadjoint of the convolution operator.
The convolution of and is written, denoting the operator with the symbol.[B] It is defined as the integral of the product of the two functions after one is reflected about the y-axis and shifted. As such, it is a particular kind ofintegral transform:
While the symbol is used above, it need not represent the time domain. At each, the convolution formula can be described as the area under the function weighted by the function shifted by the amount. As changes, the weighting function emphasizes different parts of the input function; If is a positive value, then is equal to that slides or is shifted along the-axis toward the right (toward) by the amount of, while if is a negative value, then is equal to that slides or is shifted toward the left (toward) by the amount of.
For functions,supported on only (i.e., zero for negative arguments), the integration limits can be truncated, resulting in:
For the multi-dimensional formulation of convolution, seedomain of definition (below).
respectively, the convolution operation can be defined as theinverse Laplace transform of the product of and.[4][5] More precisely,
Let, then
Note that is the bilateral Laplace transform of. A similar derivation can be done using theunilateral Laplace transform (one-sided Laplace transform).
The convolution operation also describes the output (in terms of the input) of an important class of operations known aslinear time-invariant (LTI). SeeLTI system theory for a derivation of convolution as the result of LTI constraints. In terms of theFourier transforms of the input and output of an LTI operation, no new frequency components are created. The existing ones are only modified (amplitude and/or phase). In other words, the output transform is the pointwise product of the input transform with a third transform (known as atransfer function). SeeConvolution theorem for a derivation of that property of convolution. Conversely, convolution can be derived as the inverse Fourier transform of the pointwise product of two Fourier transforms.
Add an offset of the independent variable,, which allows to slide along the-axis. Ift is a positive value, then is equal to that slides or is shifted along the-axis toward the right (toward) by the amount of. If is a negative value, then is equal to that slides or is shifted toward the left (toward) by the amount of.
Start at and slide it all the way to. Wherever the two functions intersect, find the integral of their product. In other words, at time, compute the area under the function weighted by the weighting function
The resultingwaveform (not shown here) is the convolution of functions and.
If is aunit impulse, the result of this process is simply. Formally:
In this example, the red-colored "pulse", is aneven function so convolution is equivalent to correlation. A snapshot of this "movie" shows functions and (in blue) for some value of parameter which is arbitrarily defined as the distance along the axis from the point to the center of the red pulse. The amount of yellow is the area of the product computed by the convolution/correlation integral. The movie is created by continuously changing and recomputing the integral. The result (shown in black) is a function of but is plotted on the same axis as for convenience and comparison.
In this depiction, could represent the response of aresistor-capacitor circuit to a narrow pulse that occurs at In other words, if the result of convolution is just But when is the wider pulse (in red), the response is a "smeared" version of It begins at because we defined as the distance from the axis to thecenter of the wide pulse (instead of the leading edge).
One of the earliest uses of the convolution integral appeared inD'Alembert's derivation ofTaylor's theorem inRecherches sur différents points importants du système du monde, published in 1754.[6]
Also, an expression of the type:
is used bySylvestre François Lacroix on page 505 of his book entitledTreatise on differences and series, which is the last of 3 volumes of the encyclopedic series:Traité du calcul différentiel et du calcul intégral, Chez Courcier, Paris, 1797–1800.[7] Soon thereafter, convolution operations appear in the works ofPierre Simon Laplace,Jean-Baptiste Joseph Fourier,Siméon Denis Poisson, and others. The term itself did not come into wide use until the 1950s or 1960s. Prior to that it was sometimes known asFaltung (which meansfolding inGerman),composition product,superposition integral, andCarson's integral.[8] Yet it appears as early as 1903, though the definition is rather unfamiliar in older uses.[9][10]
The operation:
is a particular case of composition products considered by the Italian mathematicianVito Volterra in 1913.[11]
The convolution of two finite sequences is defined by extending the sequences to finitely supported functions on the set of integers. When the sequences are the coefficients of twopolynomials, then the coefficients of theordinary product of the two polynomials are the convolution of the original two sequences. This is known as theCauchy product of the coefficients of the sequences.
Thus, wheng is non-zero over a finite interval [-M,+M] (representing, for instance, afinite impulse response), a finite summation may be used:[13]
In many situations, discrete convolutions can be converted to circular convolutions so that fast transforms with a convolution property can be used to implement the computation. For example, convolution of digit sequences is the kernel operation inmultiplication of multi-digit numbers, which can therefore be efficiently implemented with transform techniques (Knuth 1997, §4.3.3.C;von zur Gathen & Gerhard 2003, §8.2).
Eq.1 requiresN arithmetic operations per output value andN2 operations forN outputs. That can be significantly reduced with any of several fast algorithms.Digital signal processing and other applications typically use fast convolution algorithms to reduce the cost of the convolution to O(N logN) complexity.
The most common fast convolution algorithms usefast Fourier transform (FFT) algorithms via thecircular convolution theorem. Specifically, thecircular convolution of two finite-length sequences is found by taking an FFT of each sequence, multiplying pointwise, and then performing an inverse FFT. Convolutions of the type defined above are then efficiently implemented using that technique in conjunction with zero-extension and/or discarding portions of the output. Other fast convolution algorithms, such as theSchönhage–Strassen algorithm or the Mersenne transform,[14] use fast Fourier transforms in otherrings. The Winograd method is used as an alternative to the FFT.[15] It significantly speeds up 1D,[16] 2D,[17] and 3D[18] convolution.
If one sequence is much longer than the other, zero-extension of the shorter sequence and fast circular convolution is not the most computationally efficient method available.[19] Instead, decomposing the longer sequence into blocks and convolving each block allows for faster algorithms such as theoverlap–save method andoverlap–add method.[20] A hybrid convolution method that combines block andFIR algorithms allows for a zero input-output latency that is useful for real-time convolution computations.[21]
The convolution of two complex-valued functions onRd is itself a complex-valued function onRd, defined by:
and is well-defined only iff andg decay sufficiently rapidly at infinity in order for the integral to exist. Conditions for the existence of the convolution may be tricky, since a blow-up ing at infinity can be easily offset by sufficiently rapid decay inf. The question of existence thus may involve different conditions onf andg:
Iff andg arecompactly supportedcontinuous functions, then their convolution exists, and is also compactly supported and continuous (Hörmander 1983, Chapter 1). More generally, if either function (sayf) is compactly supported and the other islocally integrable, then the convolutionf∗g is well-defined and continuous.
Convolution off andg is also well defined when both functions are locally square integrable onR and supported on an interval of the form[a, +∞) (or both supported on[−∞,a]).
Likewise, iff ∈L1(Rd) and g ∈Lp(Rd) where1 ≤p ≤ ∞, then f*g ∈Lp(Rd), and
In the particular casep = 1, this shows thatL1 is aBanach algebra under the convolution (and equality of the two sides holds iff andg are non-negative almost everywhere).
More generally,Young's inequality implies that the convolution is a continuous bilinear map between suitableLp spaces. Specifically, if 1 ≤p,q,r ≤ ∞ satisfy:
then
so that the convolution is a continuous bilinear mapping fromLp×Lq toLr.The Young inequality for convolution is also true in other contexts (circle group, convolution onZ). The preceding inequality is not sharp on the real line: when 1 <p,q,r < ∞, there exists a constantBp,q < 1 such that:
In addition to compactly supported functions and integrable functions, functions that have sufficiently rapid decay at infinity can also be convolved. An important feature of the convolution is that iff andg both decay rapidly, thenf∗g also decays rapidly. In particular, iff andg arerapidly decreasing functions, then so is the convolutionf∗g. Combined with the fact that convolution commutes with differentiation (see#Properties), it follows that the class ofSchwartz functions is closed under convolution (Stein & Weiss 1971, Theorem 3.3).
This agrees with the convolution defined above when μ and ν are regarded as distributions, as well as the convolution of L1 functions when μ and ν are absolutely continuous with respect to the Lebesgue measure.
The convolution of measures also satisfies the following version of Young's inequality
where the norm is thetotal variation of a measure. Because the space of measures of bounded variation is aBanach space, convolution of measures can be treated with standard methods offunctional analysis that may not apply for the convolution of distributions.
The convolution defines a product on thelinear space of integrable functions. This product satisfies the following algebraic properties, which formally mean that the space of integrable functions with the product given by convolution is a commutativeassociative algebra withoutidentity (Strichartz 1994, §3.3). Other linear spaces of functions, such as the space of continuous functions of compact support, areclosed under the convolution, and so also form commutative associative algebras.
No algebra of functions possesses an identity for the convolution. The lack of identity is typically not a major inconvenience, since most collections of functions on which the convolution is performed can be convolved with adelta distribution (a unitary impulse, centered at zero) or, at the very least (as is the case ofL1) admitapproximations to the identity. The linear space of compactly supported distributions does, however, admit an identity under the convolution. Specifically, whereδ is the delta distribution.
Inverse element
Some distributionsS have aninverse elementS−1 for the convolution which then must satisfy from which an explicit formula forS−1 may be obtained.The set of invertible distributions forms anabelian group under the convolution.
where is thederivative. More generally, in the case of functions of several variables, an analogous formula holds with thepartial derivative:
A particular consequence of this is that the convolution can be viewed as a "smoothing" operation: the convolution off andg is differentiable as many times asf andg are in total.
These identities hold for example under the condition thatf andg are absolutely integrable and at least one of them has an absolutely integrable (L1) weak derivative, as a consequence ofYoung's convolution inequality. For instance, whenf is continuously differentiable with compact support, andg is an arbitrary locally integrable function,
These identities also hold much more broadly in the sense of tempered distributions if one off org is arapidly decreasing tempered distribution, a compactly supported tempered distribution or a Schwartz function and the other is a tempered distribution. On the other hand, two positive integrable and infinitely differentiable functions may have a nowhere continuous convolution.
In the discrete case, thedifference operatorDf(n) =f(n + 1) −f(n) satisfies an analogous relationship:
The convolution commutes with translations, meaning that
where τxf is the translation of the functionf byx defined by
Iff is aSchwartz function, thenτxf is the convolution with a translated Dirac delta functionτxf =f ∗τxδ. So translation invariance of the convolution of Schwartz functions is a consequence of the associativity of convolution.
Furthermore, under certain conditions, convolution is the most general translation invariant operation. Informally speaking, the following holds
Suppose thatS is a boundedlinear operator acting on functions which commutes with translations:S(τxf) =τx(Sf) for allx. ThenS is given as convolution with a function (or distribution)gS; that isSf =gS ∗f.
Thus some translation invariant operations can be represented as convolution. Convolutions play an important role in the study oftime-invariant systems, and especiallyLTI system theory. The representing functiongS is theimpulse response of the transformationS.
A more precise version of the theorem quoted above requires specifying the class of functions on which the convolution is defined, and also requires assuming in addition thatS must be acontinuous linear operator with respect to the appropriatetopology. It is known, for instance, that every continuous translation invariant continuous linear operator onL1 is the convolution with a finiteBorel measure. More generally, every continuous translation invariant continuous linear operator onLp for 1 ≤p < ∞ is the convolution with atempered distribution whoseFourier transform is bounded. To wit, they are all given by boundedFourier multipliers.
IfG is a suitablegroup endowed with ameasure λ, and iff andg are real or complex valuedintegrable functions onG, then we can define their convolution by
It is not commutative in general. In typical cases of interestG is alocally compactHausdorfftopological group and λ is a (left-)Haar measure. In that case, unlessG isunimodular, the convolution defined in this way is not the same as. The preference of one over the other is made so that convolution with a fixed functiong commutes with left translation in the group:
Furthermore, the convention is also required for consistency with the definition of the convolution of measures given below. However, with a right instead of a left Haar measure, the latter integral is preferred over the former.
Onlocally compact abelian groups, a version of theconvolution theorem holds: the Fourier transform of a convolution is the pointwise product of the Fourier transforms. Thecircle groupT with the Lebesgue measure is an immediate example. For a fixedg inL1(T), we have the following familiar operator acting on theHilbert spaceL2(T):
The operatorT iscompact. A direct calculation shows that its adjointT* is convolution with
By the commutativity property cited above,T isnormal:T*T =TT* . Also,T commutes with the translation operators. Consider the familyS of operators consisting of all such convolutions and the translation operators. ThenS is a commuting family of normal operators. According tospectral theory, there exists an orthonormal basis {hk} that simultaneously diagonalizesS. This characterizes convolutions on the circle. Specifically, we have
which are precisely thecharacters ofT. Each convolution is a compactmultiplication operator in this basis. This can be viewed as a version of the convolution theorem discussed above.
A similar result holds for compact groups (not necessarily abelian): the matrix coefficients of finite-dimensionalunitary representations form an orthonormal basis inL2 by thePeter–Weyl theorem, and an analog of the convolution theorem continues to hold, along with many other aspects ofharmonic analysis that depend on the Fourier transform.
LetG be a (multiplicatively written) topological group.If μ and ν areRadon measures onG, then their convolutionμ∗ν is defined as thepushforward measure of thegroup action and can be written as[33]
for each measurable subsetE ofG. The convolution is also a Radon measure, whosetotal variation satisfies
In the case whenG islocally compact with (left-)Haar measure λ, and μ and ν areabsolutely continuous with respect to a λ,so that each has a density function, then the convolution μ∗ν is also absolutely continuous, and its density function is just the convolution of the two separate density functions. In fact, ifeither measure is absolutely continuous with respect to the Haar measure, then so is their convolution.[34]
Inconvex analysis, theinfimal convolution of proper (not identically)convex functions on is defined by:[35]It can be shown that the infimal convolution of convex functions is convex. Furthermore, it satisfies an identity analogous to that of the Fourier transform of a traditional convolution, with the role of the Fourier transform is played instead by theLegendre transform:We have:
Let (X, Δ, ∇,ε,η) be abialgebra with comultiplication Δ, multiplication ∇, unit η, and counitε. The convolution is a product defined on theendomorphism algebra End(X) as follows. Letφ,ψ ∈ End(X), that is,φ,ψ:X →X are functions that respect all algebraic structure ofX, then the convolutionφ∗ψ is defined as the composition
The convolution appears notably in the definition ofHopf algebras (Kassel 1995, §III.3). A bialgebra is a Hopf algebra if and only if it has an antipode: an endomorphismS such that
Inacoustics,reverberation is the convolution of the original sound withechoes from objects surrounding the sound source.
In digital signal processing, convolution is used to map theimpulse response of a real room on a digital audio signal.
Inelectronic music convolution is the imposition of aspectral or rhythmic structure on a sound. Often this envelope or structure is taken from another sound. The convolution of two signals is the filtering of one through the other.[39]
Inelectrical engineering, the convolution of one function (theinput signal) with a second function (the impulse response) gives the output of alinear time-invariant system (LTI). At any given moment, the output is an accumulated effect of all the prior values of the input function, with the most recent values typically having the most influence (expressed as a multiplicative factor). The impulse response function provides that factor as a function of the elapsed time since each input value occurred.
Intime-resolved fluorescence spectroscopy, the excitation signal can be treated as a chain of delta pulses, and the measured fluorescence is a sum of exponential decays from each delta pulse.
In structural reliability, the reliability index can be defined based on the convolution theorem.
The definition of reliability index for limit state functions with nonnormal distributions can be established corresponding to thejoint distribution function. In fact, the joint distribution function can be obtained using the convolution theory.[41]
InSmoothed-particle hydrodynamics, simulations of fluid dynamics are calculated using particles, each with surrounding kernels. For any given particle, some physical quantity is calculated as a convolution of with a weighting function, where denotes the neighbors of particle: those that are located within its kernel. The convolution is approximated as a summation over each neighbor.[42]
InFractional calculus convolution is instrumental in various definitions of fractional integral and fractional derivative.
^The symbolU+2217∗ASTERISK OPERATOR is different thanU+002A*ASTERISK, which is often used to denote complex conjugation. SeeAsterisk § Mathematical typography.
^Smith, Stephen W (1997)."13.Convolution".The Scientist and Engineer's Guide to Digital Signal Processing (1 ed.). California Technical Publishing.ISBN0-9660176-3-3. Retrieved22 April 2016.
^According to[Lothar von Wolfersdorf (2000), "Einige Klassen quadratischer Integralgleichungen",Sitzungsberichte der Sächsischen Akademie der Wissenschaften zu Leipzig,Mathematisch-naturwissenschaftliche Klasse, volume128, number 2, 6–7], the source is Volterra, Vito (1913),"Leçons sur les fonctions de linges". Gauthier-Villars, Paris 1913.
^Selesnick, Ivan W.; Burrus, C. Sidney (1999). "Fast Convolution and Filtering". In Madisetti, Vijay K. (ed.).Digital Signal Processing Handbook. CRC Press. p. Section 8.ISBN978-1-4200-4563-5.
^Juang, B.H."Lecture 21: Block Convolution"(PDF). EECS at the Georgia Institute of Technology.Archived(PDF) from the original on 2004-07-29. Retrieved17 May 2013.
^Ninh, Pham;Pagh, Rasmus (2013).Fast and scalable polynomial kernels via explicit feature maps. SIGKDD international conference on Knowledge discovery and data mining. Association for Computing Machinery.doi:10.1145/2487575.2487591.
^Hewitt and Ross (1979)Abstract harmonic analysis, volume 1, second edition, Springer-Verlag, p 266.
^Zhang, Yingjie; Soon, Hong Geok; Ye, Dongsen; Fuh, Jerry Ying Hsi; Zhu, Kunpeng (September 2020). "Powder-Bed Fusion Process Monitoring by Machine Vision With Hybrid Convolutional Neural Networks".IEEE Transactions on Industrial Informatics.16 (9):5769–5779.Bibcode:2020ITII...16.5769Z.doi:10.1109/TII.2019.2956078.ISSN1941-0050.S2CID213010088.
Damelin, S.; Miller, W. (2011),The Mathematics of Signal Processing, Cambridge University Press,ISBN978-1107601048
Diggle, P. J. (1985), "A kernel method for smoothing point process data",Journal of the Royal Statistical Society, Series C,34 (2):138–147,doi:10.2307/2347366,JSTOR2347366,S2CID116746157
Ghasemi, S. Hooman; Nowak, Andrzej S. (2017), "Reliability Index for Non-normal Distributions of Limit State Functions",Structural Engineering and Mechanics,62 (3):365–372,doi:10.12989/sem.2017.62.3.365
Grinshpan, A. Z. (2017), "An inequality for multiple convolutions with respect to Dirichlet probability measure",Advances in Applied Mathematics,82 (1):102–119,doi:10.1016/j.aam.2016.08.001
Hewitt, Edwin; Ross, Kenneth A. (1979),Abstract harmonic analysis. Vol. I, Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences], vol. 115 (2nd ed.), Berlin, New York:Springer-Verlag,ISBN978-3-540-09434-0,MR0551496.
Hewitt, Edwin; Ross, Kenneth A. (1970),Abstract harmonic analysis. Vol. II: Structure and analysis for compact groups. Analysis on locally compact Abelian groups, Die Grundlehren der mathematischen Wissenschaften, Band 152, Berlin, New York:Springer-Verlag,MR0262773.
Narici, Lawrence; Beckenstein, Edward (2011).Topological Vector Spaces. Pure and applied mathematics (Second ed.). Boca Raton, FL: CRC Press.ISBN978-1584888666.OCLC144216834.
Reed, Michael;Simon, Barry (1975),Methods of modern mathematical physics. II. Fourier analysis, self-adjointness, New York-London: Academic Press Harcourt Brace Jovanovich, Publishers, pp. xv+361,ISBN0-12-585002-6,MR0493420
Rudin, Walter (1962),Fourier analysis on groups, Interscience Tracts in Pure and Applied Mathematics, vol. 12, New York–London: Interscience Publishers,ISBN0-471-52364-X,MR0152834{{citation}}:ISBN / Date incompatibility (help).
Strichartz, R. (1994),A Guide to Distribution Theory and Fourier Transforms, CRC Press,ISBN0-8493-8273-4.
Titchmarsh, E (1948),Introduction to the theory of Fourier integrals (2nd ed.), New York, N.Y.: Chelsea Pub. Co. (published 1986),ISBN978-0-8284-0324-5{{citation}}:ISBN / Date incompatibility (help).