A full description of the fundamentals of the direct methods approach may be found in , from which some of the derivations given here are taken.
The theory of direct methods approaches to the solution of crystallographic structure stems from two properties of the electron density distribution within the crystal structure. Firstly, the electron density is positive, and secondly it is composed of discrete atoms whose positions may be considered to be random in the unit cell.
The aim of direct methods is to obtain phase information given only the measured amplitudes of structure factors with indices . The method relies on being able to identify linear combinations of the phases of specific groups of reflections which are invariant or semi invariant with respect to the choice of origin in the crystal lattice. Structure semi-invariants are invariant only with respect to a number of permissible origins which display the same point symmetry whereas structure invariants are completely independent of the choice of origin.
Each reflection in a data set may contribute to many structure invariants. It is therefore possible to build up a network of these invariants which link the phases of all reflections. Thus by selecting one or more semi-invariant phases and fixing their values, one defines the origin to be at a point in the lattice which possesses some point symmetry. One is then able to use the network of structure invariants and semi-invariants to calculate the phases of other reflections in the data set and so obtain enough information to enable the calculation of an electron density map.
Sayre  in 1952 derived an expression for one such structure invariant. Using the properties of positivity and atomicity of the electron density along with the assumption that the structure consists of equal atoms he noticed that the electron density function and its square have similar forms.
We can now define corresponding atomic scattering factors ( and ) and structure factors ( and ) for normal and squared electron density functions of the equal atoms at positions in the unit cell such that
The convolution theorem states that the Fourier transform of the two functions multiplied together in real space is equivalent to convoluting the Fourier transforms of the two individual functions in reciprocal space. We can therefore write in terms of the convolution integral,
The structure factor is however a discrete function implying that we can sum over instead of integrating w.r.t. , giving
If we now divide Eq. by Eq. we obtain in terms of . Substituting for in Eq. gives the basic form of Sayre's equation,
Multiplying this equation through by gives finally
We observe that is real and positive implying that the resultant of the addition of all vectors on the right hand side is also real and positive. The usefulness of this equation now relies on the probabilistic argument that for large values of , and ,
i.e. the largest terms in the summation which contribute to the resultant `real' vector (which has zero phase) are also likely to have a phase close to zero. Eq. defines what is known as a triplet invariant.
An improvement in the atomicity condition is generally achieved by using so-called normalised structure factors which correspond to the scattering from a structure consisting of point atoms at rest, i.e. atoms with atomic scattering factors which are constant as a function of scattering angle. The normalised or sharpened structure factors are given by
where is a factor accounting for the effects of symmetry elements on specific groups of reflections. The 's are normalised such that . The use of 's also simplifies the form of the probability distribution for a triplet invariant which was derived by Cochran . For a structure containing N non-equal atoms the probability that a phase is correctly indicated is given by
where is a normalisation term, the magnitude is
The distribution has its maximum at and becomes narrower as increases. i.e. for larger values of , and
In general phase will be indicated by more than one triplet phase relationship. Thus the overall probability distribution is the product of the individual distributions . For triplet phase relationships giving an indication of the phase by the expressions
each having a probability distribution , the resultant probability distribution will be
where . will have its maximum when the exponent is at its maximum. By setting
Eq. may be rewritten as
It is immediately clear from Eq. that has its maximum when . Larger values of tend to sharpen the distribution, i.e lower the variance. Eq. is the Tangent formula first developed by Karle and Hauptman  and gives the most probable value, , of the phase as indicated by triplet phase invariants.