Skip to content
Know.itKnow.it
Create an animated lesson
On request

This article is free to read. Creating a lesson uses your daily or stored credits; review the language and settings before starting.

How does a lock work?

TechnologyLesson on requestFree to read

Quick answer

A lock uses a key to move internal pins or discs so they align at a shear line. In a pin-tumbler lock, spring-loaded pin pairs block the plug until the correct key lifts each to the exact height. Then the plug rotates, retracting the latch. Wrong keys leave pins misaligned, so the plug cannot turn.

A lock works by using a key to align internal pins or discs so the plug can rotate and release the latch. When the correct key is inserted, the pins line up at the shear line, allowing the cylinder to turn and the door to open.

Step by step

  1. Insert the key into the plug (cylinder), pushing the key pins upward against the driver pins.
  2. Each key pin is pushed to a height determined by the key's cut depth, compressing the driver pin's spring.
  3. When the key is correct, the gap between every driver and key pin sits exactly at the shear line.
  4. The plug is now free to rotate because no pin crosses the shear line.
  5. Turning the plug moves the cam or tailpiece, which retracts the latch from the door frame.
  6. When the key is removed, springs push the driver pins back down, locking the plug again.

Key things to understand

  1. A lock is a mechanical or electronic device that secures an opening by preventing movement until a specific key or code is provided.
  2. In a pin-tumbler lock, the plug (cylinder) is blocked by a series of spring-loaded pins that sit in the housing and plug.
  3. Each pin pair consists of a driver pin (in the housing) and a key pin (in the plug), and their combined length matches the key's cut depth.
  4. When the correct key is inserted, the gaps between each driver and key pin align exactly at the shear line between plug and housing.
  5. With all gaps at the shear line, the plug can rotate freely, turning the cam or tailpiece to retract the latch and open the lock.

Labelled diagram

  1. Housing

    The fixed outer body that holds the driver pins and springs.

  2. Plug

    The rotating cylinder that holds the key pins and turns with the key.

  3. Pins

    Driver pins sit above key pins; their combined length matches the key cut.

  4. Shear line

    The gap between plug and housing; pins must align here to allow rotation.

  5. Key

    Lifts each pin pair so the gap sits exactly at the shear line.

  6. Cam

    Attached to the plug; rotates to retract the latch when the plug turns.

How a pin-tumbler lock opens

Real-world examples

  • A standard house door lock uses a pin-tumbler cylinder; the key's unique cuts match the pin lengths inside.
  • A padlock on a gym locker often uses a wafer lock, which is cheaper but easier to pick than a pin-tumbler.
  • Many car door and ignition locks use wafer tumblers: flat plates that must all line up with the edge of the plug before it turns.
  • A hotel keycard lock uses an electronic reader and a motor-driven latch, but the mechanical bolt still slides to secure the door.

Common mistake

✗ Myth: A lock is impossible to open without the exact key.

✓ Fact: Most mechanical locks can be picked or bypassed because they rely on precise tolerances that can be exploited. However, picking requires skill and time, and higher-security locks include features like security pins to make it much harder.

People also ask

How does a pin tumbler lock work?
A pin-tumbler lock has a series of spring-loaded pin pairs. Each pair consists of a driver pin in the housing and a key pin in the plug. The key's cuts push each key pin to a specific height. When the correct key is inserted, the gaps between all driver and key pins align at the shear line. This allows the plug to rotate and open the lock.
What is the shear line in a lock?
The shear line is the boundary between the plug (the rotating part) and the housing (the fixed part). In a locked state, driver pins cross this line, preventing rotation. When the correct key is inserted, the gaps between driver and key pins align exactly at the shear line, so no pin blocks the plug, and it can turn.
Why are some locks harder to pick?
Locks with security pins, such as spool or serrated pins, are harder to pick because they create false sets and require more precise manipulation. Tighter manufacturing tolerances also reduce the feedback a picker relies on. High-security locks may use sidebars, magnetic elements, or electronic components that resist traditional picking techniques.
What happens if you insert the wrong key?
The pins do not align at the shear line. At least one driver pin remains partly in the plug or a key pin protrudes into the housing, blocking rotation. The plug stays locked, and the latch cannot be retracted.
How does a lock pick work?
A pick applies upward pressure to each pin while a tension wrench turns the plug slightly. This binds pins one by one at the shear line. When all pins are set, the plug rotates. It exploits manufacturing tolerances, not a design flaw.
What is the difference between a pin-tumbler lock and a wafer lock?
A wafer lock uses flat, spring-loaded wafers instead of cylindrical pins. The wafers are cheaper to make but easier to pick. Pin-tumbler locks are more secure and common in homes and padlocks.
Can a lock be rekeyed to a different key?
Yes. A locksmith or homeowner can remove the plug and replace the key pins with ones of different lengths. This changes which key aligns the pins at the shear line, so old keys no longer work.

Part of the guide: Everyday Machines →