Features

A key doesn’t unlock a door by force. It solves a tiny puzzle: lifting a row of pins to exactly the right heights, all at once, so a cylinder is free to turn.

Features — 160

How a lock and key work

Filed UnderEveryday Objects, How Things Work
Read Time~3 minutes
PublishedNovember 13, 2026 at 8:43 PM
Keys hanging from a chrome door lock on a white door
Photo: Alena Darmel / Pexels

          The lock on most front doors is called a pin tumbler lock, and it has barely changed since the 1860s. A key doesn't unlock a door by force. It solves a tiny puzzle. Inside the small brass cylinder you put your key into, there are no electronics, no gears worth the name — just a row of tiny pins, some springs, and one very precise gap.

Two cylinders, one gap
          Picture two tubes, one inside the other. The outer tube, called the shell, is fixed to the door and never moves. The inner tube, called the plug, is the part your key slides into, and it's the part that turns. Between them is a thin circular gap called the shear line. When the plug turns, it pulls the bolt back and the door opens. When something blocks the plug from turning, the door stays shut.
          Drilled through both the shell and the plug is a row of small vertical shafts — typically five or six. Each shaft holds a stack of two pins with a spring on top: a key pin at the bottom, which the key will touch, and a driver pin above it. The spring pushes the whole stack downward.

“ Security, in the end, comes from alignment, not strength.”

The pins are the lock
          With no key in the lock, the springs push the driver pins down so that each one straddles the shear line — half in the shell, half in the plug. A pin sitting across that gap works like a bolt across a door: the plug can't rotate, because the driver pins are wedged between it and the shell. That straddling is the entire locked state.
          Your key is cut with a row of notches of different depths along one edge. As it slides in, each notch lifts one key pin by a precise amount. With the right key, every stack rises to exactly the right height: the gap between the key pin and the driver pin lines up with the shear line, all the driver pins end up entirely in the shell, all the key pins end up entirely in the plug, and nothing crosses the gap anymore. The plug turns freely.
          With the wrong key, even one pin a fraction too high or too low blocks the turn. Too low and the driver pin still crosses the line. Too high and the key pin itself crosses it instead. Every stack has to be right at the same time, which is why a key that almost fits doesn't almost work.

An old idea, miniaturized
          The pin tumbler principle is thousands of years old. The Egyptians built large wooden locks that worked the same way, with pins dropping into a bolt. Linus Yale Sr., an American lockmaker, built a modern metal version in 1848. His son, Linus Yale Jr., shrank the whole mechanism into a small cylinder and designed the small, flat, serrated key we still use — patented in 1861 and refined in 1865. The lock on your door is still essentially his design.
          Lock picking, for all its mystique, is just the same puzzle solved slowly. A pick lifts the pins one at a time while gentle turning pressure on the plug holds each pin at the shear line once it gets there. The key does all five or six stacks at once; a pick does them in sequence. The lock can't tell the difference, because the lock only knows one thing: whether anything is crossing the line.
          Security, in the end, comes from alignment, not strength. A few grams of brass, arranged so that only one pattern of heights clears the gap.

Enjoying the magazine?

A new story goes up every night at midnight. Find your next one by section.

Browse the sections