The description of electron density in solids by quantum theory and by x-ray diffraction experiments should closely coincide. A formalism for describing the electronic structure of single crystals in terms of a density matrix is presented. Iterative equations for calculating the density matrix in a basis of Bloch orbitals using measured crystallographic intensity data are derived. Numerical results are presented. The Bloch orbital formalism explicitly accounts for the mutual interaction of atoms in different unit cells, and is useful for insulators, semiconductors, and metals.