Intuition The One Core Idea
A convolution takes a tiny grid of numbers (a filter ) and slides it over a picture, and at every stopping place it asks "how strongly does this little patch of the picture look like my pattern?" Everything else — strides, padding, channels, feature maps — is just bookkeeping for where the filter stops, how big each patch is, and how many answers we collect.
This page assumes you have seen nothing . We build every letter and symbol the parent note on Convolution operation and filters uses, in an order where each new idea leans only on the ones before it. A Hinglish version of the parent lives at 3.4.01 Convolution operation and filters (Hinglish) .
Before any symbol, look at what an image is to a computer.
Definition Image as a grid
A grayscale image is a rectangle of small squares called pixels . Each pixel holds ONE number — its brightness. Small number = dark, big number = bright. So the whole image is just a table of numbers arranged in rows (going down) and columns (going across).
Look at the figure: the pale-yellow square is one pixel; its number 2 is its brightness. The image has a height (how many rows) and a width (how many columns). That is all "image" means from here on.
I
I is just a name for the whole grid of input numbers. When we write I [ row , column ] we mean "the single number sitting at that row and column."
Plain words: I = the picture-as-a-table.
The picture: the full grid in figure s01.
Why the topic needs it: convolution reads its numbers out of I , so we need a way to point at any one cell.
Common mistake Rows first, then columns
I [ i , j ] means row i , column j — row comes first . This is the opposite of the ( x , y ) order you may know from graphs. Mixing them up flips the whole image.
Definition Position indices
i is the row number and j is the column number . Together ( i , j ) is an address: "go down i rows, across j columns, and read that pixel."
The picture: in figure s01 the arrow labelled ( i , j ) points at exactly one square.
Counting starts at 0. The very top-left pixel is I [ 0 , 0 ] , not I [ 1 , 1 ] . This is called zero-indexing and every formula below relies on it.
Recall Why start counting at 0?
If a row has W columns, the addresses run 0 , 1 , … , W − 1 . Starting at 0 makes "the m -th step from here" simply add m , with no awkward + 1 corrections. That is why the sums below use i + m , not i + m − 1 .
The picture: the two arrows down the side (H ) and along the top (W ) in figure s01.
Why needed: they tell us how far we can slide the filter before we fall off the edge — which is exactly what the output-size formula measures.
K and its side length k
K is a much smaller grid of numbers, called a filter or kernel . It is square: k rows by k columns. K [ m , n ] is the number in row m , column n of the filter.
Plain words: K is the little pattern we are hunting for. Its numbers say "I want dark here, bright there."
The picture: the small 3 × 3 chalk-blue grid in figure s02. Here k = 3 .
Why the topic needs it: without a filter there is no pattern to match. The filter's weights ARE the question convolution answers.
Intuition Why the filter is tiny
Real patterns like an edge are local — you only need a few neighbouring pixels to see one. A 3 × 3 window is enough to notice "left dark, right bright." So the filter stays small (few numbers to learn) yet the same small filter is reused everywhere.
Definition Filter-internal indices
m steps through the filter's rows (m = 0 , 1 , … , k − 1 ), n through its columns. So K [ m , n ] picks one filter weight, and I [ i + m , j + n ] picks the image pixel that sits underneath it.
The picture: figure s02 shows the filter laid on top of the image; the offsets m , n measure how far inside the overlaid window we are.
Why the i + m ? The window's top-left corner is at ( i , j ) . Move m down and n right inside the window, and you land on image pixel ( i + m , j + n ) . That is the whole reason those sums look the way they do.
Definition The summation sign
m = 0 ∑ k − 1 ( something with m ) is shorthand for "plug in m = 0 , then 1 , up to k − 1 , and add all the results."
Plain words: it is a for-loop that keeps a running total.
Example (one dimension): m = 0 ∑ 2 m = 0 + 1 + 2 = 3 .
Why two of them? The filter is 2D, so we loop over rows (m ) and columns (n ). A double sum ∑ m ∑ n visits every one of the k × k cells exactly once.
Recall Read this double sum out loud
∑ m = 0 k − 1 ∑ n = 0 k − 1 X [ m , n ] ::: "for every row m , and for every column n in that row, add up X [ m , n ] " — i.e. total over the whole little grid.
Now every symbol in the parent's main formula is defined, so we can read it:
( I ∗ K ) [ i , j ] = m = 0 ∑ k − 1 n = 0 ∑ k − 1 I [ i + m , j + n ] ⋅ K [ m , n ]
Intuition What the formula actually does — in three moves
WHAT: line the filter up so its top-left corner sits on image position ( i , j ) .
WHY the multiply: each filter weight K [ m , n ] multiplies the pixel under it. A big weight times a bright pixel = big contribution. This scores agreement between wish (filter) and reality (image).
WHY the sum: we add all k 2 little scores into ONE number. Big positive total = "patch strongly matches the pattern"; near zero = "pattern absent."
Figure s03 shows the three moves: overlay, multiply cell-by-cell, add into one output square.
∗ symbol
I ∗ K names this whole slide-multiply-add process. The parent notes it is technically cross-correlation (real math convolution flips the filter first), but since a network learns the filter numbers, the flip changes nothing — the learner would just learn the flipped weights. So we say "convolution."
Do the multiply-and-add at every place the filter can sit. Each place gives one number. Arrange those numbers back into a grid: that new grid is the feature map , written ( I ∗ K ) .
The picture: figure s03's output grid on the right — one output cell per filter position.
Why the topic needs it: the feature map is a "heat map of matches" — bright where the pattern is present. This is the whole point of a convolution layer.
s
s = how many pixels the filter jumps each move. s = 1 = touch every position (fine and slow). s = 2 = skip every other one (coarser, faster, smaller output).
p
p = how many rings of zeros we draw around the image before sliding. Zeros are "invisible" pixels; they let the filter's corner sit near the true edge without falling off.
The picture: figure s04 — a stride-2 jump (blue arrows) and a one-pixel zero border (pale ring).
Why stride: shrinks the output on purpose (cheaper compute, like pooling ).
Why padding: without it the feature map is smaller than the input by k − 1 each side; padding lets you keep the size .
Worked example Sanity check with the parent's numbers
H = 5 , p = 0 , k = 3 , s = 1 : ⌊( 5 + 0 − 3 ) /1 ⌋ + 1 = ⌊ 2 ⌋ + 1 = 3 . A 5 × 5 image with a 3 × 3 filter gives a 3 × 3 feature map. ✓
c
A colour image is really THREE stacked grids: red, green, blue. c picks which one. I [ i + m , j + n , c ] = the pixel at that spot in colour-layer c .
For colour input the filter also gains a depth, and we add across it:
( I ∗ K ) [ i , j ] = c ∑ m ∑ n ∑ I [ i + m , j + n , c ] ⋅ K [ m , n , c ]
c
Each colour layer is scored separately, then the three scores are merged into one number — so a filter can react to colour combinations ("red high + green high + blue low" = yellow). This idea of splitting per-channel work is pushed further in 3.4.10-Depthwise-separable-convolutions .
Pixel = one brightness number
Indices i j address a pixel
Filter K = tiny pattern grid
Indices m n inside filter
Multiply then Sum over m n
Feature map = all outputs
Each foundation feeds the next; together they assemble the full convolution the parent note defines. From here you can move on to receptive fields , full CNN architectures , and how these filters are learned via backpropagation (with helpers like batch normalization and reused across tasks in transfer learning ).
Cover the right side and answer aloud. If any stumps you, reread its section.
What does I [ i , j ] point to, and which index is the row? The single pixel value at row i , column j — the first index i is the row.
Where does counting start for i , j , m , n ? At 0 (zero-indexing); the top-left pixel is I [ 0 , 0 ] .
What are H and W ? Height = number of rows, Width = number of columns.
What is K and what does k mean? K is the filter (a small square pattern grid); k is its side length (e.g. k = 3 means 3 × 3 ).
Why is there a + m and + n in I [ i + m , j + n ] ? Because the window's corner sits at ( i , j ) ; moving m down and n right inside the window lands you on that image pixel.
What does ∑ m = 0 k − 1 tell you to do? Plug in m = 0 , 1 , … , k − 1 and add all the results (a summing loop).
In words, what is the convolution at one spot? Overlay filter, multiply each weight by the pixel under it, add all products into one number = match score.
What is a feature map? The grid of all those match scores, one per filter position.
What do stride s and padding p each control? s = how far the filter jumps per move; p = rings of zeros added around the border.
What does ⌊ ⌋ do and why is it here? Rounds down to a whole number, because you can't have a fractional filter position.
For a 3-channel RGB image, why do we sum over c ? Each colour layer is scored, then merged into one number so the filter can react to colour combinations.