On the morning of 16 October 1843, William Rowan Hamilton walked along the towpath of the Royal Canal in Dublin with his wife, on his way to a meeting of the Royal Irish Academy. He had been stuck on the same problem for more than ten years.
At Broom Bridge the answer arrived. He had no paper, so he took out a penknife and cut it into the stone of the bridge:
i² = j² = k² = ijk = −1
The carving has long since weathered away. A plaque went up in 1958 and mathematicians still walk out along the canal to read it.
The Problem He Could Not Drop
To see why this was worth ten years, start with what had already worked.
Complex numbers, written a + bi with i² = −1, had turned out to be much more than a trick for solving quadratics. Treated as points on a plane, they describe two dimensional geometry beautifully. Multiplying by a complex number of unit length rotates the plane. Adding one translates it. A single algebraic operation encodes a geometric transformation, and the algebra obeys all the ordinary rules.
Hamilton, who was Royal Astronomer of Ireland at Dunsink and had held the post since he was twenty two, wanted the same thing for the space we actually live in. If pairs of numbers handle the plane, triplets should handle three dimensional space, and then the whole apparatus of mechanics and optics could be written in a single clean notation.
He worked at it from the early 1830s. His son Archibald later recalled coming down to breakfast and being asked, “Well, papa, can you multiply triplets?”, and having to be told no.
Why the Answer Was No
Addition of triplets is easy. Multiplication is where it collapses.
Hamilton wanted a multiplication with the property that the length of a product equals the product of the lengths, so that multiplying two rotations gives a rotation, and he wanted to be able to divide, so that every non zero element has an inverse. With three components, no such system exists.
This is not a failure of ingenuity, it is a theorem. Frobenius and later Hurwitz proved that division algebras over the real numbers are possible only in dimensions one, two, four and eight: the reals, the complex numbers, the quaternions and the octonions. Three is not on the list and never will be.
Hamilton did not know that. He spent a decade trying to do something provably impossible, which is the sort of detail that makes the eventual breakthrough more interesting rather than less, because what he found was the nearest thing that does work.
What He Had to Give Up
The insight at Broom Bridge had two parts, and the second one was the expensive one.
Use four components, not three. One real part and three imaginary units, i, j and k. A quaternion is a + bi + cj + dk. The three dimensional vector sits in the i, j, k part, and the extra real component is what makes the arithmetic close up properly.
Abandon commutativity. In ordinary arithmetic the order of multiplication does not matter. In Hamilton’s system it does:
ij = k, but ji = −k
Multiply in the other order and you get the opposite sign. For a mathematician in 1843 this was close to heresy. Commutativity was not thought of as an assumption that could be relaxed, it was part of what multiplication meant.
He was willing to give it up because he noticed that space itself is not commutative. Rotate an object ninety degrees about the vertical axis and then ninety degrees about a horizontal one, and you do not arrive where you would if you did the two rotations the other way round. Try it with a book. The non commutativity in the algebra is not a defect, it is the geometry being faithfully represented.
That step is the real event of 16 October 1843, more than the equation. Once one consistent and useful algebra had broken a rule everybody thought was mandatory, the question changed permanently: instead of asking what numbers are, mathematicians could ask which sets of rules produce interesting structures. The whole of abstract algebra, the study of structures defined by their axioms rather than by what they count, runs downstream from permission granted at a bridge in Dublin.
Two months later Hamilton’s friend John Graves found the eight dimensional case, the octonions, which are not even associative. Cayley published them independently in 1845.
The Mistake He Made Afterwards
Hamilton spent the remaining twenty two years of his life on quaternions, and he oversold them.
He lectured on them, published Lectures on Quaternions in 1853, and left the enormous Elements of Quaternions unfinished at his death in 1865. He believed he had found the natural language of physics and that every mechanical and optical problem should be rewritten in it.
His followers, Peter Guthrie Tait above all, defended that position aggressively. The opposition came from Josiah Willard Gibbs in America and Oliver Heaviside in England, who observed that most physical calculations only needed pieces of the quaternion product. They split it in two, into what we now call the dot product and the cross product, and built modern vector analysis out of the parts.
Vector notation was easier to teach, easier to write, and sufficient for electromagnetism, which was the pressing problem of the 1880s. The argument that followed was conducted in the journals with real bitterness, and vectors won comprehensively. By 1900 quaternions were a historical curiosity, and generations of physics students learned Maxwell’s equations in a notation Hamilton would have considered a mutilation of his work.
Why Your Phone Uses Them Anyway
Quaternions came back in the 1980s, and they came back for exactly the reason Hamilton originally wanted them: they handle rotations in three dimensions better than anything else.
The usual alternative is three angles, one per axis, which is intuitive and has a fatal flaw. At certain orientations two of the axes line up, a degree of freedom vanishes, and the description breaks down. This is gimbal lock, and it is not merely a mathematical nuisance: the Apollo inertial platforms had physical gimbals with the same problem, and the flight software had to steer around forbidden attitudes.
A unit quaternion has no such singularity. It represents any rotation with four numbers, composes rotations by simple multiplication, needs fewer operations than a matrix, and can be interpolated smoothly, which is how animation software gets a limb to turn without wobbling.
So quaternions now run inside:
- Every 3D game engine and animation package, for object and camera orientation
- Spacecraft and satellite attitude control, where losing a degree of freedom is not an acceptable outcome
- Robotics and drone stabilisation, and the orientation sensors in phones and headsets
- Molecular modelling and crystallography, wherever many rotations must be composed without error accumulating
Hamilton wanted an algebra for the geometry of space. He got one, was told for a century that it was superseded, and it turned out to be the right tool for a machine he could not have imagined.
The Work He Did Not Consider His Best
There is one more turn to this.
Between 1834 and 1835, before the quaternions and in what was for him a short burst of work, Hamilton reformulated mechanics. He replaced forces and accelerations with a single function, now called the Hamiltonian, representing the total energy of a system expressed in terms of position and momentum, from which the equations of motion follow.
He considered it less important than quaternions. In fact it is the framework in which most of modern physics is written. When quantum mechanics was constructed in the 1920s, Schrödinger and Heisenberg built directly on the Hamiltonian formulation, because it was already in the right variables. Every quantum textbook opens with an H that stands for his name.
He carved the lesser achievement into a bridge. Descartes, who had joined algebra to geometry two centuries earlier, would have recognised the impulse exactly.