Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Convolution
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Integral expressing the amount of overlap of one function as it is shifted over another}} {{About}} [[File:comparison convolution correlation.svg|thumb|400px|class=skin-invert-image|Visual comparison of convolution, [[cross-correlation]], and [[autocorrelation]]. For the operations involving function <math>f</math>, and assuming the height of <math>f</math> is 1.0, the value of the result at 5 different points is indicated by the shaded area below each point. The symmetry of <math>f</math> is the reason <math>f \star g</math> and <math>g*f</math> are identical in this example. <!--Note that g∗f and f∗g would be identical even without the symmetry of f, so please don't change the statement above.-->]] In [[mathematics]] (in particular, [[functional analysis]]), '''convolution''' is a [[operation (mathematics)|mathematical operation]] on two [[function (mathematics)|function]]s <math>f</math> and <math>g</math> that produces a third function <math>f*g</math>, as the [[integral]] of the product of the two functions after one is reflected about the y-axis and shifted. The term ''convolution'' 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 (see [[#Properties|commutativity]]). Graphically, it expresses how the 'shape' of one function is modified by the other. Some features of convolution are similar to [[cross-correlation]]: for real-valued functions, of a continuous or discrete variable, convolution <math>f*g</math> differs from cross-correlation <math>f \star g</math> only in that either <math>f(x)</math> or <math>g(x)</math> is reflected about the y-axis in convolution; thus it is a cross-correlation of <math>g(-x)</math> and <math>f(x)</math>, or <math>f(-x)</math> and <math>g(x)</math>.{{efn-ua|Reasons for the reflection include: *It is necessary to implement the equivalent of the pointwise product of the Fourier transforms of <math>f</math> and <math>g</math>. *When the convolution is viewed as a [[Moving-average model|moving weighted average]], the weighting function, <math>g(-x)</math>, is often specified in terms of another function, <math>g(x)</math>, called the [[impulse response]] of a [[Linear time-invariant system#Impulse response and convolution|linear time-invariant system]]. }} For complex-valued functions, the cross-correlation operator is the [[Hermitian adjoint|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 equation]]s.<ref>{{cite journal |last1=Bahri |first1=Mawardi |last2=Ashino |first2=Ryuichi |last3=Vaillancourt |first3=Rémi |title=Convolution Theorems for Quaternion Fourier Transform: Properties and Applications |url=https://core.ac.uk/download/pdf/25493611.pdf |archive-url=https://web.archive.org/web/20201021001150/https://core.ac.uk/download/pdf/25493611.pdf |archive-date=2020-10-21 |url-status=live |journal=Abstract and Applied Analysis |volume=2013 |access-date=2022-11-11 |pages=1–10 |doi=10.1155/2013/162769 |date=2013|doi-access=free}}</ref> The convolution can be defined for functions on [[Euclidean space]] and other [[group (mathematics)|group]]s (as [[algebraic structure]]s).{{citation needed|date=October 2017}} For example, [[periodic function]]s, such as the [[discrete-time Fourier transform]], can be defined on a [[circle]] and convolved by [[periodic convolution]]. (See row 18 at {{section link|DTFT|Properties}}.) A ''discrete convolution'' can be defined for functions on the set of [[integer]]s. 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.{{citation needed|date=October 2017}} Computing the [[Inverse function|inverse]] of the convolution operation is known as [[deconvolution]]. == Definition == The convolution of <math>f</math> and <math>g</math> is written <math>f * g</math>, denoting the operator with the symbol <math>*</math>.{{efn-ua | The symbol {{unichar|2217|asterisk operator}} is different than {{unichar|2A|asterisk}}, which is often used to denote complex conjugation. See {{slink|Asterisk|Mathematical typography}}. }} 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 of [[integral transform]]: :<math>(f * g)(t) := \int_{-\infty}^\infty f(\tau) g(t - \tau) \, d\tau.</math> An equivalent definition is (see [[#Properties|commutativity]]): :<math>(f * g)(t) := \int_{-\infty}^\infty f(t - \tau) g(\tau)\, d\tau.</math> While the symbol <math>t</math> is used above, it need not represent the time domain. At each <math>t</math>, the convolution formula can be described as the area under the function <math>f(\tau)</math> weighted by the function <math>g(-\tau)</math> shifted by the amount <math>t</math>. As <math>t</math> changes, the weighting function <math>g(t-\tau)</math> emphasizes different parts of the input function <math>f(\tau)</math>; If <math>t</math> is a positive value, then <math>g(t-\tau)</math> is equal to <math>g(-\tau)</math> that slides or is shifted along the <math>\tau</math>-axis toward the right (toward <math>+\infty</math>) by the amount of <math>t</math>, while if <math>t</math> is a negative value, then <math>g(t-\tau)</math> is equal to <math>g(-\tau)</math> that slides or is shifted toward the left (toward <math>-\infty</math>) by the amount of <math>|t|</math>. For functions <math>f</math>, <math>g</math> [[Support (mathematics)|supported]] on only <math>[0,\infty)</math> (i.e., zero for negative arguments), the integration limits can be truncated, resulting in: :<math>(f * g)(t) = \int_{0}^{t} f(\tau) g(t - \tau)\, d\tau \quad \ \text{for } f, g : [0, \infty) \to \mathbb{R}.</math> For the multi-dimensional formulation of convolution, see ''[[#Domain of definition|domain of definition]]'' (below). === Notation === A common engineering notational convention is:<ref> {{cite book|last1=Smith|first1=Stephen W|title=The Scientist and Engineer's Guide to Digital Signal Processing|date=1997|publisher=California Technical Publishing|isbn=0-9660176-3-3|edition=1|chapter-url=https://dspguide.com/ch13/2.htm|access-date=22 April 2016|chapter=13.Convolution}}</ref> :<math> f(t) * g(t) \mathrel{:=} \underbrace{\int_{-\infty}^\infty f(\tau) g(t - \tau)\, d\tau}_{(f * g )(t)},</math> which has to be interpreted carefully to avoid confusion. For instance, <math>f(t) * g(t-t_0)</math> is equivalent to <math>(f*g)(t-t_0)</math>, but <math>f(t-t_0) * g(t-t_0)</math> is in fact equivalent to <math>(f * g)(t-2t_0)</math>.<ref>{{cite book|last1=Irwin|first1=J. David|author-link=J. David Irwin|title=The Industrial Electronics Handbook|date=1997|publisher=CRC Press|location=Boca Raton, FL|isbn=0-8493-8343-9|page=75|edition=1|chapter=4.3}}</ref> === Relations with other transforms === Given two functions <math> f(t) </math> and <math> g(t) </math> with [[Two-sided Laplace transform|bilateral Laplace transform]]s (two-sided Laplace transform) :<math> F(s) = \int_{-\infty}^\infty e^{-su} \ f(u) \ \text{d}u </math> and :<math> G(s) = \int_{-\infty}^\infty e^{-sv} \ g(v) \ \text{d}v </math> respectively, the convolution operation <math> (f * g)(t) </math> can be defined as the [[inverse Laplace transform]] of the product of <math> F(s) </math> and <math> G(s) </math>.<ref>{{cite web |last1=Differential Equations (Spring 2010) |first1=MIT 18.03 |title=Lecture 21: Convolution Formula |url=https://ocw.mit.edu/courses/mathematics/18-03-differential-equations-spring-2010/video-lectures/lecture-21-convolution-formula/ |website=MIT Open Courseware |publisher=MIT |access-date=22 December 2021}}</ref><ref>{{cite web |title=18.03SC Differential Equations Fall 2011 |url=https://ocw.mit.edu/courses/mathematics/18-03sc-differential-equations-fall-2011/unit-iii-fourier-series-and-laplace-transform/transfer-system-and-weight-functions-greens-formula/MIT18_03SCF11_s30_5text.pdf |archive-url=https://web.archive.org/web/20150906102242/https://ocw.mit.edu/courses/mathematics/18-03sc-differential-equations-fall-2011/unit-iii-fourier-series-and-laplace-transform/transfer-system-and-weight-functions-greens-formula/MIT18_03SCF11_s30_5text.pdf |archive-date=2015-09-06 |url-status=live |website=Green's Formula, Laplace Transform of Convolution}}</ref> More precisely, :<math> \begin{align} F(s) \cdot G(s) &= \int_{-\infty}^\infty e^{-su} \ f(u) \ \text{d}u \cdot \int_{-\infty}^\infty e^{-sv} \ g(v) \ \text{d}v \\ &= \int_{-\infty}^\infty \int_{-\infty}^\infty e^{-s(u + v)} \ f(u) \ g(v) \ \text{d}u \ \text{d}v \end{align} </math> Let <math> t = u + v </math>, then :<math> \begin{align} F(s) \cdot G(s) &= \int_{-\infty}^\infty \int_{-\infty}^\infty e^{-st} \ f(u) \ g(t - u) \ \text{d}u \ \text{d}t \\ &= \int_{-\infty}^\infty e^{-st} \underbrace{\int_{-\infty}^\infty f(u) \ g(t - u) \ \text{d}u}_{(f * g)(t)} \ \text{d}t \\ &= \int_{-\infty}^\infty e^{-st} (f * g)(t) \ \text{d}t. \end{align} </math> Note that <math> F(s) \cdot G(s) </math> is the bilateral Laplace transform of <math> (f * g)(t) </math>. A similar derivation can be done using the [[Laplace transform|unilateral 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 as ''linear time-invariant'' (LTI). See [[LTI system theory#Overview|LTI system theory]] for a derivation of convolution as the result of LTI constraints. In terms of the [[Fourier transform]]s 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 a [[transfer function]]). See [[Convolution 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. == Visual explanation == {| class="wikitable" |- | {{ordered list | list_style = margin-left:1.6em;|Express each function in terms of a [[Free variables and bound variables|dummy variable]] <math>\tau.</math>|Reflect one of the functions: <math>g(\tau)</math> → <math>g(-\tau).</math>|Add an offset of the independent variable, <math>t</math>, which allows <math>g(-\tau)</math> to slide along the <math>\tau</math>-axis. If {{mvar|t}} is a positive value, then <math>g(t-\tau)</math> is equal to <math>g(-\tau)</math> that slides or is shifted along the <math>\tau</math>-axis toward the right (toward <math>+\infty</math>) by the amount of <math>t</math>. If <math>t</math> is a negative value, then <math>g(t-\tau)</math> is equal to <math>g(-\tau)</math> that slides or is shifted toward the left (toward <math>-\infty</math>) by the amount of <math>|t|</math>.|Start <math>t</math> at <math>-\infty</math> and slide it all the way to <math>+\infty</math>. Wherever the two functions intersect, find the integral of their product. In other words, at time <math>t</math>, compute the area under the function <math>f(\tau)</math> weighted by the weighting function <math>g(t - \tau).</math> }} The resulting [[waveform]] (not shown here) is the convolution of functions <math>f</math> and <math>g</math>. If <math>f(t)</math> is a [[unit impulse]], the result of this process is simply <math>g(t)</math>. Formally: : <math>\int_{-\infty}^\infty \delta(\tau) g(t - \tau)\, d\tau = g(t)</math> | [[File:Convolution3.svg|center|452x452px|class=skin-invert-image]] |- | In this example, the red-colored "pulse", <math>\ g(\tau),</math> is an [[even function]] <math>(\ g(-\tau) = g(\tau)\ ),</math> so convolution is equivalent to correlation. A snapshot of this "movie" shows functions <math>g(t - \tau)</math> and <math>f(\tau)</math> (in blue) for some value of parameter <math>t,</math> which is arbitrarily defined as the distance along the <math>\tau</math> axis from the point <math>\tau = 0</math> to the center of the red pulse. The amount of yellow is the area of the product <math>f(\tau) \cdot g(t - \tau),</math> computed by the convolution/correlation integral. The movie is created by continuously changing <math>t</math> and recomputing the integral. The result (shown in black) is a function of <math>t,</math> but is plotted on the same axis as <math>\tau,</math> for convenience and comparison. | [[File:Convolution of box signal with itself2.gif|475px|class=skin-invert-image]] |- | In this depiction, <math>f(\tau)</math> could represent the response of a [[resistor-capacitor circuit]] to a narrow pulse that occurs at <math>\tau = 0.</math> In other words, if <math>g(\tau) = \delta(\tau),</math> the result of convolution is just <math>f(t).</math> But when <math>g(\tau)</math> is the wider pulse (in red), the response is a "smeared" version of <math>f(t).</math> It begins at <math>t = -0.5,</math> because we defined <math>t</math> as the distance from the <math>\tau = 0</math> axis to the ''center'' of the wide pulse (instead of the leading edge). | [[File:Convolution of spiky function with box2.gif|475px|class=skin-invert-image]] |} == Historical developments == One of the earliest uses of the convolution integral appeared in [[Jean le Rond d'Alembert|D'Alembert]]'s derivation of [[Taylor's theorem]] in ''Recherches sur différents points importants du système du monde,'' published in 1754.<ref>Dominguez-Torres, p 2</ref> Also, an expression of the type: :<math>\int f(u)\cdot g(x - u) \, du</math> is used by [[Sylvestre François Lacroix]] on page 505 of his book entitled ''Treatise on differences and series'', which is the last of 3 volumes of the encyclopedic series: {{Lang|fr|Traité du calcul différentiel et du calcul intégral}}, Chez Courcier, Paris, 1797–1800.<ref>Dominguez-Torres, p 4</ref> Soon thereafter, convolution operations appear in the works of [[Pierre 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 as ''Faltung'' (which means ''folding'' in [[German language|German]]), ''composition product'', ''superposition integral'', and ''[[John Renshaw Carson|Carson]]'s integral''.<ref> {{Citation | chapter = Early work on imaging theory in radio astronomy | author = R. N. Bracewell | editor = W. T. Sullivan | title = The Early Years of Radio Astronomy: Reflections Fifty Years After Jansky's Discovery | publisher = Cambridge University Press | year = 2005 | isbn = 978-0-521-61602-7 | page = 172 | chapter-url = https://books.google.com/books?id=v2SqL0zCrwcC&pg=PA172 }}</ref> Yet it appears as early as 1903, though the definition is rather unfamiliar in older uses.<ref> {{Citation | title = The algebra of invariants | author = John Hilton Grace and Alfred Young | publisher = Cambridge University Press | year = 1903 | page = 40 | url = https://books.google.com/books?id=NIe4AAAAIAAJ&pg=PA40 }}</ref><ref> {{Citation | title = Algebraic invariants | author = Leonard Eugene Dickson | publisher = J. Wiley | year = 1914 | page = 85 | isbn = 978-1-4297-0042-9 | url = https://books.google.com/books?id=LRGoAAAAIAAJ&pg=PA85 }}</ref> The operation: :<math>\int_0^t \varphi(s)\psi(t - s) \, ds,\quad 0 \le t < \infty,</math> is a particular case of composition products considered by the Italian mathematician [[Vito Volterra]] in 1913.<ref> According to [Lothar von Wolfersdorf (2000), "Einige Klassen quadratischer Integralgleichungen", ''Sitzungsberichte der Sächsischen Akademie der Wissenschaften zu Leipzig'', ''Mathematisch-naturwissenschaftliche Klasse'', volume '''128''', number 2, 6–7], the source is Volterra, Vito (1913), "Leçons sur les fonctions de linges". Gauthier-Villars, Paris 1913. </ref> == Circular convolution == {{Main article|Circular convolution}} When a function <math>g_T</math> is periodic, with period <math>T</math>, then for functions, <math>f</math>, such that <math>f * g_T</math> exists, the convolution is also periodic and identical to: :<math>(f * g_T)(t) \equiv \int_{t_0}^{t_0+T} \left[\sum_{k=-\infty}^\infty f(\tau + kT)\right] g_T(t - \tau)\, d\tau,</math> where <math>t_0</math> is an arbitrary choice. The summation is called a [[periodic summation]] of the function <math>f</math>. When <math>g_T</math> is a periodic summation of another function, <math>g</math>, then <math>f*g_T</math> is known as a ''circular'' or ''cyclic'' convolution of <math>f</math> and <math>g</math>. And if the periodic summation above is replaced by <math>f_T</math>, the operation is called a ''periodic'' convolution of <math>f_T</math> and <math>g_T</math>. == Discrete convolution == [[File:2D Convolution Animation.gif|thumb|right|class=skin-invert-image|Discrete 2D Convolution Animation]] For complex-valued functions <math>f</math> and <math>g</math> defined on the set <math>\Z</math> of integers, the ''discrete convolution'' of <math>f</math> and <math>g</math> is given by:<ref>{{harvnb|Damelin|Miller|2011|p=219}}</ref> :<math>(f * g)[n] = \sum_{m=-\infty}^\infty f[m] g[n - m],</math> or equivalently (see [[#Properties|commutativity]]) by: :<math>(f * g)[n] = \sum_{m=-\infty}^\infty f[n-m] g[m].</math> 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 two [[polynomial]]s, then the coefficients of the [[Polynomial multiplication|ordinary product of the two polynomials]] are the convolution of the original two sequences. This is known as the [[Cauchy product]] of the coefficients of the sequences. Thus when {{mvar|g}} has finite support in the set <math>\{-M,-M+1,\dots,M-1,M\}</math> (representing, for instance, a [[finite impulse response]]), a finite summation may be used:<ref>{{cite book |last1=Press |first1=William H. |last2=Flannery |first2=Brian P. |last3=Teukolsky |first3=Saul A. |last4=Vetterling |first4=William T. |title=Numerical Recipes in Pascal |year=1989 |publisher=Cambridge University Press |isbn=0-521-37516-9 |page=[https://archive.org/details/numericalrecipes0000unse/page/450 450] |url=https://archive.org/details/numericalrecipes0000unse/page/450}}</ref> :<math>(f * g)[n]=\sum_{m=-M}^M f[n-m]g[m].</math> === Circular discrete convolution === When a function <math>g_{_N}</math> is periodic, with period <math>N,</math> then for functions, <math>f,</math> such that <math>f*g_{_N}</math> exists, the convolution is also periodic and identical to''':''' :<math>(f * g_{_N})[n] \equiv \sum_{m=0}^{N-1} \left(\sum_{k=-\infty}^\infty {f}[m + kN]\right) g_{_N}[n - m].</math> The summation on <math>k</math> is called a [[periodic summation]] of the function <math>f.</math> If <math>g_{_N}</math> is a periodic summation of another function, <math>g,</math> then <math>f*g_{_N}</math> is known as a [[circular convolution]] of <math>f</math> and <math>g.</math> When the non-zero durations of both <math>f</math> and <math>g</math> are limited to the interval <math>[0,N-1],</math> <math>f*g_{_N}</math> reduces to these common forms''':''' {{Equation box 1|title= |indent=: |cellpadding= 0 |border= 0 |background colour=white |equation={{NumBlk2| |<math>\begin{align} \left(f * g_N\right)[n] &= \sum_{m=0}^{N-1} f[m]g_N[n - m] \\ &= \sum_{m=0}^n f[m]g[n - m] + \sum_{m=n+1}^{N-1} f[m]g[N + n - m] \\[2pt] &= \sum_{m=0}^{N-1} f[m]g[(n - m)_\bmod{N}] \\[2pt] &\triangleq \left(f *_N g\right)[n] \end{align}</math> |Eq.1}}}} The notation <math>f *_N g</math> for ''cyclic convolution'' denotes convolution over the [[cyclic group]] of [[modular arithmetic|integers modulo {{math|''N''}}]]. Circular convolution arises most often in the context of fast convolution with a [[fast Fourier transform]] (FFT) algorithm. === Fast convolution algorithms === 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 in [[multiplication]] of multi-digit numbers, which can therefore be efficiently implemented with transform techniques ({{harvnb|Knuth|1997|loc=§4.3.3.C}}; {{harvnb|von zur Gathen|Gerhard|2003|loc=§8.2}}). {{EquationNote|Eq.1}} requires {{mvar|N}} arithmetic operations per output value and {{math|''N''<sup>2</sup>}} operations for {{mvar|N}} 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({{mvar|N}} log {{mvar|N}}) complexity. The most common fast convolution algorithms use [[fast Fourier transform]] (FFT) algorithms via the [[Discrete Fourier transform#Circular convolution theorem and cross-correlation theorem|circular convolution theorem]]. Specifically, the [[circular 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 the [[Schönhage–Strassen algorithm]] or the Mersenne transform,<ref name=Rader1972>{{cite journal|last=Rader|first=C.M.|title=Discrete Convolutions via Mersenne Transforms|journal=IEEE Transactions on Computers|date=December 1972|volume=21|issue=12|pages=1269–1273|doi=10.1109/T-C.1972.223497|s2cid=1939809}}</ref> use fast Fourier transforms in other [[ring (mathematics)|ring]]s. The Winograd method is used as an alternative to the FFT.<ref>{{Cite book |last=Winograd |first=Shmuel |url=https://epubs.siam.org/doi/book/10.1137/1.9781611970364 |title=Arithmetic Complexity of Computations |date=January 1980 |publisher=Society for Industrial and Applied Mathematics |isbn=978-0-89871-163-9 |language=en |doi=10.1137/1.9781611970364}}</ref> It significantly speeds up 1D,<ref>{{Cite journal |last1=Lyakhov |first1=P. A. |last2=Nagornov |first2=N. N. |last3=Semyonova |first3=N. F. |last4=Abdulsalyamova |first4=A. S. |date=June 2023 |title=Reducing the Computational Complexity of Image Processing Using Wavelet Transform Based on the Winograd Method |url=https://link.springer.com/10.1134/S1054661823020074 |journal=Pattern Recognition and Image Analysis |language=en |volume=33 |issue=2 |pages=184–191 |doi=10.1134/S1054661823020074 |s2cid=259310351 |issn=1054-6618}}</ref> 2D,<ref>{{Cite journal |last1=Wu |first1=Di |last2=Fan |first2=Xitian |last3=Cao |first3=Wei |last4=Wang |first4=Lingli |date=May 2021 |title=SWM: A High-Performance Sparse-Winograd Matrix Multiplication CNN Accelerator |url=https://ieeexplore.ieee.org/document/9373543 |journal=IEEE Transactions on Very Large Scale Integration (VLSI) Systems |volume=29 |issue=5 |pages=936–949 |doi=10.1109/TVLSI.2021.3060041 |s2cid=233433757 |issn=1063-8210}}</ref> and 3D<ref>{{Cite journal |last1=Mittal |first1=Sparsh |last2=Vibhu |date=May 2021 |title=A survey of accelerator architectures for 3D convolution neural networks |url=https://linkinghub.elsevier.com/retrieve/pii/S1383762121000400 |journal=Journal of Systems Architecture |language=en |volume=115 |pages=102041 |doi=10.1016/j.sysarc.2021.102041|s2cid=233917781 }}</ref> 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.<ref name=Madisetti1999>{{cite book|editor-last=Madisetti |editor-first=Vijay K. |chapter=Fast Convolution and Filtering |first1=Ivan W. |last1=Selesnick |first2=C. Sidney |last2=Burrus |title=Digital Signal Processing Handbook |year=1999 |publisher=CRC Press |isbn=978-1-4200-4563-5 |page=Section 8}}</ref> Instead, decomposing the longer sequence into blocks and convolving each block allows for faster algorithms such as the [[overlap–save method]] and [[overlap–add method]].<ref name=Juang2004>{{cite web|last=Juang|first=B.H.|title=Lecture 21: Block Convolution|url=https://users.ece.gatech.edu/~juang/4270/BHJ4270-21.pdf |archive-url=https://web.archive.org/web/20040729204137/https://users.ece.gatech.edu/~juang/4270/BHJ4270-21.pdf |archive-date=2004-07-29 |url-status=live|publisher=EECS at the Georgia Institute of Technology|access-date=17 May 2013}}</ref> A hybrid convolution method that combines block and [[finite impulse response|FIR]] algorithms allows for a zero input-output latency that is useful for real-time convolution computations.<ref name=Gardner1994>{{cite journal|last=Gardner|first=William G.|title=Efficient Convolution without Input/Output Delay|journal=Audio Engineering Society Convention 97|date=November 1994|series=Paper 3897|url=https://cs.ust.hk/mjg_lib/bibs/DPSu/DPSu.Files/Ga95.PDF |archive-url=https://web.archive.org/web/20150408211312/https://cs.ust.hk/mjg_lib/bibs/DPSu/DPSu.Files/Ga95.PDF |archive-date=2015-04-08 |url-status=live|access-date=17 May 2013}}</ref> == Domain of definition == The convolution of two complex-valued functions on {{math|'''R'''<sup>''d''</sup>}} is itself a complex-valued function on {{math|'''R'''<sup>''d''</sup>}}, defined by: :<math>(f * g )(x) = \int_{\mathbf{R}^d} f(y)g(x-y)\,dy = \int_{\mathbf{R}^d} f(x-y)g(y)\,dy,</math> and is well-defined only if {{mvar|f}} and {{mvar|g}} 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 in {{mvar|g}} at infinity can be easily offset by sufficiently rapid decay in {{mvar|f}}. The question of existence thus may involve different conditions on {{mvar|f}} and {{mvar|g}}: === Compactly supported functions === If {{mvar|f}} and {{mvar|g}} are [[compact support|compactly supported]] [[continuous function]]s, then their convolution exists, and is also compactly supported and continuous {{harv|Hörmander|1983|loc=Chapter 1}}. More generally, if either function (say {{mvar|f}}) is compactly supported and the other is [[locally integrable function|locally integrable]], then the convolution {{math|''f''∗''g''}} is well-defined and continuous. Convolution of {{mvar|f}} and {{mvar|g}} is also well defined when both functions are locally square integrable on {{math|'''R'''}} and supported on an interval of the form {{math|[''a'', +∞)}} (or both supported on {{math|[−∞, ''a'']}}). === Integrable functions === The convolution of {{mvar|f}} and {{mvar|g}} exists if {{mvar|f}} and {{mvar|g}} are both [[Lebesgue integral|Lebesgue integrable function]]s in [[Lp space|{{math|''L''<sup>1</sup>}}({{math|'''R'''<sup>''d''</sup>}})]], and in this case {{math|''f''∗''g''}} is also integrable {{harv|Stein|Weiss|1971|loc=Theorem 1.3}}. This is a consequence of [[Fubini's theorem#Tonelli's theorem|Tonelli's theorem]]. This is also true for functions in {{math|''L''<sup>1</sup>}}, under the discrete convolution, or more generally for the [[#Convolutions on groups|convolution on any group]]. Likewise, if {{math|''f'' ∈ ''L''<sup>1</sup>}}({{math|'''R'''<sup>''d''</sup>}}) and {{math|''g'' ∈ ''L''<sup>''p''</sup>}}({{math|'''R'''<sup>''d''</sup>}}) where {{math|1 ≤ ''p'' ≤ ∞}}, then {{math|''f''*''g'' ∈ ''L''<sup>''p''</sup>}}({{math|'''R'''<sup>''d''</sup>}}), and :<math>\|{f}* g\|_p\le \|f\|_1\|g\|_p.</math> In the particular case {{math|''p'' {{=}} 1}}, this shows that {{math|''L''<sup>1</sup>}} is a [[Banach algebra]] under the convolution (and equality of the two sides holds if {{mvar|f}} and {{mvar|g}} are non-negative almost everywhere). More generally, [[Young's convolution inequality|Young's inequality]] implies that the convolution is a continuous bilinear map between suitable {{math|''L''<sup>''p''</sup>}} spaces. Specifically, if {{math| 1 ≤ ''p'', ''q'', ''r'' ≤ ∞}} satisfy: :<math>\frac{1}{p}+\frac{1}{q}=\frac{1}{r}+1,</math> then :<math>\left\Vert f*g\right\Vert_r\le\left\Vert f\right\Vert_p\left\Vert g\right\Vert_q,\quad f\in L^p,\ g\in L^q,</math> so that the convolution is a continuous bilinear mapping from {{math|''L''<sup>''p''</sup>×''L''<sup>''q''</sup>}} to {{math|''L''<sup>''r''</sup>}}. The Young inequality for convolution is also true in other contexts (circle group, convolution on {{math|'''Z'''}}). The preceding inequality is not sharp on the real line: when {{math| 1 < ''p'', ''q'', ''r'' < ∞}}, there exists a constant {{math|''B''<sub>''p'',''q''</sub> < 1}} such that: :<math>\left\Vert f*g\right\Vert_r\le B_{p,q}\left\Vert f\right\Vert_p\left\Vert g\right\Vert_q,\quad f\in L^p,\ g\in L^q.</math> The optimal value of {{math|''B''<sub>''p'',''q''</sub>}} was discovered in 1975<ref>{{cite journal | first1=William | last1=Beckner | authorlink1=William Beckner (mathematician) | year=1975 | title=Inequalities in Fourier analysis | journal=Annals of Mathematics |series=Second Series | volume=102 | issue=1 | pages=159–182 | doi=10.2307/1970980| jstor=1970980}}</ref> and independently in 1976,<ref>{{cite journal | first1=Herm Jan | last1=Brascamp | first2=Elliott H. | last2=Lieb | authorlink2=Elliott H. Lieb | year=1976 | title=Best constants in Young's inequality, its converse, and its generalization to more than three functions | journal=[[Advances in Mathematics]] | volume=20 | issue=2 | pages=151–173 | doi=10.1016/0001-8708(76)90184-5 | doi-access=free}}</ref> see [[Brascamp–Lieb inequality]]. A stronger estimate is true provided {{math| 1 < ''p'', ''q'', ''r'' < ∞}}: :<math>\|f * g\|_r\le C_{p,q}\|f\|_p\|g\|_{q,w}</math> where <math>\|g\|_{q,w}</math> is the [[Lp space#Weak Lp|weak {{math|''L''<sup>''q''</sup>}}]] norm. Convolution also defines a bilinear continuous map <math>L^{p,w}\times L^{q,w}\to L^{r,w}</math> for <math>1< p,q,r<\infty</math>, owing to the weak Young inequality:<ref>{{harvnb|Reed|Simon|1975|loc=IX.4}}</ref> :<math>\|f * g\|_{r,w}\le C_{p,q}\|f\|_{p,w}\|g\|_{r,w}.</math> === Functions of rapid decay === 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 if ''f'' and ''g'' both decay rapidly, then ''f''∗''g'' also decays rapidly. In particular, if ''f'' and ''g'' are [[rapidly decreasing function]]s, then so is the convolution ''f''∗''g''. Combined with the fact that convolution commutes with differentiation (see [[#Properties]]), it follows that the class of [[Schwartz function]]s is closed under convolution {{harv|Stein|Weiss|1971|loc=Theorem 3.3}}. === Distributions === {{Main article|Distribution (mathematics)}} If ''f'' is a smooth function that is [[Support (mathematics)#Compact support|compactly supported]] and ''g'' is a distribution, then ''f''∗''g'' is a smooth function defined by :<math>\int_{\mathbb{R}^d} {f}(y)g(x-y)\,dy = (f*g)(x) \in C^\infty(\mathbb{R}^d) .</math> More generally, it is possible to extend the definition of the convolution in a unique way with <math>\varphi</math> the same as ''f'' above, so that the associative law :<math>f* (g* \varphi) = (f* g)* \varphi</math> remains valid in the case where ''f'' is a distribution, and ''g'' a compactly supported distribution {{harv|Hörmander|1983|loc=§4.2}}. === Measures === The convolution of any two [[Borel measure]]s ''μ'' and ''ν'' of [[bounded variation]] is the measure <math>\mu*\nu</math> defined by {{harv|Rudin|1962}} :<math>\int_{\mathbf{R}^d} f(x) \, d(\mu*\nu)(x) = \int_{\mathbf{R}^d}\int_{\mathbf{R}^d}f(x+y)\,d\mu(x)\,d\nu(y).</math> In particular, : <math>(\mu*\nu)(A) = \int_{\mathbf{R}^d\times\mathbf R^d}1_A(x+y)\, d(\mu\times\nu)(x,y),</math> where <math>A\subset\mathbf R^d</math> is a measurable set and <math>1_A</math> is the [[indicator function]] of <math>A</math>. This agrees with the convolution defined above when μ and ν are regarded as distributions, as well as the convolution of L<sup>1</sup> 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 :<math>\|\mu* \nu\|\le \|\mu\|\|\nu\| </math> where the norm is the [[total variation]] of a measure. Because the space of measures of bounded variation is a [[Banach space]], convolution of measures can be treated with standard methods of [[functional analysis]] that may not apply for the convolution of distributions. == Properties == === Algebraic properties === {{See also|Convolution algebra}} The convolution defines a product on the [[linear 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 commutative [[associative algebra]] without [[identity element|identity]] {{harv|Strichartz|1994|loc=§3.3}}. Other linear spaces of functions, such as the space of continuous functions of compact support, are [[closure (mathematics)|closed]] under the convolution, and so also form commutative associative algebras. ; [[Commutativity]]: <math display="block">f * g = g * f </math> Proof: By definition: <math display="block">(f * g)(t) = \int^\infty_{-\infty} f(\tau)g(t - \tau)\, d\tau</math> Changing the variable of integration to <math>u = t - \tau</math> the result follows. ; [[Associativity]]: <math display="block">f * (g * h) = (f * g) * h</math> Proof: This follows from using [[Fubini's theorem]] (i.e., double integrals can be evaluated as iterated integrals in either order). ; [[Distributivity]]: <math display="block">f * (g + h) = (f * g) + (f * h)</math> Proof: This follows from linearity of the integral. ; Associativity with scalar multiplication: <math display="block">a (f * g) = (a f) * g</math> for any real (or complex) number <math>a</math>. ; [[Multiplicative identity]]: 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 a [[Dirac delta|delta distribution]] (a unitary impulse, centered at zero) or, at the very least (as is the case of ''L''<sup>1</sup>) admit [[Nascent delta function|approximations to the identity]]. The linear space of compactly supported distributions does, however, admit an identity under the convolution. Specifically, <math display="block">f * \delta = f</math> where ''δ'' is the delta distribution. ; Inverse element: Some distributions ''S'' have an [[inverse element]] ''S''<sup>−1</sup> for the convolution which then must satisfy <math display="block">S^{-1} * S = \delta</math> from which an explicit formula for ''S''<sup>−1</sup> may be obtained.{{paragraph}}The set of invertible distributions forms an [[abelian group]] under the convolution. ; Complex conjugation: <math display="block">\overline{f * g} = \overline{f} * \overline{g}</math> ; Time reversal: If <math>q(t) = r(t)*s(t),</math> then <math>q(-t) = r(-t)*s(-t).</math> <blockquote> Proof (using [[convolution theorem]]): <math>q(t) \ \stackrel{\mathcal{F}}{\Longleftrightarrow}\ \ Q(f) = R(f)S(f)</math> <math>q(-t) \ \stackrel{\mathcal{F}}{\Longleftrightarrow}\ \ Q(-f) = R(-f)S(-f)</math> <math> \begin{align} q(-t) &= \mathcal{F}^{-1}\bigg\{R(-f)S(-f)\bigg\}\\ &= \mathcal{F}^{-1}\bigg\{R (-f)\bigg\} * \mathcal{F}^{-1}\bigg\{S(-f)\bigg\}\\ &= r(-t) * s(-t) \end{align} </math> </blockquote> ; Relationship with differentiation: <math display="block">(f * g)' = f' * g = f * g'</math> Proof: :<math> \begin{align} (f * g)' & = \frac{d}{dt} \int^\infty_{-\infty} f(\tau) g(t - \tau) \, d\tau \\ & =\int^\infty_{-\infty} f(\tau) \frac{\partial}{\partial t} g(t - \tau) \, d\tau \\ & =\int^\infty_{-\infty} f(\tau) g'(t - \tau) \, d\tau = f* g'. \end{align} </math> ; Relationship with integration: If <math display="inline">F(t) = \int^t_{-\infty} f(\tau) d\tau,</math> and <math display="inline">G(t) = \int^t_{-\infty} g(\tau) \, d\tau,</math> then <math display="block">(F * g)(t) = (f * G)(t) = \int^t_{-\infty}(f * g)(\tau)\,d\tau.</math> === Integration === If ''f'' and ''g'' are integrable functions, then the integral of their convolution on the whole space is simply obtained as the product of their integrals:<ref>{{Cite web|last=Weisstein|first=Eric W.|title=Convolution|url=https://mathworld.wolfram.com/Convolution.html|access-date=2021-09-22|website=mathworld.wolfram.com|language=en}}</ref> : <math>\int_{\mathbf{R}^d}(f * g)(x) \, dx=\left(\int_{\mathbf{R}^d}f(x) \, dx\right) \left(\int_{\mathbf{R}^d}g(x) \, dx\right).</math> This follows from [[Fubini's theorem]]. The same result holds if ''f'' and ''g'' are only assumed to be nonnegative measurable functions, by [[Fubini's theorem#Tonelli's theorem|Tonelli's theorem]]. === Differentiation === In the one-variable case, : <math>\frac{d}{dx}(f * g) = \frac{df}{dx} * g = f * \frac{dg}{dx}</math> where <math>\frac{d}{dx}</math> is the [[derivative]]. More generally, in the case of functions of several variables, an analogous formula holds with the [[partial derivative]]: : <math>\frac{\partial}{\partial x_i}(f * g) = \frac{\partial f}{\partial x_i} * g = f * \frac{\partial g}{\partial x_i}.</math> A particular consequence of this is that the convolution can be viewed as a "smoothing" operation: the convolution of ''f'' and ''g'' is differentiable as many times as ''f'' and ''g'' are in total. These identities hold for example under the condition that ''f'' and ''g'' are absolutely integrable and at least one of them has an absolutely integrable (L<sup>1</sup>) weak derivative, as a consequence of [[Young's convolution inequality]]. For instance, when ''f'' is continuously differentiable with compact support, and ''g'' is an arbitrary locally integrable function, : <math>\frac{d}{dx}(f* g) = \frac{df}{dx} * g.</math> These identities also hold much more broadly in the sense of tempered distributions if one of ''f'' or ''g'' is a [[distribution (mathematics)#Convolution versus multiplication|rapidly 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, the [[difference operator]] ''D'' ''f''(''n'') = ''f''(''n'' + 1) − ''f''(''n'') satisfies an analogous relationship: : <math>D(f * g) = (Df) * g = f * (Dg).</math> === Convolution theorem === The [[convolution theorem]] states that<ref>{{cite web |last1=Weisstein |first1=Eric W |title=From MathWorld--A Wolfram Web Resource |url=https://mathworld.wolfram.com/ConvolutionTheorem.html}}</ref> : <math> \mathcal{F}\{f * g\} = \mathcal{F}\{f\}\cdot \mathcal{F}\{g\}</math> where <math> \mathcal{F}\{f\}</math> denotes the [[Fourier transform]] of <math>f</math>. ==== Convolution in other types of transformations ==== Versions of this theorem also hold for the [[Laplace transform]], [[two-sided Laplace transform]], [[Z-transform]] and [[Mellin transform]]. ==== Convolution on matrices ==== If <math>\mathcal W</math> is the [[DFT matrix|Fourier transform matrix]], then : <math>\mathcal W\left(C^{(1)}x \ast C^{(2)}y\right) = \left(\mathcal W C^{(1)} \bull \mathcal W C^{(2)}\right)(x \otimes y) = \mathcal W C^{(1)}x \circ \mathcal W C^{(2)}y</math>, where <math> \bull </math> is [[Khatri–Rao product#Face-splitting product|face-splitting product]],<ref name="slyusar">{{Cite journal|last=Slyusar|first=V. I.|date= December 27, 1996|title=End products in matrices in radar applications. |url=https://slyusar.kiev.ua/en/IZV_1998_3.pdf |archive-url=https://web.archive.org/web/20130811122444/https://slyusar.kiev.ua/en/IZV_1998_3.pdf |archive-date=2013-08-11 |url-status=live|journal=Radioelectronics and Communications Systems |volume=41 |issue=3|pages=50–53}}</ref><ref name="slyusar1">{{Cite journal|last=Slyusar|first=V. I.|date=1997-05-20|title=Analytical model of the digital antenna array on a basis of face-splitting matrix products. |url=https://slyusar.kiev.ua/ICATT97.pdf |archive-url=https://web.archive.org/web/20130811112059/https://slyusar.kiev.ua/ICATT97.pdf |archive-date=2013-08-11 |url-status=live|journal=Proc. ICATT-97, Kyiv|pages=108–109}}</ref><ref name="DIPED">{{Cite journal|last=Slyusar|first=V. I.|date=1997-09-15|title=New operations of matrices product for applications of radars|url=https://slyusar.kiev.ua/DIPED_1997.pdf |archive-url=https://web.archive.org/web/20130811113217/https://slyusar.kiev.ua/DIPED_1997.pdf |archive-date=2013-08-11 |url-status=live|journal=Proc. Direct and Inverse Problems of Electromagnetic and Acoustic Wave Theory (DIPED-97), Lviv.|pages=73–74}}</ref><ref name="slyusar2">{{Cite journal|last=Slyusar|first=V. I.|date=March 13, 1998|title=A Family of Face Products of Matrices and its Properties|url=https://slyusar.kiev.ua/FACE.pdf |archive-url=https://web.archive.org/web/20130811113935/https://slyusar.kiev.ua/FACE.pdf |archive-date=2013-08-11 |url-status=live|journal=Cybernetics and Systems Analysis C/C of Kibernetika I Sistemnyi Analiz.- 1999.|volume=35|issue=3|pages=379–384|doi=10.1007/BF02733426|s2cid=119661450}}</ref><ref name="general">{{Cite journal|last=Slyusar|first=V. I.|date=2003|title=Generalized face-products of matrices in models of digital antenna arrays with nonidentical channels|url=https://slyusar.kiev.ua/en/IZV_2003_10.pdf |archive-url=https://web.archive.org/web/20130811125643/https://slyusar.kiev.ua/en/IZV_2003_10.pdf |archive-date=2013-08-11 |url-status=live|journal=Radioelectronics and Communications Systems|volume=46|issue=10|pages=9–17}}</ref> <math> \otimes </math> denotes [[Kronecker product]], <math> \circ </math> denotes [[Hadamard product (matrices)|Hadamard product]] (this result is an evolving of [[count sketch]] properties<ref name="ninh">{{cite conference | title = Fast and scalable polynomial kernels via explicit feature maps | last1 = Ninh | first1 = Pham | first2 = Rasmus | last2 = Pagh | author2-link = Rasmus Pagh | date = 2013 | publisher = Association for Computing Machinery | conference = SIGKDD international conference on Knowledge discovery and data mining | doi = 10.1145/2487575.2487591 }}</ref>). This can be generalized for appropriate matrices <math>\mathbf{A},\mathbf{B}</math>: : <math>\mathcal W\left((\mathbf{A}x) \ast (\mathbf{B}y)\right) = \left((\mathcal W \mathbf{A}) \bull (\mathcal W \mathbf{B})\right)(x \otimes y) = (\mathcal W \mathbf{A}x) \circ (\mathcal W \mathbf{B}y)</math> from the properties of the [[face-splitting product]]. === Translational equivariance === The convolution commutes with translations, meaning that : <math>\tau_x (f * g) = (\tau_x f) * g = f * (\tau_x g)</math> where τ<sub>''x''</sub>f is the translation of the function ''f'' by ''x'' defined by : <math>(\tau_x f)(y) = f(y - x).</math> If ''f'' is a [[Schwartz function]], then ''τ<sub>x</sub>f'' is the convolution with a translated Dirac delta function ''τ''<sub>''x''</sub>''f'' = ''f'' ∗ ''τ''<sub>''x''</sub> ''δ''. 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 that ''S'' is a bounded [[linear operator]] acting on functions which commutes with translations: ''S''(''τ<sub>x</sub>f'') = ''τ<sub>x</sub>''(''Sf'') for all ''x''. Then ''S'' is given as convolution with a function (or distribution) ''g''<sub>''S''</sub>; that is ''Sf'' = ''g''<sub>''S''</sub> ∗ ''f''. Thus some translation invariant operations can be represented as convolution. Convolutions play an important role in the study of [[time-invariant system]]s, and especially [[LTI system theory]]. The representing function ''g''<sub>''S''</sub> is the [[impulse response]] of the transformation ''S''. 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 that ''S'' must be a [[continuous linear operator]] with respect to the appropriate [[topology]]. It is known, for instance, that every continuous translation invariant continuous linear operator on ''L''<sup>1</sup> is the convolution with a finite [[Borel measure]]. More generally, every continuous translation invariant continuous linear operator on ''L''<sup>''p''</sup> for 1 ≤ ''p'' < ∞ is the convolution with a [[Distribution (mathematics)#Tempered distributions and Fourier transform|tempered distribution]] whose [[Fourier transform]] is bounded. To wit, they are all given by bounded [[Fourier multiplier]]s. == Convolutions on groups == If ''G'' is a suitable [[group (mathematics)|group]] endowed with a [[measure (mathematics)|measure]] λ, and if ''f'' and ''g'' are real or complex valued [[Lebesgue integral|integrable]] functions on ''G'', then we can define their convolution by :<math>(f * g)(x) = \int_G f(y) g\left(y^{-1}x\right)\,d\lambda(y).</math> It is not commutative in general. In typical cases of interest ''G'' is a [[locally compact]] [[Hausdorff space|Hausdorff]] [[topological group]] and λ is a (left-) [[Haar measure]]. In that case, unless ''G'' is [[unimodular group|unimodular]], the convolution defined in this way is not the same as <math display="inline">\int f\left(xy^{-1}\right)g(y) \, d\lambda(y)</math>. The preference of one over the other is made so that convolution with a fixed function ''g'' commutes with left translation in the group: :<math>L_h(f* g) = (L_hf)* g.</math> 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. On [[locally compact abelian group]]s, a version of the [[convolution theorem]] holds: the Fourier transform of a convolution is the pointwise product of the Fourier transforms. The [[circle group]] '''T''' with the Lebesgue measure is an immediate example. For a fixed ''g'' in ''L''<sup>1</sup>('''T'''), we have the following familiar operator acting on the [[Hilbert space]] ''L''<sup>2</sup>('''T'''): :<math>T {f}(x) = \frac{1}{2 \pi} \int_{\mathbf{T}} {f}(y) g( x - y) \, dy.</math> The operator ''T'' is [[compact operator on Hilbert space|compact]]. A direct calculation shows that its adjoint ''T* '' is convolution with :<math>\bar{g}(-y).</math> By the commutativity property cited above, ''T'' is [[normal operator|normal]]: ''T''* ''T'' = ''TT''* . Also, ''T'' commutes with the translation operators. Consider the family ''S'' of operators consisting of all such convolutions and the translation operators. Then ''S'' is a commuting family of normal operators. According to [[compact operator on Hilbert space|spectral theory]], there exists an orthonormal basis {''h<sub>k</sub>''} that simultaneously diagonalizes ''S''. This characterizes convolutions on the circle. Specifically, we have :<math>h_k (x) = e^{ikx}, \quad k \in \mathbb{Z},\;</math> which are precisely the [[Character (mathematics)|character]]s of '''T'''. Each convolution is a compact [[multiplication operator]] in this basis. This can be viewed as a version of the convolution theorem discussed above. A discrete example is a finite [[cyclic group]] of order ''n''. Convolution operators are here represented by [[circulant matrices]], and can be diagonalized by the [[discrete Fourier transform]]. A similar result holds for compact groups (not necessarily abelian): the matrix coefficients of finite-dimensional [[unitary representation]]s form an orthonormal basis in ''L''<sup>2</sup> by the [[Peter–Weyl theorem]], and an analog of the convolution theorem continues to hold, along with many other aspects of [[harmonic analysis]] that depend on the Fourier transform. == Convolution of measures == Let ''G'' be a (multiplicatively written) topological group. If μ and ν are [[Radon measure]]s on ''G'', then their convolution ''μ''∗''ν'' is defined as the [[pushforward measure]] of the [[Group action (mathematics)|group action]] and can be written as<ref>Hewitt and Ross (1979) ''Abstract harmonic analysis, volume 1'', second edition, Springer-Verlag, p 266.</ref> <!-- PLEASE READ THIS BEFORE EDITING: Groups are written multiplicatively, so please don't change this from multiplication in the group to "+". :<math>(\mu * \nu)(E) = \iint 1_E(xy) \,d\mu(x) \,d\nu(y)</math> -->:<math>(\mu * \nu)(E) = \iint 1_E(xy) \,d\mu(x) \,d\nu(y)</math> for each measurable subset ''E'' of ''G''. The convolution is also a Radon measure, whose [[total variation]] satisfies :<math>\|\mu * \nu\| \le \left\|\mu\right\| \left\|\nu\right\|.</math> In the case when ''G'' is [[locally compact]] with (left-)[[Haar measure]] λ, and μ and ν are [[absolute continuity|absolutely continuous]] with respect to a λ, [[Radon–Nikodym theorem|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, if ''either'' measure is absolutely continuous with respect to the Haar measure, then so is their convolution.<ref>Hewitt and Ross (1979), Theorem 19.18, p 272.</ref> If μ and ν are [[probability measure]]s on the topological group {{nowrap|('''R''',+),}} then the convolution ''μ''∗''ν'' is the [[probability distribution]] of the sum ''X'' + ''Y'' of two [[statistical independence|independent]] [[random variable]]s ''X'' and ''Y'' whose respective distributions are μ and ν. == Infimal convolution == In [[convex analysis]], the '''infimal convolution''' of proper (not identically <math>+\infty</math>) [[convex function]]s <math>f_1,\dots,f_m</math> on <math>\mathbb R^n</math> is defined by:<ref>{{citation|author=[[R. Tyrrell Rockafellar]]|title=Convex analysis|publisher=Princeton University Press|year=1970}}</ref> <math display="block">(f_1*\cdots*f_m)(x)=\inf_x \{ f_1(x_1)+\cdots+f_m(x_m) | x_1+\cdots+x_m = x\}.</math> 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 the [[Legendre transform]]: <math display="block">\varphi^*(x) = \sup_y ( x\cdot y - \varphi(y)).</math> We have: <math display="block">(f_1*\cdots *f_m)^*(x) = f_1^*(x) + \cdots + f_m^*(x).</math> == Bialgebras == Let (''X'', Δ, ∇, ''ε'', ''η'') be a [[bialgebra]] with comultiplication Δ, multiplication ∇, unit η, and counit ''ε''. The convolution is a product defined on the [[endomorphism algebra]] End(''X'') as follows. Let ''φ'', ''ψ'' ∈ End(''X''), that is, ''φ'', ''ψ'': ''X'' → ''X'' are functions that respect all algebraic structure of ''X'', then the convolution ''φ''∗''ψ'' is defined as the composition :<math>X \mathrel{\xrightarrow{\Delta}} X \otimes X \mathrel{\xrightarrow{\phi\otimes\psi}} X \otimes X \mathrel{\xrightarrow{\nabla}} X.</math> The convolution appears notably in the definition of [[Hopf algebra]]s {{harv|Kassel|1995|loc=§III.3}}. A bialgebra is a Hopf algebra if and only if it has an antipode: an endomorphism ''S'' such that :<math>S * \operatorname{id}_X = \operatorname{id}_X * S = \eta\circ\varepsilon.</math> == Applications == [[File:Halftone, Gaussian Blur.jpg|thumb|right|[[Gaussian blur]] can be used to obtain a smooth grayscale digital image of a [[halftone]] print.]] Convolution and related operations are found in many applications in science, engineering and mathematics. * [[Convolutional neural network]]s apply multiple cascaded ''convolution'' kernels with applications in [[machine vision]] and [[artificial intelligence]].<ref>{{Cite journal|last1=Zhang|first1=Yingjie|last2=Soon|first2=Hong Geok|last3=Ye|first3=Dongsen|last4=Fuh|first4=Jerry Ying Hsi|last5=Zhu|first5=Kunpeng|date=September 2020|title=Powder-Bed Fusion Process Monitoring by Machine Vision With Hybrid Convolutional Neural Networks|url=https://ieeexplore.ieee.org/document/8913613|journal=IEEE Transactions on Industrial Informatics|volume=16|issue=9|pages=5769–5779|doi=10.1109/TII.2019.2956078|s2cid=213010088|issn=1941-0050}}</ref><ref>{{Cite journal|last1=Chervyakov|first1=N.I.|last2=Lyakhov|first2=P.A.|last3=Deryabin|first3=M.A.|last4=Nagornov|first4=N.N.|last5=Valueva|first5=M.V.|last6=Valuev|first6=G.V.|date=September 2020|title=Residue Number System-Based Solution for Reducing the Hardware Cost of a Convolutional Neural Network|url=https://linkinghub.elsevier.com/retrieve/pii/S092523122030583X|journal=Neurocomputing|language=en|volume=407|pages=439–453|doi=10.1016/j.neucom.2020.04.018|s2cid=219470398|quote=Convolutional neural networks represent deep learning architectures that are currently used in a wide range of applications, including computer vision, speech recognition, time series analysis in finance, and many others.}}</ref> Though these are actually '''cross-correlations''' rather than convolutions in most cases.<ref>{{Cite journal|last=Atlas, Homma, and Marks|title=An Artificial Neural Network for Spatio-Temporal Bipolar Patterns: Application to Phoneme Classification|url=https://papers.nips.cc/paper/1987/file/98f13708210194c475687be6106a3b84-Paper.pdf |archive-url=https://web.archive.org/web/20210414091306/https://papers.nips.cc/paper/1987/file/98f13708210194c475687be6106a3b84-Paper.pdf |archive-date=2021-04-14 |url-status=live|journal=Neural Information Processing Systems (NIPS 1987)|volume=1}}</ref> * In non-[[artificial neural network|neural-network]]-based [[image processing]] ** In [[digital image processing]] convolutional filtering plays an important role in many important [[algorithm]]s in [[edge detection]] and related processes (see [[Kernel (image processing)]]) ** In [[optics]], an out-of-focus photograph is a convolution of the sharp image with a lens function. The photographic term for this is [[bokeh]]. ** In image processing applications such as adding blurring. * In digital data processing ** In [[analytical chemistry]], [[Savitzky–Golay smoothing filter]]s are used for the analysis of spectroscopic data. They can improve [[signal-to-noise ratio]] with minimal distortion of the spectra<!--<ref name=Scafer2011>{{cite journal|last=Schafer|first=Ronald W.|title= What is a Savitzky-Golay Filter? [Lecture Notes]|journal= IEEE Signal Processing Magazine|date=July 2011|volume= 28|issue= 4|pages= 111–117|doi=10.1109/MSP.2011.941097|url=https://www-inst.eecs.berkeley.edu/~ee123/fa12/docs/SGFilter.pdf |archive-url=https://web.archive.org/web/20140124083227/https://www-inst.eecs.berkeley.edu/~ee123/fa12/docs/SGFilter.pdf |archive-date=2014-01-24 |url-status=live|access-date=18 May 2013}}</ref>--> ** In [[statistics]], a weighted [[moving average]] is a convolution. * In [[acoustics]], [[reverberation]] is the convolution of the original sound with [[echo (phenomenon)|echo]]es from objects surrounding the sound source. ** In digital signal processing, convolution is used to map the [[impulse response]] of a real room on a digital audio signal. ** In [[electronic music]] convolution is the imposition of a [[Spectrum|spectral]] 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.<ref>Zölzer, Udo, ed. (2002). ''DAFX:Digital Audio Effects'', p.48–49. {{isbn|0471490784}}.</ref> * In [[electrical engineering]], the convolution of one function (the [[Signal (electrical engineering)|input signal]]) with a second function (the impulse response) gives the output of a [[linear 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. * In [[physics]], wherever there is a [[linear system]] with a "[[superposition principle]]", a convolution operation makes an appearance. For instance, in [[spectroscopy]] line broadening due to the Doppler effect on its own gives a [[Normal distribution|Gaussian]] [[spectral line shape]] and collision broadening alone gives a [[Cauchy distribution|Lorentzian]] line shape. When both effects are operative, the line shape is a convolution of Gaussian and Lorentzian, a [[Voigt function]]. ** In [[Time-resolved spectroscopy#Time-resolved fluorescence spectroscopy|time-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 [[computational fluid dynamics]], the [[large eddy simulation]] (LES) [[turbulence model]] uses the convolution operation to lower the range of length scales necessary in computation thereby reducing computational cost. * In [[probability theory]], the [[probability distribution]] of the sum of two [[independent (probability)|independent]] [[random variable]]s is the convolution of their individual distributions. ** In [[kernel density estimation]], a distribution is estimated from sample points by convolution with a kernel, such as an isotropic Gaussian.{{sfn|Diggle|1985}} * In radiotherapy treatment planning systems, most part of all modern codes of calculation applies a [[convolution-superposition algorithm]].{{Clarify|date=May 2013}} * 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 the [[joint distribution function]]. In fact, the joint distribution function can be obtained using the convolution theory.{{sfn|Ghasemi|Nowak|2017}} * In [[Smoothed-particle hydrodynamics]], simulations of fluid dynamics are calculated using particles, each with surrounding kernels. For any given particle <math>i</math>, some physical quantity <math>A_i</math> is calculated as a convolution of <math>A_j</math> with a weighting function, where <math>j</math> denotes the neighbors of particle <math>i</math>: those that are located within its kernel. The convolution is approximated as a summation over each neighbor.<ref name="1992ARA&A..30..543M">{{cite journal |last1=Monaghan |first1=J. J. |title=Smoothed particle hydrodynamics |journal=Annual Review of Astronomy and Astrophysics |date=1992 |volume=30 |pages=543–547 |doi=10.1146/annurev.aa.30.090192.002551 |bibcode=1992ARA&A..30..543M |url=https://ui.adsabs.harvard.edu/abs/1992ARA&A..30..543M |access-date=16 February 2021 |ref=1992ARA&A..30..543M}}</ref> * In [[Fractional calculus]] convolution is instrumental in various definitions of fractional integral and fractional derivative. == See also == {{Div col|colwidth=30em}} * [[Analog signal processing]] * [[Circulant matrix]] * [[Convolution for optical broad-beam responses in scattering media]] * [[Convolution power]] * [[Convolution quotient]] * [[Deconvolution]] * [[Dirichlet convolution]] * [[Generalized signal averaging]] * [[List of convolutions of probability distributions]] * [[LTI system theory#Impulse response and convolution]] * [[Multidimensional discrete convolution]] * [[Scaled correlation]] * [[Titchmarsh convolution theorem]] * [[Toeplitz matrix]] (convolutions can be considered a Toeplitz matrix operation where each row is a shifted copy of the convolution kernel) * [[Wavelet transform]] {{Div col end}} == Notes == {{notelist-ua}} == References == {{reflist}} ==Further reading== * {{citation | last1=Bracewell | first1=R. | title=The Fourier Transform and Its Applications| edition=2nd | publisher=McGraw–Hill | year=1986 | bibcode=1986ftia.book.....B | isbn=0-07-116043-4}}. * {{citation | last1=Damelin | first1=S. | last2=Miller | first2=W. | title=The Mathematics of Signal Processing | publisher=Cambridge University Press | isbn=978-1107601048 | year=2011}} * {{citation | last=Diggle | first=P. J. | s2cid=116746157 | title=A kernel method for smoothing point process data | journal=Journal of the Royal Statistical Society, Series C | volume = 34 | issue=2 | pages = 138–147 |doi=10.2307/2347366 | year=1985 | jstor=2347366}} * Dominguez-Torres, Alejandro (Nov 2, 2010). "Origin and history of convolution". 41 pgs. https://slideshare.net/Alexdfar/origin-adn-history-of-convolution. Cranfield, Bedford MK43 OAL, UK. Retrieved Mar 13, 2013. * {{Citation | last1=Ghasemi | first1=S. Hooman | last2=Nowak | first2=Andrzej S. | title=Reliability Index for Non-normal Distributions of Limit State Functions | doi=10.12989/sem.2017.62.3.365 | year=2017 | journal=Structural Engineering and Mechanics | volume=62 | issue=3 | pages=365–372}} *{{Citation | last1=Grinshpan | first1=A. Z. | title=An inequality for multiple convolutions with respect to Dirichlet probability measure | doi=10.1016/j.aam.2016.08.001 | year=2017 | journal=Advances in Applied Mathematics | volume=82 | issue=1 | pages=102–119 | doi-access=free}} * {{Citation | last1=Hewitt | first1=Edwin | last2=Ross | first2=Kenneth A. | title=Abstract harmonic analysis. Vol. I | publisher=[[Springer-Verlag]] | location=Berlin, New York | edition=2nd | series=Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences] | isbn=978-3-540-09434-0 | mr=551496 | year=1979 | volume=115}}. * {{Citation | last1=Hewitt | first1=Edwin | last2=Ross | first2=Kenneth A. | title=Abstract harmonic analysis. Vol. II: Structure and analysis for compact groups. Analysis on locally compact Abelian groups | publisher=[[Springer-Verlag]] | location=Berlin, New York | series=Die Grundlehren der mathematischen Wissenschaften, Band 152 | mr=0262773 | year=1970}}. * {{citation | last=Hörmander | first=L. | author-link=Lars Hörmander | mr=0717035 | title=The analysis of linear partial differential operators I | series= Grundl. Math. Wissenschaft. | volume= 256 | publisher= Springer | year=1983 | isbn=3-540-12104-8 | doi=10.1007/978-3-642-96750-4}}. * {{Citation | last1=Kassel | first1=Christian | title=Quantum groups | publisher=[[Springer-Verlag]] | location=Berlin, New York | series=Graduate Texts in Mathematics | isbn=978-0-387-94370-1 | mr=1321145 | year=1995 | volume=155 | doi=10.1007/978-1-4612-0783-2 | url-access=registration | url=https://archive.org/details/quantumgroups0000kass}}. * {{citation | last=Knuth | first=Donald | author-link=Donald Knuth | title=Seminumerical Algorithms|edition=3rd. | location=Reading, Massachusetts | publisher=Addison–Wesley | year=1997 | isbn=0-201-89684-2}}. * {{Narici Beckenstein Topological Vector Spaces|edition=2}}<!-- {{sfn | Narici | 2011 | p=}} --> * {{citation | last1=Reed | first1=Michael | last2=Simon | first2=Barry | author2-link=Barry Simon | title=Methods of modern mathematical physics. II. Fourier analysis, self-adjointness | publisher=Academic Press Harcourt Brace Jovanovich, Publishers|location=New York-London | year= 1975 | pages= xv+361 | isbn =0-12-585002-6 | mr=0493420}} * {{Citation<!-- Citation bot--> | last1=Rudin | first1=Walter | author1-link=Walter Rudin | title=Fourier analysis on groups | publisher=Interscience Publishers | location=New York–London | series=Interscience Tracts in Pure and Applied Mathematics | volume=12 | mr=0152834 | year=1962 | isbn=0-471-52364-X}}. * {{Schaefer Wolff Topological Vector Spaces|edition=2}}<!-- {{sfn | Schaefer | 1999 | p=}} --> * {{citation | last1=Stein | first1=Elias | author-link1=Elias Stein | last2=Weiss | first2=Guido | title=Introduction to Fourier Analysis on Euclidean Spaces|publisher=Princeton University Press|year=1971|isbn=0-691-08078-X|url-access=registration|url=https://archive.org/details/introductiontofo0000stei}}. * {{springer | last=Sobolev | first=V.I.|id=C/c026430|title=Convolution of functions|year=2001}}. * {{citation | last=Strichartz | first=R.|year=1994|title=A Guide to Distribution Theory and Fourier Transforms|publisher=CRC Press|isbn=0-8493-8273-4}}. * {{citation | last=Titchmarsh | first=E|author-link=Edward Charles Titchmarsh|title=Introduction to the theory of Fourier integrals|isbn=978-0-8284-0324-5|year=1948|edition=2nd|publication-date=1986|publisher=Chelsea Pub. Co.|location=New York, N.Y.}}. * {{Trèves François Topological vector spaces, distributions and kernels}}<!-- {{sfn | Treves | 2006 | p=}} --> * {{citation | last=Uludag | first=A. M. |author-link=A. Muhammed Uludag|title=On possible deterioration of smoothness under the operation of convolution|journal=J. Math. Anal. Appl. |volume=227 |issue=2 |pages=335–358|year=1998|doi=10.1006/jmaa.1998.6091 |doi-access=free|hdl=11693/25385 |hdl-access=free }} * {{citation | last1=von zur Gathen | first1=J. | last2=Gerhard | first2=J .|title=Modern Computer Algebra|isbn=0-521-82646-2|year=2003|publisher=Cambridge University Press}}. == External links == {{Wiktionary|convolution}} {{Commons category|Convolution}} * [https://jeff560.tripod.com/c.html Earliest Uses: The entry on Convolution has some historical information.] * [https://web.archive.org/web/20060221234856/https://rkb.home.cern.ch/rkb/AN16pp/node38.html#SECTION000380000000000000000 Convolution], on [https://web.archive.org/web/20060512020859/https://rkb.home.cern.ch/rkb/titleA.html The Data Analysis BriefBook] * https://jhu.edu/~signals/convolve/index.html Visual convolution Java Applet * https://jhu.edu/~signals/discreteconv2/index.html Visual convolution Java Applet for discrete-time functions * https://get-the-solution.net/projects/discret-convolution discret-convolution online calculator *https://lpsa.swarthmore.edu/Convolution/CI.html Convolution demo and visualization in JavaScript *https://phiresky.github.io/convolution-demo/ Another convolution demo in JavaScript * [[iarchive:Lectures on Image Processing|Lectures on Image Processing: A collection of 18 lectures in pdf format from Vanderbilt University. Lecture 7 is on 2-D convolution.]], by Alan Peters * https://archive.org/details/Lectures_on_Image_Processing * [https://micro.magnet.fsu.edu/primer/java/digitalimaging/processing/kernelmaskoperation/ Convolution Kernel Mask Operation Interactive tutorial] * [https://mathworld.wolfram.com/Convolution.html Convolution] at [[MathWorld]] * [https://nongnu.org/freeverb3/ Freeverb3 Impulse Response Processor]: Opensource zero latency impulse response processor with VST plugins * Stanford University CS 178 [https://graphics.stanford.edu/courses/cs178/applets/convolution.html interactive Flash demo] showing how spatial convolution works. * [https://youtube.com/watch?v=IW4Reburjpc A video lecture on the subject of convolution] given by [[Salman Khan (educator)|Salman Khan]] * [https://dspguide.com/ch24/6.htm Example of FFT convolution for pattern-recognition (image processing)] *[https://betterexplained.com/articles/intuitive-convolution/ Intuitive Guide to Convolution] A blogpost about an intuitive interpretation of convolution. {{Artificial intelligence navbox}} [[Category:Functional analysis]] [[Category:Image processing]] [[Category:Fourier analysis]] [[Category:Bilinear maps]] [[Category:Feature detection (computer vision)]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:About
(
edit
)
Template:Artificial intelligence navbox
(
edit
)
Template:Citation
(
edit
)
Template:Citation needed
(
edit
)
Template:Cite book
(
edit
)
Template:Cite conference
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite web
(
edit
)
Template:Clarify
(
edit
)
Template:Commons category
(
edit
)
Template:Div col
(
edit
)
Template:Div col end
(
edit
)
Template:Efn-ua
(
edit
)
Template:EquationNote
(
edit
)
Template:Equation box 1
(
edit
)
Template:Harv
(
edit
)
Template:Harvnb
(
edit
)
Template:Isbn
(
edit
)
Template:Lang
(
edit
)
Template:Main article
(
edit
)
Template:Math
(
edit
)
Template:Mvar
(
edit
)
Template:Narici Beckenstein Topological Vector Spaces
(
edit
)
Template:Notelist-ua
(
edit
)
Template:Nowrap
(
edit
)
Template:Ordered list
(
edit
)
Template:Paragraph
(
edit
)
Template:Reflist
(
edit
)
Template:Schaefer Wolff Topological Vector Spaces
(
edit
)
Template:Section link
(
edit
)
Template:See also
(
edit
)
Template:Sfn
(
edit
)
Template:Short description
(
edit
)
Template:Sister project
(
edit
)
Template:Springer
(
edit
)
Template:Trèves François Topological vector spaces, distributions and kernels
(
edit
)
Template:Wiktionary
(
edit
)