Real World Maths Busters

The Maths Behind Everyday Life

The story, the formula and a worked example — see exactly where this maths shows up in the world around you.

Back to all stories
Technology 3 min read

How JPEG Shrinks Photos

JPEG divides your image into 8×8 blocks and throws away invisible detail.

JPEG compression splits an image into 8×8 pixel blocks (64 pixels each), transforms each block mathematically, then discards details your eyes won’t miss.

Block Maths

A 4000 × 3000 image has 500 × 375 = 187,500 blocks. Each block goes through a DCT (Discrete Cosine Transform) that converts pixel brightness into frequency components. High frequencies (fine detail) are then quantised away.

How many 8×8 blocks in a 4000×3000 image?

  1. 1

    Horizontal blocks

    40008=500\frac{4000}{8} = 500
  2. 2

    Vertical blocks

    30008=375\frac{3000}{8} = 375
  3. 3

    Total

    500×375=187,500500 \times 375 = 187{,}500
Answer

187,500 blocks — each compressed independently

The takeaway

JPEG trades imperceptible detail for dramatic file size savings — all through 8×8 block transforms.

Back to all stories