Before the lock came the bolt
The simplest closure was a wooden or metal bar pushed into a socket behind the door. It could secure an entrance from within, but offered no controlled way to release it from outside. The lock began when access to that bolt was transferred into a protected case.
A key does not normally hold the door itself. It arranges or passes the obstruction inside the case so that the bolt can move. The bolt retains the door; the lock prevents unauthorised movement of that bolt.
How the wooden pin lock worked
Wooden pin devices associated with ancient Egypt used small pins dropping from the case into the sliding bar. A large wooden key with teeth in the correct positions lifted them from below and allowed the bar to travel sideways.
The system established an extraordinarily durable principle: a correct pattern of heights. Modern cylinder pins are smaller, sprung and metallic, yet the idea of a key aligning elements at different heights remains recognisable.
Metalwork made the lock smaller
The use of bronze and iron allowed thinner, stronger and more portable lock bodies. Roman locks served doors, chests and personal boxes. A third- to fourth-century bronze ring key in The Metropolitan Museum of Art shows that a key could also become a personal object worn on the hand.
Metal springs, pins and bolts enabled small movements that were difficult to reproduce in wood. Locks consequently spread from building entrances to furniture, strongboxes and portable possessions.
The warded lock and the bit key
In the warded locks common in medieval and later Europe, fixed obstructions were arranged inside the case. Openings in the bit of the key passed those obstructions, allowing the correctly shaped key to rotate and move the bolt.
Security depended on the arrangement of the wards and on restricting access to the key path. Larger cases could accommodate more elaborate patterns, while escutcheons and key bows became opportunities for decorative ironwork.
The eighteenth-century pursuit of precision
By the late eighteenth century, makers increasingly used moving elements that a key had to place at particular positions rather than merely pass. In a lever lock, the key raises a set of levers to different heights and clears the obstruction in front of the bolt.
Security now depended more heavily on dimensional precision. An incorrect key left one or more levers short of the required position. Better machine tools and metallurgy made those small differences repeatable.
Yale and the industrial pin cylinder
Linus Yale Jr.'s work in 1861 and 1865 arranged spring-loaded pins around a compact rotating cylinder. A correctly cut flat key placed the meeting points of the pins on the cylinder's shear line, permitting the plug to turn.
The cylinder made it possible to treat the keyed mechanism as a module separate from the latch or bolt work. A small key, a standardisable body and a large number of possible combinations helped the format spread through homes and workplaces.
Different movements require different locks
Industrialisation did not produce one universal lock. Padlocks, mortice locks, safe locks, cabinet locks and vehicle locks kept different bodies and bolts because each protected object moved and was built differently.
A sliding glass leaf illustrates the same rule. It does not swing on hinges, so the layout of a conventional door bolt may not suit it. Floor locks for automatic doors and bottom-rail locks for glass balconies retain the basic principle while adapting the bolt to a linear movement and narrow profile.
The mechanical principle continues
Cards, powered doors and remote access have changed daily operation without eliminating the physical lock. Electronics may decide who is authorised; the bolt still connects one moving part to a frame, rail or floor.
The ancient question survives inside today's compact mechanism: release movement for the correct key and retain the bolt otherwise. What has changed is the material, scale and accuracy of the answer.

