An atomic-level simulation shows what happens to the metal bobby pin during the tempering process.
A synthetic diamond wafer and an aluminum disk are held between a thumb and forefinger (to provide heat). When pressed against an ice cube, the diamond penetrates more rapidly than does the aluminum.
Butter is used to glue a piece of pasta to each disk. When the edges of the disks are immersed in hot water, the butter on the diamond melts more rapidly, releasing the piece of pasta.
When memory metal is bent, it deforms. When placed into hot water, the metal "remembers" its original shape.
A metal bobby pin is heated until red hot, then allowed to cool slowly; this process is called annealing. The annealed bobby pin is very flexible.
The tempering process, which involves heating a hardened bobby pin then cooling slowly, transforms the brittle metal into springy metal.