One of the goals for this column has been to catalog a series of mathematical concepts that have made a profound impact on all of STEM, not just the last letter of the acronym. Fortunately, I’ve recently had a few conversations with some of my non-math-major colleagues in The Stute that generated some great ideas for which concepts to cover. These ideas helped me write my last article on social connections (thank you, Ava!), and similarly, this article will introduce and share some ideas on convolutions (thank you, Kevin!).
Starting very generally, a convolution is a special combination of two functions, let’s say f and g, which produces a third function, usually labeled f ∗ g. The process of convolving these functions together starts by specifying the domain on which f and g are defined. We’ll assume for now that the domain is the set of integers from -5 to 5.
We take one of the functions g, and for any integer m in our domain, we consider the “reflected” version of g, that is, g(–m). Then, we modify g again, offsetting its argument by some fixed integer n, also in the domain, and multiply g(n–m) by f(m). Then, the convolution, written (f ∗ g)(n), is the sum of the products f(m)g(n–m) over all values m (from -5 to 5).
Intuitively, this operation tells us how much f and g overlap when they are plotted on a graph — fittingly, the definition of “convolve” is “to roll together or entwine.” If there’s a high overlap at certain points n, then the convolution will have a large value, whereas if there’s no overlap, the convolution will equal zero. I used a finite domain of integers for this example since it is the simplest case — but we can expand the definition of a convolution to infinite domains (m could range from negative to positive infinity), or even continuous domains, in which case we’d replace the sum of finite terms with an integral over the domain.
The connection between convolutions and overlapping visuals suggests that this mathematical concept may be of use in certain imaging applications. And indeed, convolutions make up a huge part of image processing techniques. Matrices, which are usually called “kernels” but whose operation on pixels is a type of convolution, can be used to sharpen, blur, or detect ridges and edges in a digital picture. If you’re interested in some great visual explanations of this, I’d recommend watching these two videos.
We can convolve lots of other things together, however. This happens more generally in optics when we notice pictures that have a sharp focus but blurry background; here, a sharp image is convolved with a lens modification that does the blurring. Additionally, the phenomenon of reverb occurs when source sounds convolve with echoes. Electrical engineers use convolutions to analyze so-called linear time-invariant systems, where the output signal is found by convolving a given input signal with the system’s impulse response function. This stimulus-response connection also appears in convolutional neural networks for the computer science fans out there.
I’ll end by going back to a fun mathematical application: random walks. A common analogy for the random walk involves a very intoxicated person who loses all sense of direction and takes steps at random. Using convolutions of certain probability functions, one can show that a random walker in two dimensions is almost guaranteed to end up where they started, but in three dimensions, the probability of eventual return is about 34% (and worse in higher dimensions if the walker can transverse those).
So, I will end this article with a piece of advice that has been rigorously proven mathematically: if you find yourself very drunk and not exactly sure which direction is home, DO NOT by any means try to hitch a ride on a plane or helicopter. You’re probably thinking, “well, duh,” and I agree, but it’s amazing how a very abstract result can “convolve” (in the literal sense of the word) with practical, no-nonsense advice.