A method of analysis in which an X-ray beam of known wavelength is directed at a crystal, and the beam is diffracted by reflections off planes of atoms in the crystal. By recording the angular positions of diffracted beams, the spacing between atomic planes can be determined according to the Bragg equation, nλ = 2d sinθ, where n is any integer, λ is the wavelength of the incident-beam X-ray, d is the spacing between crystal planes (d spacing), and θ is the angle between the crystal plane and the diffracted beam angle (the Bragg angle) (see bragg’s law). The procedure is repeated for various directions in the crystal and a model of its internal structure established. In geology, the technique is used to identify minerals.