Consider the one-particle density matrices of the initial and final states of interest, and respectively. Assuming that each state is represented in a finite basis of spin-orbitals, such as the molecular orbital basis, and each state is at the same geometry. Subtracting these matrices yields the difference density
Now, the eigenvectors of the one-particle density matrix describing a single state are termed the natural orbitals, and provide the best orbital description that is possible for the state, in that a CI expansion using the natural orbitals as the single-particle basis is the most compact. The basis of the attachment/detachment analysis is to consider what could be termed natural orbitals of the electronic transition and their occupation numbers (associated eigenvalues). These are defined as the eigenvectors defined by
The sum of the occupation numbers of these orbitals is then
where is the net gain or loss of electrons in the transition. The net gain in an electronic transition which does not involve ionization or electron attachment will obviously be zero.
The detachment density
is defined as the sum of all natural orbitals of the difference density with negative occupation numbers, weighted by the absolute value of their occupations where is a diagonal matrix with elements
The detachment density corresponds to the electron density associated with single particle levels vacated in an electronic transition or hole density.
The attachment density
is defined as the sum of all natural orbitals of the difference density with positive occupation numbers where is a diagonal matrix with elements
The attachment density corresponds to the electron density associated with the single particle levels occupied in the transition or particle density. The difference between the attachment and detachment densities yields the original difference density matrix