The crystallographic metric matrix is the Gram matrix of the three unit cell basis vectors. If has Cartesian columns , then
Here are the angles between ; ; and , respectively. The matrix converts fractional crystallographic coordinate differences into physical lengths: a fractional displacement has squared length .[ref]
For an original oblique cell, choose , , angstroms, and . Then
For ,
Ignoring the off-diagonal entries would instead give , overestimating this distance. The cross terms encode the cell angles.
The reciprocal crystallographic metric matrix is when the reciprocal basis has dot products , with no factor of . Thus the plane spacing for a nonzero Miller index column satisfies
A basis change gives and fractional coordinates , preserving . Distances do not change when the same crystal structure is described in another basis.[ref]
The reciprocal crystallographic metric matrix is the Gram matrix of the reciprocal lattice basis. With direct-basis matrix and the convention , the reciprocal-basis matrix is . Consequently,
where is the direct crystallographic metric matrix. If direct lengths are in angstroms, the reciprocal metric entries have units of inverse squared angstroms.[ref]
For an original calculation, take
For a Miller index column , the corresponding reciprocal vector is . Its squared magnitude determines the interplanar spacing:
For this gives , so .
The same matrix also gives angles between plane normals. In this example,
The reciprocal angle is120degrees while the corresponding direct-cell angle is60degrees. In an oblique cell, reciprocal directions cannot be recovered by simply inverting the three edge lengths separately.
A convention using reciprocal vectors with dot products multiplies this reciprocal metric by . In that convention the spacing formula includes the matching factor in its numerator. Stating the convention prevents an otherwise systematic length error.