A shape-memory alloy is a metal that returns to a remembered shape when heated, having been deformed while cool. The effect looks like a trick and is a well understood solid-state phase transformation, and it is in routine use in medicine and engineering.

These alloys have two crystal structures. The high-temperature phase, austenite, is more ordered and more symmetric. The low-temperature phase, martensite, can accommodate deformation by moving the boundaries between internal variants rather than by permanently displacing atoms, which is why bending it does not destroy the arrangement. Heating converts martensite back to austenite, and because austenite has only one possible arrangement, the object returns to its original shape.

A related property, superelasticity, appears when the material is above its transformation temperature: stress itself induces the martensite phase, so the material deforms enormously and springs back completely when released, recovering strains an ordinary metal could not survive.

Nitinol wire, an alloy of roughly equal nickel and titanium. Its transformation temperature can be tuned by small changes in composition, which is what makes it usable across so many applications.
Nitinol wire, an alloy of roughly equal nickel and titanium. Its transformation temperature can be tuned by small changes in composition, which is what makes it usable across so many applications.Credit: Petermaerki (CC BY-SA 3.0).
The transformation between austenite and martensite. Deformation in the low-temperature phase is accommodated by internal boundaries moving rather than atoms permanently displacing, which is why the original shape can be recovered.
The transformation between austenite and martensite. Deformation in the low-temperature phase is accommodated by internal boundaries moving rather than atoms permanently displacing, which is why the original shape can be recovered.Credit: Hui Qian, Hongnan Li, Gangbing Song, and Wei Guo (CC BY 3.0).

The workhorse is nitinol, roughly equal parts nickel and titanium, discovered in 1959 at the Naval Ordnance Laboratory by William Buehler, whose name it carries along with the laboratory's. Its transformation temperature can be tuned across a wide range by very small changes in composition, which is what makes it practical: an alloy can be designed to transform at body temperature, or at a specific industrial set point.

The medical applications are the most consequential. Self-expanding stents are compressed into a catheter, threaded into a blood vessel, and expand to a designed shape at body temperature. Guidewires exploit superelasticity to navigate vessels without kinking. Orthodontic archwires apply a gentle continuous force as they try to return to shape, rather than the decaying force of a conventional wire, which is why fewer adjustments are needed. Bone staples contract on warming to hold a fracture in compression.

Outside medicine: eyeglass frames that survive being sat on, actuators that need no motor, couplings that grip when they warm, and aerospace mechanisms where a wire replaces a hydraulic system and its weight.

A self-expanding stent. Compressed into a catheter and released at the target site, it expands to its remembered shape at body temperature, which is the single largest application of these alloys.
A self-expanding stent. Compressed into a catheter and released at the target site, it expands to its remembered shape at body temperature, which is the single largest application of these alloys.Credit: BruceBlaus. When using this image in external sources it can be cited as: Blausen.com staff (2014). "Medical gallery of Blausen Medical 2014". WikiJournal of Medicine 1 (2). DOI:10.15347/wjm/2014.010. ISSN 2002-4436. (CC BY 3.0).

The effect is not free. Fatigue is the principal constraint, since repeated transformation gradually degrades the recovery, which matters for anything cycling many times. Response is limited by how fast heat can be added and removed, so actuators are slow. The alloys are expensive and difficult to machine, work-hardening rapidly and resisting welding. And nitinol's nickel content raises questions for long-term implants, addressed through surface treatments that form a titanium oxide barrier, with the consensus being that properly treated devices are safe while the surface quality genuinely matters.