X-ray diffraction: Is there an intuitive explanation of structure and form factors? We have just started x-ray diffraction and I am utterly lost. We were given two formulas: 
First formula:

The intensity of the x-rays scattered by
  $\mathbf{Q}=\mathbf{k}-\mathbf{k}'$ is given by the fourier transform
  of the electronic density, $\rho(\mathbf r)$
$$I(\mathbf Q)=\lvert \Psi(\mathbf{Q})\rvert \propto \left\lvert \int_V
 \rho(\mathbf r) e^{i \mathbf Q \mathbf r}\right\rvert^2$$

Second formula:

$$I(\mathbf Q) \propto \left\lvert \sum_{n=1}^N e^{-i \mathbf{Q}
 \mathbf{R}_n}\right\rvert^2 \cdot \Biggr\lvert \underbrace{\sum_{j=1}^D f_j
 (\mathbf Q)e^{-i \mathbf{Q} \mathbf{d}_j}}_{\text{ Structure
factor}}\Biggr\rvert^2$$

I have basically gone through the first ten pages of google but I still have no clue what these formulas represent mathematically or geometrically. Is there an intuitive explanation of these formulas? Why are they so important in X-ray diffraction? 
 A: $k$ is the incoming beam, $k'$ is the  reflected beam, expressed as wave vectors in the reciprocal lattice, which makes $Q=k-k'$ represents a particular plane in reciprocal space.  If you assume that the diffracting beam is essentially a plane wave when it elastically scatters off of multiple sites within the crystal, the kinematics of the Laue equation ensures that energy and momentum are conserved.
Your first equation is an expression of this, and it recognizes that the intensity of the beam at $Q$ is the Fourier transform of the diffracted beams from the corresponding Ewald sphere point, integrated over the volume of the crystal. The weighting function, $\rho$ is the atomic scattering factor for each lattice point.
If the crystal was made of a single element, such as gold, you might be done. However, many crystals share the same structure, but have different elements at the lattice points, such as NaCl; or they may be more complex, having an entire molecule at some or all of the lattice points of each cell.  This is what the second equation is for; it determines the structure factor for each point of the cell, based on the individual atomic or molecular scattering factors, $f_j$.
