XRD (X-Ray Diffraction) is another analytical technique available to scientists. In this instance, however, it is not light that is interacting with the sample, but rather x-rays. XRD can only be used to analyze solid substances, and neither liquid nor gaseous samples, as the technique is based on the interaction between x-rays and the crystalline structure of the material. In order to test a sample, it must first be finely ground up. It is then placed in the machine which, in essence, fires x-ray beams at the sample from every possible angle and records the constructive interference created, under sufficient conditions (Bragg's Law), between the structure of the sample and the x-ray beams. 

Bragg's Law: 
nλ=2dsin θ

Bragg's Law explains the relationship between the wavelength of the rays, the diffraction angle, and the lattice spacing in the substance. The interference patterns are then detected by a DETECTION BOARD and processed to produce a graphical data set of the lattice structures. XRD is also more often than not a useful tool for sample identification due to the fact that minerals all possess unique d-spacings. Therefore, the collected XRD can be compared with known data to analyze the angle and intensity and determine a match.