X-ray crystallography exploits the physical phenomenon of x-ray diffraction to gain understanding of the structure of crystalline solids. For background information that will make this discussion more clear, see crystal and x-ray diffraction.
X-ray crystallography directly gives information about a crystal's reciprocal lattice. This is useful information in its own right. Furthermore, the crystal's real-space lattice is just the reciprocal of the reciprocal lattice, so x-ray crystallography can tell us the positions of the atoms in a crystal.
How x-ray crystallography works
The basic idea behind x-ray crystallography is that an x-ray incident on a crystal can cause other x-rays to be reradiated in other directions. The reradiation is caused by the oscillations of atoms that are driven by the incident x-ray. Because of the wave-nature of x-rays, if the atoms in a solid were arranged randomly then the x-rays reradiated by the atoms would all destructively interfere since their phases would be random. However, the periodic arrangement of atoms in a crystal allows constructive interference of reradiated x-rays under some special conditions. These conditions were derived in the writeup x-ray diffraction.
The Ewald Construction offers a geometrical way of visualizing the conditions under which reradiated x-rays will constructively interfere. Unfortunately, the Ewald Construction requires a circle to be drawn and my attempts at drawing circles with ASCII art have been unsuccessful. However, the construction is easy. The Ewald Construction follows immediately from the following criterion for constructive interference, derived in the x-ray diffraction node.
(k - k') = K, where k is the incident x-ray's wavevector, k' is the diffracted x-ray's wavevector, and K is some reciprocal lattice vector.
The Ewald Construction
Usually the circumference of the circle drawn in the Ewald Construction will not fall on any reciprocal lattice points. However, changing the wavelength of the incident x-ray alters the radius of the circle, and changing the direction of the wavevector alters the orientation of the circle. It is clearly possible to find incident wavevectors K that could strongly diffract from the crystal.
X-ray crystallography methods
The following are ways to use x-ray crystallography to determine the orientation and structure of crystals.
The Laue Method
The Laue Method is a convenient method for determining the orientation of a crystal with known structure. The idea is to introduce a non-monochromatic x-ray beam with fixed direction onto the crystal. Since the non-monochromatic x-ray contains several wavelengths, it corresponds to Ewald circles with continuous radii, ensuring that some radiation will be strongly diffracted! By observing the orientation and intensity distribution of the diffraction pattern on an x-ray sensitive film, the crystal's orientation can be found.
The Rotating-Crystal Method
In this method, monochromatic x-rays are introduced onto a rotating crystal, around which is an x-ray sensitive film. The crystal rotation corresponds to changing the orientation of an Ewald circle, while keeping the radius fixed (or you could think of the circle being kept fixed while the reciprocal latice is rotated). By using several crystalline orientations and several different wavelengths, the structure of the crystal can eventually be found.
The Powder Method
In this method, also known as the Debye-Scherrer Method, the crystal is broken into a powder or polycrystalline sample. While it might seem that this will make the material completely amorphous, the broken grains of the material will still have crystalline structure on a scale much larger than the wavelengths of the incident x-rays. Therefore diffraction patterns can still be observed. The huge advantage of this method is that it is simple--the crystal doesn't have to be rotated. The x-rays can be introduced at any incident direction. There is sure to be a polycrystalline grain that is oriented in a direction that will allow constructive interference. The diffraction pattern produced is just a superposition of all of those that could be found by the rotating crystal method.
Some more considerations
The analysis of a crystal with a single-atom basis is very simple. However, the individual atoms in a multi-atom basis don't have to reradiate x-rays constructively. In fact, the multi-atom bases of some crystals can cause expected intensity peaks to totally disappear! This is a good thing--it means x-ray crystallography provides information about not only the Bravais lattice of the crystal, but also the basis (see crystal). Furthermore, there are methods of characterizing what types of atoms are present in a polyatomic crystal such as GaAs or NaCl. In summary, x-ray crystallography offers a relatively simple and powerful way to determine the structure of crystalline solids.