A chain of transformations does not close
Eight essays on this ladder transform a coordinate once. A datum is fitted to a region, its seven parameters are published, a mark moves a few hundred metres, and the argument is about what the parameters mean and what they leave behind. Nobody has yet applied two of them in a row.
Real work does it constantly. A survey observed on one national datum is wanted on another; a dataset arrives on a third; a pipeline converts through whatever it has parameters for. And there is an obvious way to do it, which appears in code, in specifications and in textbooks: add the parameters. Three translations add, three rotations add, the scale adds, and the result is a seven-parameter transformation that does both steps at once.
It is not the same transformation, and the difference is large enough to matter to the work these numbers exist for.
Why there is anything to get wrong
A seven-parameter transformation is an affine map of three-dimensional Cartesian space:
with t the three translations, s one plus the scale in parts per million, and M a rotation matrix built from three angles measured in arcseconds. Two affine maps compose into an affine map, exactly, with no approximation anywhere:
The composed translation is not t₁ + t₂. It is t₂ + s₂M₂t₁ — the second transformation’s scale and rotation acting on the first transformation’s translation before the two are added.
That term is not small, because a datum translation is not small. Britain’s OSGB36 sits 713 metres from the geocentre and Germany’s DHDN sits 734, because a datum is fitted to a region rather than to the planet. The second transformation’s scale of 6.7 parts per million acting on the first’s 713 metres is 4.8 millimetres, and its rotation of 2.46 arcseconds acting on the same translation is up to 8.5 more. The measured discrepancy in northern England is 7.4 millimetres, and it comes out of exactly those two terms.
Written as parameters, the two answers differ where it is easiest to miss. The composed transformation has translations of 1,044.5496, −51.4637 and 960.2634 metres; the summed one has 1,044.548, −51.457 and 960.260. The rotations and the scale agree to every digit anyone prints. It is only the translations that move, by one, seven and three millimetres.
The size of it, across a country
The near-constancy is worth reading carefully, because it decides what kind of mistake this is. An error that varied across the country would look like a distortion and could be absorbed into a datum’s own definition — that is what where a fit leaves residuals is about, and a pattern in a residual is a signal that the model is missing a term.
This one does not vary, so it cannot be absorbed and cannot be diagnosed from the residuals of a network. It is a systematic shift of the whole country by seven millimetres, in a fixed direction, introduced by the arithmetic rather than by the geodesy — a declaration that is not in the numbers, which is what a coordinate refers to applied to the transformation instead of to the point. The only way to see it is to compare against the composition, which is what a coordinate pipeline almost never does because both routes look like a transformation.
The order matters, and by a predictable amount
Composition is not commutative, which is a fact about matrices and is easy to say and easy to forget. Here it is 20 millimetres, and the term that dominates it is written out in the figure: (s₂ − 1)t₁ − (s₁ − 1)t₂, which is a part per million times seven hundred metres, twice. The predicted 19.5 against the measured 20.0 is the check that the explanation is the explanation and not a plausible story about a number.
The control matters as much as the measurement. Every transformation this site holds is published to WGS84, so any chain between two datums goes out to that hub and back, and the return leg is the exact inverse of a transformation the outbound leg already applied. Such a loop closes to 0.93 nanometres — which is the arithmetic’s floor and says that the machinery has no accumulating error of its own. The closure is a property of how the parameters are published, not a property of the transformations. A published direct transformation between two regional datums, fitted independently, would not close, and the residual would be the disagreement between two fits rather than a rounding error.
The rotation matrix is not a rotation
Every published seven-parameter set writes its rotation as the identity plus a small skew-symmetric matrix. For angles of a few arcseconds — a few millionths of a radian — that is an excellent approximation, and it is why the form survives.
It is also not orthogonal. I + skew(θ) sends a unit vector to one of length √(1 + θ²), so the “rotation” lengthens everything it touches by about θ²/2. For OSGB36’s 0.89 arcseconds that is 9.05 × 10⁻¹², which the closed form predicts at 9.32 × 10⁻¹² and which amounts to 0.058 millimetres on the Earth’s radius. For DHDN’s 2.46 arcseconds it is 0.45 millimetres.
Sub-millimetre effects are usually where an essay stops. This one is worth a sentence more for a reason that has nothing to do with its size: it is one-signed. A rounding error cancels over a chain and this does not — twenty transformations in a row accumulate twenty of them, all lengthening, never shrinking. It is the same shape of failure as the elevation term whose sign was wrong in a parcel’s area, caught here because two expressions of one quantity disagreed; a systematic error that never changes sign is worth more attention than a larger one that does.
What was computed, and how
The arithmetic is small and the checks are the substance.
Each published transformation is turned into its affine triple — a translation vector, a scale and a 3 × 3 matrix — by a function that does nothing but rearrange the seven numbers. Composition multiplies the matrices and transforms the first translation, which is nine multiplications. Applying either the composition or the two steps separately then gives two positions in geocentric Cartesian coordinates, and the quantity reported is the distance between them.
The first check is that the composition and the stepwise application agree exactly — the measured difference is zero to the last bit, because the two are the same arithmetic in a different order and any disagreement would be a transcription error. The second is that the seven-parameter description of the composition is close but not exact: 0.187 millimetres, which is the symmetric part that two linearised rotations produce when they are multiplied and which no skew matrix can hold. The third is the hub loop above.
The one thing this file does not do is invert a transformation by negating its parameters. That was already known here to be wrong by about a centimetre, because scaling and translating do not commute either; the inverse used throughout is the exact affine one, with the matrix inverted by cofactors rather than approximated.
The datum this needed
Two of the three datums on this site publish transformations with no rotations and no scale at all — ED50 and NAD27 are three-parameter shifts. With such a transformation second in the chain, adding the parameters is exactly right: s₂ = 1 and M₂ = I, so the composed translation really is the sum. The first version of this measurement used ED50 and reported a discrepancy of zero, which is a true answer to a question about the wrong pair.
So the German datum was added, and the note is here rather than in a commit message because the shape of the mistake is general. A measurement whose result is zero because the case was degenerate looks exactly like a measurement whose result is zero because the effect is absent. The distinguishing test is to construct a case where the effect must be present and check that the machinery finds it, which is what every assertion on this site is for.
Every chain on this site goes through one place
The hub is WGS84, and it is a convention rather than a discovery. Before satellite geodesy there was nothing for a national datum to be published against except its neighbours, and transformations were fitted pair by pair across borders: France to Belgium, Belgium to the Netherlands, and no guarantee whatever that going round a loop returned to the start. The loop residual was a real quantity and a nuisance, and it was the sum of three independent fits’ disagreements rather than of any arithmetic.
Publishing everything against one global frame replaces that with a star. Any chain is then out and back through the centre, the return leg is an exact inverse, and the only residual left is the one this essay is about. That is a considerable engineering gain and it hides its own origin: a modern pipeline can compose transformations all day and see nothing wrong, because the closure it is relying on was designed in rather than measured.
The size of what the star arrangement absorbed is visible in the figure. Three transformations, three regional fits, hundreds of metres apart at a single mark — and a loop between any two of them that closes to a nanometre.
The check a pipeline runs cannot see this
There is a standard integrity test for a coordinate pipeline and it is the loop: transform a mark out to another datum and back, and see whether it returns to where it started. It is cheap, it needs no reference data, it catches transposed parameters and sign errors and wrong conventions, and every serious library ships something like it.
It is provably incapable of detecting the error this essay is about, and the reason is the star arrangement rather than any weakness in the test. Every published transformation here goes to the hub, so a chain from datum A to datum B is A→WGS84 followed by WGS84→B, and the return trip is B→WGS84 followed by WGS84→A. The four steps are two transformations and their exact inverses, in an order that cancels term by term whichever way the composition was formed — and the measured closure of 0.93 nanometres is that cancellation, not a verdict on the arithmetic. A pipeline that adds parameters instead of composing them makes the same wrong transformation on the way out and on the way back, and its loop closes exactly as well as a correct one’s.
So the seven millimetres is invisible to the only check that is routinely available. Catching it requires comparing two routes that are not inverses of each other — the composed affine map against the summed parameters — and that comparison is not a test a pipeline can run on itself, because a pipeline that had both routes implemented would presumably be using the right one.
That is worth naming because it changes what kind of defect this is. An error a self-test can find is a bug: it shows up, somebody fixes it. An error that survives every self-test is a convention — it propagates, it gets copied into the next library, and the only thing that finds it is somebody deriving the composition on paper and checking. The one-signed rotation defect above has the same property for the same reason: it is present in the outbound leg and in the return leg, and a loop cancels it too.
An approximation composed with an approximation
There is a second way for a chain to go wrong and it is worth separating from the first. Everything above assumes each step is applied exactly. In practice a step may be Molodensky’s shortcut — a direct formula that avoids an iteration — or a grid of tabulated shifts interpolated between its nodes, and both are approximations with errors of their own.
Composing two approximations is not the same as approximating the composition. Each shortcut’s error is a function of where the point is, and after the first step the point is a few centimetres from where the exact transformation would have put it, so the second shortcut is evaluated at a slightly wrong position and returns a slightly different error than it would have alone. The effect is second order and it is not zero, which is the general shape of the thing: a chain of approximations has an error that the individual errors do not predict, and the only reliable route is to compose the exact transformations and approximate once at the end.
That is the same argument as the arithmetic one, at a different scale. Do the exact thing as long as possible; approximate last.
The practical form of that is short. A pipeline cannot verify this property; it can only be built to have it, by composing affine maps and never adding parameter records. The test belongs in the library’s own suite, against a case constructed to have the coupling term, rather than in the pipeline’s runtime checks where nothing it could measure would show.
Where the model stops
Three limits, each of which would change a number here.
The transformations are treated as exact. They are fits, and two parameter sets can describe one transformation while differing by hundreds of metres in their translations — so a chain built from two published sets inherits both fits’ own residuals, which are metres over a national network and dwarf every millimetre discussed here. What is being measured is the arithmetic of composing them, not the accuracy of the result.
The rotation convention is assumed. A published set may be in the position-vector convention or the coordinate-frame one, and the two differ by the sign of all three rotations; getting it wrong moves a mark by twice the rotation term, which for DHDN is metres rather than millimetres. Nothing in the seven numbers says which convention they are in.
And the epoch is assumed to be shared. Composing two transformations between datums realised at different dates ignores everything the epoch is part of the coordinate is about: the ground moves at tens of millimetres a year, so two transformations twenty years apart differ by far more than any term here.
The generalisation
The rule underneath is one line of algebra and applies wherever transformations are published as parameter lists: parameters describe a transformation, and transformations compose while parameters do not. Anything that acts on a coordinate by scaling, rotating and shifting has this property, and the term that breaks the addition is always the same one — the later transformation’s linear part acting on the earlier one’s offset.
The place it bites hardest is not geodesy but any pipeline that treats a transformation as a record with seven fields. Records add; maps compose. The distinction is invisible in the data structure and worth seven millimetres per link in the chain.
Who found it, and when
Helmert’s transformation dates from 1880 and the linearised form is as old as the practice of publishing datum shifts. The non-commutativity is not a discovery: it is a property of matrix multiplication that no geodesist has ever doubted.
What is worth recording is why the addition rule is nevertheless everywhere. It is exactly right for the three-parameter shifts that dominated published transformations until satellite geodesy, because a translation-only transformation has an identity for its linear part and therefore commutes with everything. The rule was correct for the transformations of its own era, and it survived into an era of seven-parameter sets where it is not.
Where the ladder goes next
This rung composes two transformations and finds the arithmetic of doing it. It says nothing about what a chain does to a distance rather than a point — a systematic scale of a few parts per million acting on a survey network is a different quantity, and it is measured on the ladder about what a survey actually does, where a published coordinate is a result and where the chain from an instrument reading to a grid coordinate is taken apart step by step.
Named alongside this one
Essays reaching for the same objects. Nobody chose these; they are what the concept index makes visible.
- A body with no sea level closed form · convention · geodetic datum · realisation
- A tolerance in map units is not a tolerance closed form · convention · realisation · scale factor
- One pair of numbers, a hundred and twenty places closed form · convention · realisation · scale factor
- Two grids over the same ground convention · helmert transformation · realisation · scale factor
- A coordinate without its system is not a location convention · helmert transformation · realisation
- A meridian boundary moves when its datum does convention · geodetic datum · helmert transformation
What links here
Every essay whose body links to this one.
The objects this essay names
Each one links to every other essay that touches it.
AffineClosed formCompositionConventionDatum transformationGeodetic datumHelmert transformationHub datumLinearisationRealisationRotation matrixScale factorSeven parameters