Convolution, visualized
A convolution slides a small grid of numbers — a kernel — across an image, multiplying and summing as it goes, to produce a new 'feature map'. Different kernels detect different things: edges, corners, textures.
Convolutional neural networks (CNNs) learn these kernels automatically, stacking them to recognise increasingly complex patterns — from edges, to eyes, to faces. This tool shows the single operation everything else is built on.
Slide the kernel across the image
Kernel
Window (1,1)
3
sum of the 9 overlapping cells × the kernel weights
The edge kernel gives ~0 on flat areas and a big value right at the light/dark boundary — it has detected an edge.
Free · runs entirely in your browser · nothing to install
How to use it
- Slide the kernel over the image grid one position at a time.
- Watch each output cell fill in as the kernel multiplies and sums.
- Notice how an edge in the image produces a bright response in the feature map.
What you'll take away
- What a kernel (filter) is and how it scans an image.
- Why convolution is great at finding local patterns like edges.
- How stacked convolutions build up to object recognition.
Want to actually build this?
This demo is one moment inside a full Math to Machine lesson — predict, build, and explain the concept, with an AI tutor that gives hints, not answers. The first five lessons are free.
FAQ
- What is convolution in a CNN?
- It's the operation of sliding a small learned filter across an image and computing a weighted sum at each position, producing a feature map that highlights where a particular pattern appears.
- Why do CNNs use convolution instead of regular layers?
- Convolution reuses the same small filter everywhere in the image, so it needs far fewer parameters and naturally detects patterns regardless of where they appear — ideal for images.