-rays are partially scattered by atoms when they strike the surface of a crystal. The part of the X-ray that is not scattered passes through to the next layer of atoms, where again part of the X-ray is scattered and part passes through to the next layer. This causes an overall diffraction pattern, similar to how a grating diffracts a beam of light. In order for an X-ray to diffract the sample must be crystalline and the spacing between atom layers must be close to the radiation wavelength. If beams diffracted by two different layers are in phase, constructive interference occurs and the diffraction pattern shows a peak, however if they are out of phase, destructive interference occurs appear and there is no peak. Diffraction peaks only occur if