International
Tables for
Crystallography
Volume B
Reciprocal space
Edited by U. Shmueli

International Tables for Crystallography (2006). Vol. B, ch. 3.2, pp. 353-359   | 1 | 2 |
https://doi.org/10.1107/97809553602060000560

## Chapter 3.2. The least-squares plane

R. E. Marsha* and V. Schomakerb

aThe Beckman Institute–139–74, California Institute of Technology, 1201 East California Blvd, Pasadena, California 91125, USA, and  bDepartment of Chemistry, University of Washington, Seattle, Washington 98195, USA
Correspondence e-mail:  rem@xray.caltech.edu

The calculation of least-squares planes based on uncorrelated, isotropic weights and of proper least-squares planes with Gaussian weights is described.

### 3.2.1. Introduction

| top | pdf |

By way of introduction, we remark that in earlier days of crystal structure analysis, before the advent of high-speed computers and routine three-dimensional analyses, molecular planarity was often assumed so that atom coordinates along the direction of projection could be estimated from two-dimensional data [see, e.g., Robertson (1948)]. Today, the usual aim in deriving the coefficients of a plane is to investigate the degree of planarity of a group of atoms as found in a full, three-dimensional structure determination. We further note that, for such purposes, a crystallographer will often be served just as well by establishing the plane in an almost arbitrary fashion as by resorting to the most elaborate, nit-picking and pretentious least-squares treatment. The approximate plane and the associated perpendicular distances of the atoms from it will be all he needs as scaffolding for his geometrical and structural imagination; reasonable common sense will take the place of explicit attention to error estimates.

Nevertheless, we think it appropriate to lay out in some detail the derivation of the best' plane, in a least-squares sense, through a group of atoms and of the standard uncertainties associated with this plane. We see two cases: (1) The weights of the atoms in question are considered to be isotropic and uncorrelated (i.e. the weight matrix for the positions of all the atoms is diagonal, when written in terms of Cartesian axes, and for each atom the three diagonal elements are equal). In such cases the weights may have little or nothing to do with estimates of random error in the atom positions (they may have been assigned merely for convenience or convention), and, therefore, no one should feel that the treatment is proper in respect to the theory of errors. Nevertheless, it may be desired to incorporate the error estimates (variances) of the atom positions into the results of such calculations, whereupon these variances (which may be anisotropic, with correlation between atoms) need to be propagated. In this case the distinction between weights (or their inverses) and variances must be kept very clear. (2) The weights are anisotropic and are presumably derived from a variance–covariance matrix, which may include correlation terms between different atoms; the objective is to achieve a truly proper Gaussian least-squares result.

### 3.2.2. Least-squares plane based on uncorrelated, isotropic weights

| top | pdf |

This is surely the most common situation; it is not often that one will wish to take the trouble, or be presumptive enough, to assign anisotropic or correlated weights to the various atoms. And one will sometimes, perhaps even often, not be genuinely interested in the hypothesis that the atoms actually are rigorously coplanar; for instance, one might be interested in examining the best plane through such a patently non-planar molecule as cyclohexane. Moreover, the calculation is simple enough, given the availability of computers and programs, as to be a practical realization of the off-the-cuff treatment suggested in our opening paragraph. The problem of deriving the plane's coefficients is intrinsically nonlinear in the way first discussed by Schomaker et al. (1959; SWMB). Any formulation other than as an eigenvalue–eigenvector problem (SWMB), as far as we can tell, will sometimes go astray. As to the propagation of errors, numerous treatments have been given, but none that we have seen is altogether satisfactory.

We refer all vectors and matrices to Cartesian axes, because that is the most convenient in calculation. However, a more elegant formulation can be written in terms of general axes [e.g., as in Shmueli (1981)].

The notation is troublesome. Indices are needed for atom number and Cartesian direction, and the exponent 2 is needed as well, which is difficult if there are superscript indices. The best way seems to be to write all the indices as subscripts and distinguish among them by context – i, j, 1, 2, 3 for directions; k, l, p (and sometimes K, …) for atoms. In any case, atom first then direction if there are two subscripts; direction, if only one index for a vector component, but atom (in this section at least) if for a weight or a vector. And , e.g., for the standard uncertainty of the distance of atom 1 from a plane. For simplicity in practice, we use Cartesian coordinates throughout.

The first task is to find the plane, which we write as where r is here the vector from the origin to any point on the plane (but usually represents the measured position of an atom), m is a unit vector parallel to the normal from the origin to the plane, d is the length of the normal, and and are the column representations of m and r. The least-squares condition is to find the stationary values of subject to , with , , the vector from the origin to atom k and with weights, , isotropic and without interatomic correlations for the n atoms of the plane. We also write S as , the subscript for atom number being implicit in the Gaussian summations over all atoms, as it is also in the angle-bracket notation for the weighted average over all atoms, for example in  – the weighted centroid of the groups of atoms – just below.

First solve for d, the origin-to-plane distance. Then Here is the vector from the centroid to atom k. Then solve for m. This is the eigenvalue problem – to diagonalize (bear in mind that is just ) by rotating the coordinate axes, i.e., to find the arrays and , diagonal, to satisfy and are symmetric; the columns of are the direction cosines of, and the diagonal elements of are the sums of weighted squares of residuals from, the best, worst and intermediate planes, as discussed by SWMB.

#### 3.2.2.1. Error propagation

| top | pdf |

Waser et al. (1973; WMC) carefully discussed how the random errors of measurement of the atom positions propagate into the derived quantities in the foregoing determination of a least-squares plane. This section presents an extension of their discussion. To begin, however, we first show how standard first-order perturbation theory conveniently describes the propagation of error into and when the positions of the atoms are incremented by the amounts and the corresponding quantities (the vectors from the centroid to the atoms) by the amounts . (The need to account for the variation in position of the centroid, i.e. to distinguish between and , was overlooked by WMC.) The consequent increments in and are Here the columns of are expressed as linear combinations of the columns of . Note also that both perturbations, and , which are the adjustments to the orientations and associated eigenvalues of the principal planes, will depend on the reduced coordinates and the perturbing influences by way of , which in turn depends only on the reduced coordinates and the reduced shifts . In contrast, the change in the origin-to-plane distance for the plane defined by the column vectors m of , depends on the and directly as well as on the and by way of the

The first-order results arising from the standard conditions, diagonal, and , are and Stated in terms of the matrix components and , the first condition is , hence , and the second is . With these results the third condition then reads All this is analogous to the usual first-order perturbation theory, as, for example, in elementary quantum mechanics.

Now rotate to the coordinates defined by WMC, with axes parallel to the original eigenvectors , restrict attention to the best plane , and define as , keeping in mind ; itself, the original plane-to-centroid distance, of course vanishes. One then finds and also These results have simple interpretations. The changes in direction of the plane normal (the ) are rotations, described by and , in response to changes in moments acting against effective torsion force constants. For , for example, the contribution of atom k to the total relevant moment, about direction 1, is ( the force' and the lever arm), and its nominally first-order change has two parts, from the change in force and from the change in lever arm; the resisting torsion constant is , which, reflection will show, is qualitatively reasonable if not quantitatively obvious. The perpendicular displacement of the plane from the original centroid is , but there are two further contributions to , the change in distance from origin to plane along the plane normal, that arise from the two components of out-of-plane rotation of the plane about its centroid. Note that is not given by , which vanishes identically.

There is a further, somewhat delicate point: If the group of atoms is indeed essentially coplanar, the are of the same order of magnitude as the , unlike the , , which are in general about as big as the lateral extent of the group. It is then appropriate to drop all terms in or , and, in the denominators, the terms in .

The covariances of the derived quantities (by covariances we mean here both variances and covariances) can now be written out rather compactly by extending the implicit designation of atom numbers to double sums, the first of each of two similar factors referring to the first atom index and the second to the second, e.g., . Note that the various covariances, i.e. the averages over the presumed population of random errors of replicated measurements, are indicated by overlines, angle brackets having been pre-empted for averages over sets of atoms.

Interatomic covariance (e.g., ) thus presents no formal difficulty, although actual computation may be tedious. Nonzero covariance for the 's may arise explicitly from interatomic covariance (e.g., ) of the errors in the atomic positions , and it will always arise implicitly because in includes all the and therefore has nonzero covariance with all of them and with itself, even if there is no interatomic covariance among the 's.

If both types of interatomic covariance (explicit and implicit) are negligible, the covariances simplify a great deal, the double summations reducing to single summations. [The formal expression for does not change, so it will not be repeated.]

When the variances are the same for as for (i.e. , all i, j) and the covariances all vanish , the simplify further. If the variances are also isotropic , all i, j), there is still further simplification to If allowance is made for the difference in definition between and , these expressions are equivalent to the ones (equations 7–9) given by WMC, who, however, do not appear to have been aware of the distinction between and and the possible consequences thereof.

If, finally, for each atom is taken equal to its , all j, there is still further simplification.

For the earlier, more general expressions for the components of it is still necessary to find and in terms of , with .

In the isotropic, no-correlation' case, for example, these reduce to and Here the difference between the correct covariance values and the values obtained on ignoring the variation in may be important if the number of defining atoms is small, say, 5 or 4 or, in the extreme, 3.

#### 3.2.2.2. The standard uncertainty of the distance from an atom to the plane

| top | pdf |

There are two cases, as has been pointed out, e.g., by Ito (1982).

 (1) The atom (atom K) was not included in the specification of the plane. In the isotropic, no-correlation' case the last three terms, i.e. the terms in , are all negligible or zero. In either case the value for and the appropriate values from the least-squares-plane calculation need to be inserted. (2) Atom K was included in the specification of the plane. The expression for remains the same, but the averages in it may be importantly different.

For example, consider a plane defined by only three atoms, one of overwhelmingly great w at (0, 0, 0), one at (1, 0, 0) and one at (0, 1, 0). The centroid is at (0, 0, 0) and we take , i.e. is the item of interest. Of course, it is obvious without calculation that the standard uncertainties vanish for the distances of the three atoms from the plane they alone define; the purpose here is only to show, in one case for one of the atoms, that the calculation gives the same result, partly, it will be seen, because the change in orientation of the plane is taken into account. If the only variation in the atom positions is described by , one has , and . The non-vanishing terms in the desired variance are then If, however, the problem concerns the same plane and a fourth atom at position , not included in the specification of the plane and uncertain only in respect to (which is arbitrary) with (the same mean-square variation in direction 3 as for atom 2) and , the calculation for runs the same as before, except for the third term:

Extreme examples of this kind show clearly enough that variation in the direction of the plane normal or in the normal component of the centroid position will sometimes be important, the remarks to the contrary by Shmueli (1981) and, for the centroid, the omission by WMC notwithstanding. If only a few atoms are used to define the plane (e.g., three or, as is often the case, a very few more), both the covariance with the centroid position and uncertainty in the direction of the normal are likely to be important. The uncertainty in the normal may still be important, even if a goodly number of atoms are used to define the plane, whenever the test atom lies near or beyond the edge of the lateral domain defined by the other atoms.

### 3.2.3. The proper least-squares plane, with Gaussian weights

| top | pdf |

If it is desired to weight the points to be fitted by a plane in the sense of Gaussian least squares, then two items different from what we have seen in the crystallographic literature have to be brought into view: (1) the weights may be anisotropic and include interatomic correlations, because the error matrix of the atom coordinates may in general be anisotropic and include interatomic correlations; and (2) it has to be considered that the atoms truly lie on a plane and that their observed positions are to be adjusted to lie precisely on that plane, whatever its precise position may turn out to be and no matter what the direction, in response to the anisotropic weighting, of their approach to the plane.

An important consequence of (1), the non-diagonal character of the weight matrix, even with Cartesian coordinates, is that the problem is no longer an ordinary eigenvalue problem as treated by SWMB (1959),1 not even if there is no interatomic correlation and the anisotropy is the same for each atom. On this last case the contrary remark in SWMB at the beginning of the footnote, p. 601, is incorrect, and the treatments in terms of the eigenvector–eigenvalue problem by Hamilton (1961, 1964, pp. 174–177) and Ito (1981a)2 evade us. At best the problem is still not a genuine eigenvalue problem if the anisotropies of the atoms are not all alike.

Hypothesis (2), of perfect planarity, may be hard to swallow. It has to be tested, and for any set of atoms the conclusion may be that they probably do not lie on a plane. But if the hypothesis is provisionally adopted (and it has to be decided beforehand which of the following alternatives is to be followed), the adjusted positions are obtained by moving the atoms onto the plane

 (a) along paths normal to the plane, or (b) along the proper paths of least resistance' – that is, paths with, in general, both normal and lateral components differently directed for each atom so as to minimize the appropriately weighted quadratic form of differences between the observed and adjusted coordinates. The lateral motions (and the anisotropic weights that induce them) may change the relative weights of different atoms in accordance with the orientation of the plane; change the perpendicular distance of origin-to-plane; and change the orientation of the plane in ways that may at first give surprise.

Our first example of this has already been given.3 A second, which actually inspired our first, is to be found in Hamilton (1964; example 5-8-1, p. 177), who discusses a rectangle of four points with identical error ellipsoids elongated in the long direction of the rectangle. The unweighted best line bisects the pattern along this direction, but the weighted best line is parallel to the short direction, if the elongation of the ellipsoids is sufficient. A third example (it is severely specialized so that a precise result can be attained without calculation) has three atoms ABC arranged like a molecule with bond angle . The central atom, B, has overwhelming isotropic weight; A and C have parallel extremely elongated error ellipsoids, aligned parallel to the A—B bond. The unweighted best line passes through B parallel to ; the weighted best line passes through B and through C. Our last example is of a plane defined by a number of atoms of which one lies a considerable distance above the plane and at a distance from the normal through the centroid, but with the downward semi-axis of its extremely elongated prolate error ellipsoid intersecting that normal before it intersects the plane. If this atom is moved at right angles to the plane and further away from it, the centroid normal tips toward the atom, whereas it would tip away if the atom's weight function were isotropic or if the calculation were the usual one and in effect constrained the adjusted position of the atom to move at right angles to the plane.

The lead notion here – that the observed points are to be adjusted individually to fit a curve (surface) of required type exactly, rather than that the curve should simply be constructed to fit the observed points as well as possible in the sense of minimizing the weighted sum of squares of the distances along some preordained direction (perhaps normal to the plane, but perhaps as in ordinary curve fitting parallel to the y axis) – we first learned from the book by Deming (1943), Statistical Adjustment of Data, but it is to be found in Whittaker & Robinson (1929), Arley & Buch (1950), Hamilton (1964, our most used reference), and doubtless widely throughout the least-squares literature. It has recently been strongly emphasized by Lybanon (1984), who gives a number of modern references. It is the only prescription that properly satisfies the least-squares conditions, whereas (a) and other analogous prescriptions are only arbitrary regressions, in (a) a normal regression onto the plane.4

We have explored the problem of least-squares adjustment of observed positions subject to anisotropic weights with the help of three Fortran programs, one for the straight line and two for the plane. In the first plane program an approximate plane is derived, coordinates are rotated as in WMC (1973), and the parameters of the plane are adjusted and the atoms moved onto it, either normally or in full accord with the least-squares condition, but in either case subject to independent anisotropic weight matrices. The other plane program, described in Appendix 3.2.1, proceeds somewhat more directly, with the help of the method of Lagrange multipliers. However, neither program has been brought to a satisfactory state for the calculation of the variances and covariances of the derived quantities.

#### 3.2.3.1. Formulation and solution of the general Gaussian plane

| top | pdf |

We conclude with an outline for a complete feasible solution, including interatomic weight-matrix elements. Consider atoms at observed vector positions , , designated in the following equations by , an n-by-3 array, with ; the corresponding adjusted positions denoted by the array ; n constraints (each adjusted position for adjusted' – must be on the plane), and adjustable parameters ( components and the 3 components of the vector b of reciprocal intercepts of the plane), so that the problem has degrees of freedom. The 3n-by-3n weight matrix P may be anisotropic for the separate atoms, and may include interatomic elements; it is symmetric in the sense , but will not in general be equal to . The array denotes n Lagrange multipliers, one for each atom and unrelated to the 's of Section 3.2.2; m and d still represent the direction cosines of the plane normal and the perpendicular origin-to-plane distance.

For a linear least-squares problem we know (see, e.g., Hamilton, 1964, p. 143) that the proper weight matrix is the reciprocal of the atomic error matrix ;5 note that  M' is unrelated to the ' of Section 3.2.2. The least-squares sum is now and the augmented sum for applying the method of Lagrange multipliers is Here the summation brackets have been replaced by matrix products, but the simplified notation is not matrix notation. It has to be regarded as only a useful mnemonic in which all the indices and their clutter have been suppressed in view of their inconveniently large number for some of the arrays. If the dimensions of each are kept in mind, it is easy to recall the indices, and if the indices are resupplied at any point, it is not difficult to discover what is really meant by any of the expressions or whether evaluations have to be executed in a particular order.

The conditions to be satisfied are That the partial derivatives of should be represented by depends upon the above-mentioned symmetry of P. Note that each of the n unit elements of 1 expresses the condition that its should indeed lie on the plane, and that is just the same as . The perpendicular origin-to-plane distance and the direction cosines of the plane normal are and .

On multiplication by M the first condition solves for , and that expression combined separately with the second condition and with the third gives highly nonlinear equations (there is further mention of this nonlinearity in Appendix 3.2.1) that have to be solved for and :

The best way of handling these equations, at least if it is desired to find their solutions both for , , and and for the error matrix of these derived quantities in terms of the error matrix for , seems to be to find an approximate solution by one means or another, to make sure that it is the desired solution, if (as may be) there is ambiguity, and to shift the origin to a point far enough from the plane and close enough to the centroid normal to avoid the difficulties discussed by SWMB. Then linearize the first and second equations by differentiation and solve the results first iteratively to fit the current residuals and and then for nominally infinitesimal increments and . In effect, one deals with equations , where is the matrix of coefficients of the following set of equations, is the -dimensional vector of increments and , and is the vector either of the first terms or of the second terms on the right-hand side of the equations.

When becomes the vector of errors in and as induced by errors in the measured atom positions, these equations become, in proper matrix notation, , with solution , where is the -dimensional vector of components, first of then of . The covariance matrix , from which all the covariances of , , and (including for the latter any atoms that were not included for the plane) can be derived, is then given by This is not as simple as the familiar expression for propagation of errors for a least-squares problem solved without the use of Lagrange multipliers, i.e. , where is the matrix of the usual normal equations, both because is no longer valid and because the middle factor is no longer equal to .

It is easy to verify that consists of a set of coefficients for combining the n row vectors of M , in the expression for , into corrections to such that each adjusted position lies exactly on the plane: At the same time one can see how the lateral shifts occur in response to the anisotropy of M, especially if, now, only the anisotropic case without interatomic correlations is considered. For atom k write in terms of its components along the principal axes of , associated with the eigenvalues and ; the shifts are then proportional to and , each along its principal axis, and the sums of the contributions of these shift components to the total displacement along the plane normal or along either of two orthogonal directions in the plane can readily be visualized. In effect is the compliance matrix for these shifts of atom k. Similarly, it can be seen that in the isotropic case with interatomic correlations a pair of equally weighted atoms located, for example, at some distance apart and at about the same distance from the plane, will have different shifts (and different influences on d and ) depending on whether the covariance between the errors in the perpendicular components of their observed positions relative to the plane is small, or, if large, whether it is positive or is negative. If the covariance is large and positive, the adjusted positions will both be pulled toward the plane, strongly resisting, however, the apparent necessity that both reach the plane by moving by different amounts; in consequence, there will be a strong tendency for the plane to tilt toward the more distant atom, and possibly even away from the nearer one. But if the covariance is large and negative, the situation is reversed: the more distant atom can readily move more than the nearer one, while it is very difficult to move them together; the upshot is then that the plane will move to meet the original midpoint of the two atoms while they tilt about that midpoint to accommodate the plane.

It is attractive to solve our problem with the normal' formulation of the plane, , and so directly avoid the problems that arise for . The solution in terms of the reciprocal intercepts b has been given first, however, because reducing by two (d and a Lagrange multiplier) the number of parameters to be solved for may more than make up for the nuisance of having to move the origin. The solution in terms of d follows.

The augmented variation function is now the term in the new Lagrange multiplier, , and the term in having been added to the previous expression. The 1, an n-vector of 1's, is needed to express the presence of n terms in the sum. There are then five equations to be satisfied – actually ordinary equations – in the components, the n 's, the 3 components, , and unknowns in all, as required. These equations are as follows: As before, multiply the third equation by M and solve for . Then substitute the result into the first and fourth equations to obtain as the mostly nonlinear equations to be solved for , , d and by linearizing (differentiation), solving for increments, and iterating, in the pattern described more fully above. An approximate solution for and d has first to be obtained somehow, perhaps by the method of SWMB (with isotropic uncorrelated weights), checked for suitability, and extended to a full complement of first approximations by which readily follow from the previous equations. As in the intercepts' solution the linearized expression for the increments in and can be used together with the equation for to obtain all the covariances needed in the treatment described in Section 3.2.2.

#### 3.2.3.2. Concluding remarks

| top | pdf |

Proper tests of statistical significance of this or that aspect of a least-squares plane can be made if the plane has been based on a proper weight matrix as discussed in Section 3.2.3; if it can be agreed that the random errors of observation are normally distributed; and if an agreeable test (null) hypothesis can be formulated. For example, one may ask for the probability that a degree of fit of the observed positions to the least-squares plane at least as poor as the fit that was found might occur if the atoms in truth lie precisely on a plane. The test answers this question: a table of probabilities displayed as a function of and provides the answer. Here is just our minimized and is the number of degrees of freedom for the problem of the plane (erroneously cited in at least one widely used crystallographic system of programs as ). There will not usually be any reason to believe that the atoms are exactly coplanar in any case; nevertheless, this test may well give a satisfying indication of whether or not the atoms are, in the investigator's judgment, essentially coplanar. It must be emphasized that as calculated in Section 3.2.3 will include proper allowance for uncertainties in the d and orientation of the plane with greater reliability than the estimates of Section 3.2.2, which are based on nominally arbitrary weights. Both, however, will allow for the large variations in d and tilt that can arise in either case if n is small. Some of the earlier, less complete discussions of this problem have been mentioned in Section 3.2.2.

Among the problems not considered here are ones of fitting more than one plane to a set of observed positions, e.g. of two planes fitted to three sets of atoms associated, respectively, with the first plane, the second plane, and both planes, and of the angle between the two planes. For the atoms common to both planes there will be a fundamental point of difference between existing programs (in which, in effect, the positions of the atoms in common are inconsistently adjusted to one position on the first plane and, in general, a different position on the second) and what we would advocate as the proper procedure of requiring the adjusted positions of such atoms to lie on the line of intersection of the two planes. As to the dihedral angle there is a difficulty, noted by WMC (1973, p. 2705), that the usual formulation of in terms of the cosine of the dihedral angle reduces to 0/0 at . However, this variance is obviously well defined if the plane normals and their covariances are well defined. The essential difficulty lies with the ambiguity in the direction of the line of intersection of the planes in the limit of zero dihedral angle. For the torsion angle about a line defined by two atoms, there should be no such difficulty. It seems likely that for the two-plane problem proposed above, the issue that decides whether the dihedral angle will behave like the standard dihedral angle or, instead, like the torsion angle, will be found to be whether or not two or more atoms are common to both planes.

All that we have tried to bring out about the covariances of derived quantities involving the plane requires that the covariances of the experimental atom positions (reduced in our formulations to Cartesian coordinates) be included. However, such covariances of derived quantities are often not available in practice, and are usually left unused even if they are. The need to use the covariances, not just the variances, has been obvious from the beginning. It has been emphasized in another context by Schomaker & Marsh (1983) and much more strongly and generally by Waser (1973), whose pleading seems to have been generally ignored, by now, for about thirty years.

### Appendix A3.2.1

Consider n atoms at observed vector positions (expressed in Cartesians), n constraints (each adjusted position for adjusted' – must be on the plane) and adjustable parameters ( components and the 3 components of the vector of reciprocal intercepts of the plane), so that the problem has degrees of freedom. The weight matrices may be differently anisotropic for each atom, but there are no interatomic correlations. As before, square brackets, ', represent the Gaussian sum over all atoms, usually suppressing the atom indices. We also write , not the of Section 3.2.2, for the Lagrange multipliers (one for each atom); for the direction cosines of the plane normal; and d for the perpendicular origin-to-plane distance.

As before, is the reciprocal of the atomic error matrix: (correspondingly, but ' is no longer the ' of Section 3.2.2. The appropriate least-squares sum is and the augmented sum for applying the method of Lagrange multipliers is is to be minimized with respect to variations of the adjusted atom positions and plane reciprocal intercepts , leading to the equations subject to the plane conditions , each atom, with , . These equations are nonlinear.

A convenient solution runs as follows: first multiply the first equation by and solve for the adjusted atom positions in terms of the Lagrange multipliers and the reciprocal intercepts of the plane; then multiply that result by applying the plane conditions, and solve for the 's Next insert these values for the 's and 's into the second equation:

This last equation, , is to be solved for . It is highly nonlinear: . One can proceed to a first approximation by writing ; i.e., , in dyadic notation. , all atoms; in the multiplier of A linear equation in , this approximation usually works well.6 We have also used the iterative Frazer, Duncan & Collar eigenvalue solution as described by SWMB (1959), which works even when the plane passes exactly through the origin. To continue the solution of the nonlinear equations, by linearizing and iterating, write in the form solve for , reset to , etc., until the desired degree of convergence of toward zero has been attained. By is meant the partial derivative of the above expression for with respect to , as detailed in the next paragraph.

In the Fortran program DDLELSP (double precision Deming Lagrange, with error estimates, least-squares plane, written to explore this solution) the preceding equation is recast as with

The usual goodness of fit, GOF2 in DDLELSP, evaluates to This is only an approximation, because the residuals are not the differences between the observations and appropriate linear functions of the parameters, nor are their variances (the 's) independent of the parameters (or, in turn, the errors in the observations).

We ask also about the perpendicular distances, e, of atoms to plane and the mean-square deviation to be expected in e. Here and are the errors in and . Neglecting ' then leads to We have , but and perhaps still need to be evaluated.

### References

Arley, N. & Buch, K. R. (1950). Introduction to the theory of probability and statistics. New York: John Wiley. London: Chapman & Hall.
Clews, C. J. B. & Cochran, W. (1949). The structures of pyrimidines and purines. III. An X-ray investigation of hydrogen bonding in aminopyrimidines. Acta Cryst. 2, 46–57.
Deming, W. E. (1943). Statistical adjustment of data. New York: John Wiley. [First edition 1938.]
Hamilton, W. C. (1961). On the least-squares plane through a set of points. Acta Cryst. 14, 185–189.
Hamilton, W. C. (1964). Statistics in physical science. New York: Ronald Press.
Ito, T. (1981a). Least-squares refinement of the best-plane parameters. Acta Cryst. A37, 621–624.
Ito, T. (1981b). On the least-squares plane through a group of atoms. Sci. Pap. Inst. Phys. Chem. Res. Saitama, 75, 55–58.
Ito, T. (1982). On the estimated standard deviation of the atom-to-plane distance. Acta Cryst. A38, 869–870.
Kalantar, A. H. (1987). Slopes of straight lines when neither axis is error-free. J. Chem. Educ. 64, 28–29.
Lybanon, M. (1984). A better least-squares method when both variables have uncertainties. Am. J. Phys. 52, 22–26.
Robertson, J. M. (1948). Bond-length variations in aromatic systems. Acta Cryst. 1, 101–109.
Schomaker, V. & Marsh, R. E. (1983). On evaluating the standard deviation of Ueq. Acta Cryst. A39, 819–820.
Schomaker, V., Waser, J., Marsh, R. E. & Bergman, G. (1959). To fit a plane or a line to a set of points by least squares. Acta Cryst. 12, 600–604.
Shmueli, U. (1981). On the statistics of atomic deviations from the best' molecular plane. Acta Cryst. A37, 249–251.
Waser, J. (1973). Dyadics and variances and covariances of molecular parameters, including those of best planes. Acta Cryst. A29, 621–631.
Waser, J., Marsh, R. E. & Cordes, A. W. (1973). Variances and covariances for best-plane parameters including dihedral angles. Acta Cryst. B29, 2703–2708.
Whittaker, E. T. & Robinson, G. (1929). The calculus of observations. London: Blackie.