Vector and raster: two ways to store an image

Computer Science · Key Stage 3 · The School

Raster: a fixed grid of pixels

A RASTER image, like a photo from a camera, is stored as a fixed grid of coloured pixels. Enlarge it, and there are no new pixels to show — the existing ones are simply stretched bigger, until you can see the individual squares. That blur is called PIXELATION.

Vector: shapes described by maths

A VECTOR image is stored completely differently: as a list of shapes, lines and curves, each described by coordinates and mathematical formulas rather than by fixed dots. A circle is stored as "a circle of this radius at this point", not as thousands of individual pixels arranged in a circle shape.

Why enlarging a vector stays sharp

When a vector image is enlarged, the computer does not stretch old dots. It REDRAWS the same shapes fresh, at the new size, from the same mathematical formulas. A circle drawn at ten times the size is still calculated as a perfect circle. That is why a vector logo looks identical on a business card and on the side of a building.

A photograph of a real sunset has countless natural colour variations, which only a raster grid of pixels can capture accurately — no simple mathematical formula draws a real photo. A company logo, by contrast, is usually simple shapes and flat colours, which vector formulas describe perfectly and which then scale to any size with no blur at all. That is exactly why photos are saved as JPEG or PNG, both raster formats, while logos are commonly saved as SVG, a vector format — the choice follows directly from what is actually being stored.

The School — all subjects · Knowledge map