  Traversal of a symmetry-breaking phase transition at a finite rate can lead
to causallyseparated regions with incompatible symmetries and the formation of
defects at their boundaries. The defect formation follows universal scaling
laws prescribed by the Kibble-Zurek mechanism (KZM) important to the study of
phase transitions in fields as diverse as quantum and statistical mechanics,
condensed matter physics and cosmology. Here, we observe the KZM in a crystal
of cold trapped ions, which is conducive to the precise control of structural
phases and the detection of defects. The experiment confirms a scaling law with
an exponent of 2.68 +/- 0.06, as predicted from the KZM in the finite
inhomogeneous case. Such precision makes it feasible to use ion crystals for
quantitative tests of classical and quantum statistical mechanics.
