Here's an interesting problem: Find the atomic spacing in a crystal of rock salt (NaCl). The density of rock salt is 2.16 * 10^3 kg/m^3 and the average masses of the Na and Cl atoms are respectively 3.82 * 10^-26 kg and 5.89 * 10^-26 kg. Now I know that density (Rho) = mass/volume and 2d sin x = nλ, where n = 1,2,3, .... d is the distance between atomic molecules, λ is the wavelength, x = angle of incidence. How do I use this info to find out what d is? Is there another formula I'm missing?