The physics of light, lenses, and waves — explained from first principles
Physics OpticsThe science of light
HomeArticlesAboutAuthorContact
Home/Articles/Diffraction
Diffraction

X-Ray Diffraction (XRD) Explained: Crystals, Proteins & Machines

Jun 22, 2026Physics Optics8 min read
Scientific laboratory equipment demonstrating x ray diffraction analysis on crystal sample in XRD machine

X-ray diffraction — XRD — is how scientists see atoms. Not through a lens, but by reading the pattern X-rays make when they bounce off a crystal. Shine X-rays at a crystal, and the regularly spaced atoms scatter the beam into a specific pattern of spots. The angles and intensities of those spots encode the positions of every atom in the crystal. Read the pattern correctly, and you get a 3D map of the atomic structure — from simple salt crystals to the complex proteins that drive life.

Think of it like a fingerprint. Every crystal has a unique arrangement of atoms, and that arrangement produces a unique diffraction pattern. No two crystalline materials give the same pattern. This is why an x ray diffraction machine can identify an unknown material, determine whether a drug is the right polymorph, or reveal the shape of a protein that causes disease.

Scientific laboratory equipment demonstrating x ray diffraction analysis with crystal sample mounted in an XRD machine

What is XRD and how does it work?

X-ray diffraction is a non-destructive analytical technique that reveals information about the crystallographic structure, chemical composition, and physical properties of materials. It works because X-rays have wavelengths in the ångström range (1 Å = 10⁻¹⁰ m) — roughly the same size as the spacing between atoms in a crystal. This matching of scales is essential: if the wavelength were much larger, the waves would not "see" the atomic-scale spacing.

When a beam of X-rays hits a crystal, each electron in the crystal scatters the X-rays in all directions (this is called Thomson scattering). Because the crystal has a regularly repeating lattice, the scattered waves from different atoms interfere. In most directions they cancel out. But at specific angles, the waves from parallel atomic planes arrive in phase and reinforce — producing a strong diffracted beam. Those angles are the ones that satisfy Bragg's law.

A modern XRD machine consists of three main parts:

ComponentFunction
X-ray sourceGenerates monochromatic X-rays (usually Cu Kα at 1.5406 Å)
Sample holder / goniometerPositions and rotates the crystal or powder sample
DetectorMeasures the intensity of diffracted X-rays at each angle

The sample is scanned through a range of angles (typically 5° to 90° in 2θ), and the detector records the intensity at each step. The result is a diffractogram: a plot of intensity against 2θ angle, with peaks at the angles where Bragg's law is satisfied.

Bragg's law: the equation that makes XRD possible

The Bragg model treats X-ray diffraction as reflection from parallel atomic planes. When two X-ray beams reflect off adjacent planes, the beam reflecting from the deeper plane travels a longer path. If that extra path length equals exactly one wavelength (or an integer multiple), the two reflected beams are in phase and produce constructive interference.

Bragg's law is: nλ = 2d sinθ

Where:

  • n = order of reflection (1, 2, 3…)
  • λ = wavelength of the X-rays (typically 1.5406 Å for Cu Kα)
  • d = spacing between atomic planes
  • θ = angle between the incident beam and the atomic plane

A worked example: suppose you are using Cu Kα X-rays (λ = 1.5406 Å) and you observe a first-order (n = 1) diffraction peak at θ = 14.2°. The interplanar spacing is:

d = λ / (2 sinθ) = 1.5406 / (2 × sin 14.2°) = 1.5406 / (2 × 0.2453) = 3.14 Å

This tells you that the crystal has atomic planes spaced 3.14 Å apart — a value you can look up in the Powder Diffraction File (PDF) database to identify the material. The PDF contains over 400,000 reference patterns for known compounds.

Single-crystal vs powder XRD: what is the difference?

There are two main types of X-ray diffraction:

Single-crystal XRD is used when you want the full 3D atomic structure of a molecule — the exact positions of every atom. A single, high-quality crystal (typically 0.1–0.5 mm in size) is mounted and rotated in the X-ray beam. Thousands of diffraction spots are collected from all orientations, and the data is used to reconstruct the electron density map. This is the method used for protein crystallography and for determining the structure of new chemical compounds.

Powder XRD is used when you have a polycrystalline or powdered sample. The random orientation of crystallites in the powder means that all possible atomic planes contribute simultaneously to the diffraction pattern. The result is a plot of intensity vs 2θ angle with characteristic peaks. XRD powder diffraction is the workhorse of materials analysis — used for phase identification, purity checks, and crystallite size measurements. The Powder Diffraction File (PDF) maintained by the International Centre for Diffraction Data (ICDD) contains searchable reference patterns for thousands of materials.

How protein crystallography reveals the molecules of life

Protein crystallography is one of the most important applications of XRD. Determining the 3D structure of a protein at atomic resolution helps scientists understand how it works, how it interacts with drugs, and how mutations cause disease.

The process has several steps:

  1. Crystallisation. The protein must be coaxed into forming a regular crystal. This is often the hardest step — protein crystals are fragile, contain large amounts of solvent, and take days or weeks to grow.

  2. Data collection. The crystal is mounted in a cryo-stream (liquid nitrogen, −173°C) to reduce radiation damage, and placed in the X-ray beam at a synchrotron. Modern synchrotrons like MAX IV in Sweden can collect a full dataset in under a minute.

  3. Phase determination. The detector records the intensity of each diffracted spot, but not its phase. This is the phase problem in XRD. Methods to solve it include molecular replacement, anomalous diffraction, and heavy-atom soaking.

  4. Electron density calculation. Using the measured intensities and the recovered phases, a Fourier summation produces an electron density map — a 3D contour map showing where electrons are concentrated.

  5. Model building and refinement. The amino acid sequence is fitted into the electron density map, and the model is refined to match the experimental data as closely as possible. The quality is measured by the R-factor (typically 14–25% for protein structures).

The result is a coordinate file deposited in the Protein Data Bank (PDB), which now holds over 200,000 structures — from the first myoglobin structure solved in 1958 to the SARS-CoV-2 spike protein.

Rosalind Franklin and the structure of DNA

One of the most famous examples of Rosalind Franklin x ray diffraction is Photo 51 — an X-ray diffraction pattern of DNA fibres taken in 1952 at King's College London. The pattern showed a clear X-shaped cross, which was the signature of a helical structure. James Watson and Francis Crick used this evidence — along with data from Maurice Wilkins — to build the first accurate model of the double helix in 1953.

Franklin's work is a textbook example of how XRD provides structural information. The spacing of the spots in Photo 51 gave the repeat distance of the helix (3.4 nm) and the diameter of the molecule (2 nm). Without XRD, the structure of DNA might have remained a mystery for years longer.

Common misconception: XRD machines photograph atoms

XRD does not "photograph" atoms. It measures scattering angles and intensities, and the atomic positions are calculated from these measurements using mathematical techniques. The electron density map is not an image — it is a reconstruction from thousands of individual diffraction measurements. This is a different idea from visible-light microscopy, where lenses focus light directly to form an image. No X-ray lenses exist that can focus at atomic resolution, so the structure must be reconstructed computationally.

5 applications of X-ray diffraction

1. Pharmaceuticals. XRD identifies different crystalline forms (polymorphs) of a drug, which can have different solubility, stability, and bioavailability. Regulatory agencies require polymorph characterisation for new drug applications.

2. Materials science. XRD determines crystal structure, grain size, strain, and texture in metals, ceramics, and semiconductors. It is used for quality control in manufacturing and for failure analysis.

3. Geology and mining. XRD identifies minerals in rock samples, quantifies clay content, and determines the composition of ore deposits. Portable XRD instruments are now used for field analysis.

4. Forensic science. XRD analyses trace evidence like paint chips, gunshot residue, and soil samples. The unique diffraction pattern of each material can link a suspect to a crime scene.

5. Thin-film analysis. In semiconductor manufacturing, XRD measures the thickness, composition, and strain of thin films — critical for ensuring that transistors and memory devices work correctly.

For more on the basic principles of diffraction, see what is diffraction and diffraction of a wave. To understand how diffraction applies to different wave types, our guide on examples of diffraction covers everyday cases including X-ray crystallography.

External resources

Frequently Asked Questions

What is X-ray diffraction (XRD)?

X-ray diffraction (XRD) is an analytical technique that determines the atomic or molecular structure of a crystal. A beam of X-rays is directed at a crystal. The X-rays scatter off the electrons of the atoms in the crystal. Because the atoms are arranged in a regular repeating lattice, the scattered X-rays interfere constructively at specific angles, producing a pattern of spots or peaks. Analysing these patterns reveals the 3D arrangement of atoms in the material.

How does XRD work?

XRD works by directing monochromatic X-rays at a crystalline sample. The X-rays scatter off the atomic planes inside the crystal. When the scattered X-rays from different planes are in phase, they interfere constructively and produce a detectable signal. The condition for constructive interference is given by Bragg's law: nλ = 2d sinθ, where n is an integer, λ is the X-ray wavelength, d is the spacing between atomic planes, and θ is the angle of incidence. By measuring the angles at which diffraction occurs, the interplanar spacings and crystal structure can be determined.

What is the difference between XRD and XRF?

XRD (X-ray diffraction) determines crystal structure by measuring how X-rays diffract off atomic planes. XRF (X-ray fluorescence) determines elemental composition by measuring the characteristic fluorescent X-rays emitted when a sample is excited by high-energy X-rays. XRD tells you what phases or compounds are present and their crystal structure; XRF tells you what elements are in the sample and their concentrations.

What are the applications of XRD?

XRD is used in materials science to identify crystalline phases and measure crystallite size. In chemistry and pharmaceuticals, it confirms the polymorphic form of drugs. In structural biology, protein crystallography determines the 3D structure of proteins and macromolecules. In geology, XRD identifies minerals in rocks. In forensic science, it analyses trace evidence. In manufacturing, XRD monitors thin-film thickness and coating quality.

What is the Bragg equation for X-ray diffraction?

The Bragg equation for X-ray diffraction is nλ = 2d sinθ. In this equation, n is the order of reflection (a positive integer), λ is the wavelength of the incident X-rays, d is the distance between atomic planes in the crystal, and θ is the angle between the incident X-ray beam and the atomic plane. When this equation is satisfied, constructive interference occurs and a diffraction peak is observed.

Can XRD be used for proteins?

Yes. Protein crystallography uses XRD to determine the 3D structure of proteins at atomic resolution. The protein must first be crystallised, then placed in an X-ray beam — typically at a synchrotron. The diffraction pattern reveals the positions of thousands of atoms. This technique has determined over 100,000 protein structures deposited in the Protein Data Bank, including the structure of DNA and countless drug targets.

What is the phase problem in XRD?

X-ray detectors only measure the intensity (amplitude) of diffracted beams, not their phase. But reconstructing the electron density map requires both amplitude and phase information. This missing phase information is called the phase problem. It is solved using methods such as molecular replacement (using a known related structure), multiple isomorphous replacement (soaking crystals with heavy atoms), or anomalous diffraction (using the tunable wavelength at synchrotrons).

Physics Optics

About Physics Optics

Contributor · Physics & Optics

Physics Optics writes in-depth guides on the physics of light and optics — from reflection, refraction, and lenses to diffraction, lasers, and fiber optics, explained from first principles.

Read more about Physics Optics