How Does XRD Work: From X-Rays to Crystal Structure

X-ray diffraction (XRD) works by firing a beam of X-rays at a material and measuring how those X-rays bounce off the atoms inside it. The angles and intensities of the bounced X-rays reveal the arrangement of atoms within the material, acting like a fingerprint that can identify what a substance is made of, how its atoms are organized, and even how much internal stress it carries. It’s one of the most widely used techniques in materials science, geology, and pharmaceutical manufacturing.

Why X-rays Interact With Atoms

X-rays have wavelengths roughly the same size as the distances between atoms in a solid, typically on the order of angstroms (tenths of a nanometer). When an X-ray hits a row of atoms, each atom scatters a tiny bit of the X-ray energy in all directions. Most of those scattered waves cancel each other out. But at very specific angles, the waves from neighboring rows of atoms line up perfectly, reinforcing each other into a strong signal. This reinforcement is called constructive interference, and it’s the core principle behind every XRD measurement.

The relationship governing this is Bragg’s Law: nλ = 2d sinθ. Here, λ is the wavelength of the incoming X-rays, d is the spacing between parallel planes of atoms in the material, θ is the angle at which the X-rays hit those planes, and n is a whole number representing the “order” of the reflection. In plain terms, Bragg’s Law says that for a given atomic spacing, only certain angles will produce a strong reflected signal. Change the spacing, and the angle changes. That direct link between angle and atomic spacing is what makes XRD so powerful.

Inside the Instrument

An X-ray diffractometer has three basic components: an X-ray tube, a sample holder, and a detector. The X-ray tube generates a focused beam of X-rays, which is narrowed (collimated) so it hits the sample at a precise angle. The sample sits on a platform that can rotate, and the detector is mounted on an arm that swings around the sample to catch the diffracted beams.

The mechanical system controlling these rotations is called a goniometer. As the sample rotates through an angle θ relative to the incoming beam, the detector arm rotates at twice that rate, sweeping through 2θ. This geometry ensures the detector is always in the right position to catch whatever signal the sample produces at each angle. A typical scan sweeps through a wide range of 2θ values, collecting data point by point to build a complete picture of how the material diffracts X-rays.

Reading the Diffraction Pattern

The output of an XRD measurement is a plot with the diffraction angle (2θ) on the horizontal axis and signal intensity on the vertical axis. Each spike, or peak, on this plot corresponds to a specific set of atomic planes inside the material. The position of a peak tells you the spacing between those planes. Tighter spacing produces peaks at higher angles; wider spacing shows up at lower angles.

Peak intensity carries information too. Stronger peaks mean more of the material has that particular atomic arrangement, or that the atoms in those planes scatter X-rays more efficiently. If your sample contains multiple phases (say, two different minerals mixed together), each phase contributes its own set of peaks, and the relative heights give a rough sense of how much of each phase is present.

Identifying Unknown Materials

The most common use of XRD is figuring out what a material actually is. Every crystalline substance produces a unique diffraction pattern, so identifying an unknown sample is essentially a matching exercise. You compare your measured pattern against a library of known patterns until you find a match.

The standard reference for this is the Powder Diffraction File, maintained by the International Centre for Diffraction Data (ICDD). This database traces back to 1938, when researchers at Dow Chemical first published systematic diffraction data that were later printed on index cards for easy searching. Today the file is a massive digital database, continuously updated with new entries and reviewed by editors. Researchers load their measured peak positions and intensities into software that searches the database automatically, returning the best matches along with confidence scores.

Sample Preparation Matters

For standard powder XRD, the sample is ground into a fine powder and packed into a flat holder. The goal is to have millions of tiny crystallites oriented in every possible direction, so that for every set of atomic planes, some crystallites happen to be positioned at the correct angle to diffract. This random orientation gives you a complete, representative pattern.

Problems arise when particles aren’t randomly oriented. Flat or plate-like crystals, for example, tend to lie down in the same direction when packed into a holder, a phenomenon called preferred orientation. This skews the pattern, making some peaks artificially strong and others weak. Researchers test for this by preparing the same sample in different ways and comparing the results. Careful mixing, back-loading the sample holder, or using a spinning stage during measurement all help minimize the effect.

Particle size also plays a role. Very small crystallites, below about 10 nanometers, produce broadened peaks because the X-rays interact with fewer repeating planes. Below 5 nanometers, the broadening becomes so severe that peaks overlap and signal quality drops, making analysis difficult. On the other end, very large single crystals can produce “spottiness” rather than smooth peaks, which is why grinding samples into fine powders is standard practice.

Crystalline vs. Amorphous Materials

XRD relies on the repeating, orderly arrangement of atoms in a crystal. Materials that lack this long-range order, called amorphous materials (glass is a common example), don’t produce sharp diffraction peaks. Instead, they show a broad, rounded hump in the baseline, often called a “halo.” This hump reflects the fact that while atoms in amorphous materials do have some short-range spacing preferences, there’s no consistent repeating pattern for X-rays to reinforce.

Many real-world samples are mixtures of crystalline and amorphous material. In those cases, the diffraction pattern shows both: sharp peaks sitting on top of a broad hump. The sharp peaks come from the crystalline portion, and the hump comes from the amorphous portion. Even materials that are technically crystalline can show broadened peaks if their crystal domains are extremely small, because fewer repeating units means less reinforcement of the diffracted signal. At some point, the broadening becomes so extreme that crystalline peaks merge into a single halo, making the material look amorphous to XRD even though it retains some atomic order at the nanoscale.

Where XRD Is Used

In geology and mining, XRD is a standard tool for identifying minerals in rock samples. A geologist can grind a rock into powder, run a quick scan, and determine exactly which minerals are present and in what proportions. This is far more precise than visual identification alone, especially for fine-grained rocks where individual minerals are too small to see.

In pharmaceutical manufacturing, XRD plays a critical role in polymorph screening. Many drug compounds can crystallize in more than one atomic arrangement (polymorphs), and different polymorphs can dissolve at different rates, directly affecting how well a medication works in the body. XRD is the go-to method for confirming which polymorph is present in a batch and ensuring consistency from one production run to the next.

Beyond these, XRD is used in aerospace and electronics to measure residual stress in metal parts, track phase transformations in alloys during heat treatment, determine the size of crystalline domains in nanomaterials, and monitor thermal expansion in ceramics. Because the technique is non-destructive, the sample can be recovered and used for further testing afterward.

Safety in the XRD Lab

XRD instruments produce ionizing radiation, and while the X-ray beams are narrow and relatively low-power compared to medical X-ray machines, they can cause serious tissue damage with direct exposure, especially to hands and fingers working near the beam path. Labs protect operators through a combination of physical shielding around the X-ray tube and beam path, interlock switches that shut off the beam if a protective enclosure is opened, and warning lights that indicate when the X-ray source is active and when the shutter is open.

Operators typically wear film badges that track cumulative radiation exposure over time, and periodic radiation surveys check for any stray X-rays leaking through gaps in the shielding. If any interlock or safety device fails, the instrument is taken out of service until repairs are made. Modern commercial diffractometers are designed with full enclosures that make accidental exposure extremely unlikely during normal operation, but the protocols remain strict because the consequences of a shielding gap, even a small crack, can be significant.