Analysis: William Rowan Hamilton's discovery of quaternions in Cabra played a revolutionary role in many of NASA's space missions

By Colm MulcahySpelman CollegeAnne van WeerdenUtrecht University and Michel DestradeNUI Galway

When Dublin mathematician William Rowan Hamilton conjured up the algebraic equations for his famous quaternions while walking along the Royal Canal on October 16th 1843, little did he know what he was unleashing on the world. Today, 176 years later, Hamilton is viewed as Ireland’s greatest mathematical scientist ever, and it’s important to note that he’s famous for many accomplishments in addition to quaternions.

He’s been feted three times on postage stamps in Ireland, and Broom Bridge in Cabra is now an international science heritage destination that attracts Fields Medalists and Nobel laureates alike, especially on the quaternion discovery anniversary, which occurs today.

Quaternions were a revolution in algebra, because they were the first system in which it made a difference whether one multiplied x by y or y by x. They were invented 15 years ahead of matrix multiplication, which shares this "non-commutative" property. Hamilton and his followers readily applied quaternions to mechanics and optics, fields which were hugely popular in Victorian times.  

Daniel Doyle's sand sculpture of William Rowan Hamilton (watched by his wife) scratching the formula for his quaternions onto Broom Bridge in Cabra

But the biggest legacy of quaternions is arguably their role in facilitating the speedy computing of actual geometric revolutions, especially in modern industries where turning and veering play a central role. Key application areas include flight, robotics and in computer graphics and video games. NASA, in particular, has been making extensive use of quaternions for space travel for decades.

Rotations are key to flight planning and tracking. While traditional matrix methods can be used to accomplish rotations, they generate huge problems of numerical stability and efficiency. If a spacecraft starts to spin, it is very difficult to return it to a stable position so various thrusters have to be fired with great precision. The Apollos carried a device to measure attitude, a three-gimbaled platform, which was prone to a technical glitch called "gimbal lock". This mechanical problem could make the spaceship computer lose its orientation in space. If two of the gimbals become aligned with each other, it’s impossible to determine the attitude, which could result in the astronauts literally getting lost in space. 

In fact, the gimbal lock problem and the danger of not being able to navigate safely back to Earth almost occurred during the 1969 Apollo 10 mission, but disaster was narrowly avoided thanks to the astronauts’ rapid reaction. Nowadays, extensive systems are used which do not suffer from gimbal lock anymore, and the rotation matrices of those early years have been replaced by quaternions, which turn out to be a smarter way to effect rotations, as well as using a lot less computer power. Almost-accidents like those of the Apollo era are unthinkable now, thanks to these powerful systems.

Vintage Science on the "gimbal lock" problem

While quaternions were suggested for flight simulations as early as 1958, NASA first used them in the Guidance, Navigation and Control systems for a manned mission with the 1981 launch of the Space Shuttle. By the time the Magellan mission to map Venus took off in 1989, quaternions had become the industry standard. Quaternions are now fundamental in modern versions of NASA’s navigation software for spacecraft attitude determination and control, and also for flight and flight simulations. These (and other) applications of quaternions were only explored in relatively recent decades, thus breathing new life into this esoteric Cabra creation and showing its enduring power of application, far beyond mathematics.

Chuck Acton is supervisor of the Navigation and Ancillary Information Group at NASA's Jet Propulsion Laboratory, and he has worked on planetary missions since 1968. "My group's use of quaternions probably began in the mid 1980s", he recalls. "I'm sure this must be long after other engineering activities used quaternions in support of space missions. But we are very happy to be using them, and will continue to do so as long as we remain funded by NASA!"

Belfast astronomer Carl Murray, at Queen Mary University of London, points out that "quaternions are incorporated in NASA’s NAIF SPICE software, written by Chuck Acton. We use SPICE all the time for our Cassini image work and it’s perhaps the best software ever to come out of JPL, and it’s free! Chuck deserves a medal for his work on it. Quaternions were previously used in JPL’s VICAR software which we used to process Voyager images. I have been using quaternions for decades to work on Voyager and Cassini images."

NASA footage of the 1989 Atlantis-Magellan mission

Hamilton was a polyglot who made a point of spending his career in Ireland when he could have plied his trade anywhere in the educated world of his day and he truly launched a revolution with his key discovery. Nobody could have guessed that quaternions would eventually (literally) make "out of this world" travel more manageable. There may be a moral there for those who think that potential for immediate application trumps basic research.

Here's a fun travel-around-Ireland challenge for all ages based on another of Hamilton's inventions, along with extensive information about the mathematician's associations with many key Irish locations.

Colm Mulcahy is Professor of Mathematics at Spelman College in Atlanta. He is the curator and creator of the Annals of Irish Mathematics and Mathematicians. Anne van Weerden is Information & Collection Specialist at the Utrecht University Library and the author of a website dedicated to the life of Sir William Rowan Hamilton. Michel Destrade is Chair of Applied Mathematics at NUI Galway. He is a former Irish Research Council awardee.


The views expressed here are those of the author and do not represent or reflect the views of RTÉ