Sorry to spoil the party, but this is the old 19th century way of teaching quaternions (and also complex numbers). It is much easier to start with some https://en.wikipedia.org/wiki/Group_theory and then you understand that quaternions are simply matrices of a specific form: https://en.wikipedia.org/wiki/Quaternion#Matrix_representati... . Quaternion multiplication is simply matrix multiplication of these matrices. And that's it. No mysteries, this is just simple linear algebra (you do't even need complex numbers, the real representation is enough and makes the connection to 4d rotations manifest).
A lot of open problems in mathematics boil down to trying to analyse "matrices of a specific form" - I think while this viewpoint is important to recognise (essentially: quaternions are a finite-dimensional real associative algebra), it might not give as much intuition as other interpretations. It's kind of like how in computer science, many many hard problems can be restated as problems about some graph constructed from the input, but now you have two problems...
it shouldn't be an either or with geometry and algebra. both are valid and it helps to know both. representing H as a matrix is certainly valid and makes computations easier, but I dont really think that is building intuition
The modern approach is not lacking all geometry, and the 19th century presentation is not lacking all algebra. Any respectable treatment will include both, the question is which makes the relationship clearer? The abstract algebraic approach talks of 'the rotation group' which maps on to geometric concepts as cleanly and directly as possible. Then we talk of different parameterizations or representations of this group, with the unit quaternions being the 'double cover' of the rotation group (which gives rise to the primary difficulty in understanding them - that a rotation by 360 degrees reverses orientation, and 720 degrees returns us to where we started).
I think the modern approach is much clearer - the geometric ideas appear more directly, and the algebra is far less messy.
Stillwell[1] discusses quaternions in chapters 1 & 2, although the meat and potatoes of the book is more generally about lie groups and lie algebras. It's pitched at a lower level than most books on this topic by restricting attention to the classical matrix groups.
Possibly off-topic: why does practically any description of quaternions include the anecdote about somebody carving something into some bridge in Ireland?
I’ve learned about plenty of mathematical concepts while having no idea who discovered them or under what circumstances. Why are quaternions the exception?
My doctoral dissertation used quaternions to describe spacecraft attitudes. My advisor was a stickler for not only appropriately citing references, but citing the most original (in the sense of oldest) references. This was something of a problem because the original references to some of the mathematical techniques I used were several hundred years old and not in English, and under the theory that a big part of the purpose of a citation is to help the reader understand the backgroud material this seemed a bit excessive. Nobody is going to learn French in order to read about Lagrange multipliers from Lagrange's original papers.
But for quaternions, it was easy: I actually cited the Brougham Bridge inscription. One cannot, of course, check the bridge out of the engineering library to check the citation, but clearly this was the original “publication” of quaternion multiplication.
If someone learned French to read about Lagrange multipliers from Lagrange's original papers, then they would be sorely disappointed: it was actually Euler who first used the Lagrange method! (And by some curious coincidence, the L/lambda could just as easily be a homage to Leonhard as to Lagrange...)
It used to be common in hard sciences and mathematics for English-speaking doctoral candidates to be required to show some aptitude for German or Russian. Maybe still is, dunno.
I think the story is told as a sort of cultural marker of what a Big F-ing Deal this discovery was/is. Mathematics, collectively, struggled for a long time to find a way to make 3-dimensional numbers into an algebra in a way that extends the algebra of complex numbers. (The cross and dot products are unsatisfying, because they don't have division.) The shock that this can be done in four, -- not three -- dimensions is still sort of reverberating, and that's what I think this story marks. It's a short stand-in for the longer story I've just summarized, and it evokes (or is meant to evoke) the mind-shattering thrill of discovery.
I don't necessarily think the story accomplishes this -- your question is but one piece of evidence that it doesn't -- but I think for those who spend a good amount of time with these kinds of algebra questions, it comes to take on that role, and that's why I think it's repeated.
(Teaser -- if you want to know more about these kinds of questions, Google for "real division algebras". There are not very many, and they way they are organized is not, I think, something one would expect.)
Also, in Hamilton's time they didn't have the view of mathematics as axiom systems that could be played with. Math was a way of finding Truth, so the idea of making up multiplication rules at your convenience probably seemed like an extremely non-obvious move.
The discovery of complex numbers and quaternions probably played a big part in getting people to question what math is, leading to Hilbert's program to study Foundations etc. Hamilton's story is a nice, rare single instance we can point to, symbolizing this discovery.
> To find a way to make 3-dimensional numbers into an algebra in a way that extends the algebra of complex numbers
What does that mean? My understanding was that Hamilton was searching for a way to make the manipulation of points in space easier, such as rotation, and noticed that the imaginary part of the complex numbers could be manipulated in the way he wanted. He then created a rather artificial tool in the form of the quaternions that allowed this.
By "extends" here we formally mean "normed division algebra". Basically, we want any 2D slice of our space to be equivalent to the complex numbers. This is analogous to how the reals embed into the complex plane or how slices of vector spaces are still vector spaces. We don't want things to depend on a particular basis (i.e. implementation).
Anyway, it's pretty easy to make up some multiplication on 3D vectors, like multiplying their components. However, in general, it won't play nicely with such arbitrary 2D slices. As it turns out, this slicing property is equivalent to having multiplication play nicely with vector norms:
|ab| = |a| |b|.
that is, multiplication of vectors multiplies their lengths. Getting a multiplication with this property is the hard part, per se, and is only possible in dimensions 1, 2, 4, and 8.
It wasn’t when we learned it in high school, but it’s just that it’s a story that’s easy to tell. Just like the Königsberg reference for Eulerian graphs; Kekule and the Benzene ring; Lorenz, the weather, the butterfly, and deterministic chaos.
Thanks - out of all the replies to my comment, I think this is one of the most plausible hypotheses. I indeed think the Konigsberg and benzene stories are as commonly trotted out as the Hamilton one.
- quaternions maybe have a more interesting backstory than other constructs. Not everything was carved into stone.
- quaternions never really became part of mainstream mathematical education. This makes them more niche and strange, and worth telling a story about. It's not as interesting to tell a story about something commonplace.
People should read up on Galois theory and the story behind it. It involves a french youth, the french revolution, groundbreaking maths, and tangentially Poisson, Fourier and Cauchy, Gauss, Jacobi.
And why do descriptions of quaternions include a rigorous proof? I trust quaternions work, so skip the proof and show me how to use them in a practical, efficient way.
The fact that the quaternions “work” (are a finite-dimensional real vector space with an associative real-bilinear multiplication, and a division operation) is quite special. In fact there are only three objects satisfying this criteria: the real numbers themselves, the complex numbers, and the quaternions.
In mathematics often proofs lead to understanding why something works (on the other hand, many proofs aren’t written in a way that make the main ideas clear or easy to tease out from details)
There are millions of abstractions in mathematics, and the truth is that the human brain has a much better time remembering stories than it does math. You teach the stories so people have some context to associate complex ideas with.
The remarkable thing about quaternions is that you can describe rotation around any arbitrary axis! Try doing that with real rotation matrices and you will bump into a major problem:
Because matrix multiplication is not commutative, you can't easily compose a matrix representing rotation around an arbitrary axis from "component rotation matrices".
With quaternions/clifford algebras, you can say "here's the vector I want to rotate about and here's this is how much I want to rotate", and it just magically works.
Gimbal lock is no problem of rotation matrices but of euler angles. Just look up the wikipedia page you posted: "The problem of gimbal lock appears when one uses Euler angles in applied mathematics"
You can represent any (any!) rotation with rotation matrices.
Quaternions are neither commutative. Fortunately you don't need commutativity to build up arbitrary rotations.
Thanks, I realize now that the non-commutativity I was noticing is more a property of SO(3), which can be seen both in quaternion and matrix representations of rotations.
The non-commutativity of rotations can also be seen directly: rotating something 90 degrees about the x then the y axis is not the same as the y then the x.
> The remarkable thing about quaternions is that you can describe rotation around any arbitrary axis! Try doing that with real rotation matrices and you will bump into a major problem
I understand you can represent any rotation with matrices, but it's very awkward, and when you compose rotations, you quickly lose information about the resulting axis of rotation.
Okay let me rephrase: the axis of rotation becomes relatively obfuscated!
I guess it doesn't matter if you're doing everything on the computer, but it's pretty cool that with quarternions you can immediately see the composite rotation's axis and angle without any extra work!
I find that many articles explaining how to describe the orientation of a rigid body rotated along an axis by an angle in a confusing manner.
Normally in 3d space you will have to construct quaternions for rotations along yaw, pitch and roll, and then take their product to get the quaternion of the orientation of the rigid body.
That is, when using quaternions to describe orientations,we are actually describing the rotations done to bring the body from its default orientation to its present orientation.
> Normally in 3d space you will have to construct quaternions for rotations along yaw, pitch and roll, and then take their product to get the quaternion of the orientation of the rigid body
Is this not just using Euler angles via quaternions? If I understand correctly, tracking rotation via yaw, pitch, and roll will still run into issues of gimbal lock because it's the same parameterization just using quaternions.
Some control systems for air and space craft are designed with quaternions - here the problem being solved isn't a programming problem but a math problem involving the dynamics of the craft and/or orbital dynamics.
But quaternions are pretty good. They're a double cover but angles are an "infinity cover" of SO(2) and everyone understands angles. For animation purposes, being a single-cover is arguably a problem. An example in 2D is to suppose you have a rotation sequence
0° -> 90° -> 180° -> 270° -> X
and you want to return to the original state. Well, you can do that either by continuing to rotate in the same direction, corresponding to X=360° or by going back along the path you came corresponding to X=0°. These alternatives are unrepresentable in a single cover. (For angles you also have X=-360°, 720°, etc. corresponding to making any number of revolutions in either direction before coming to rest at the desired target, which if you think is weird makes quaternions an even better chart on SO(3) than angles are on SO(2)).
I agree quaternions are a good parameterization of SO(3). But they can still cause unexpected problems, e.g. any machine learning task involving quaternions will be made harder because the learned function must deal with the double covering.
Of course, the same problem exists for angles in SO(2), and from what I've seen people usually deal with that by using the [sin, cos] pair instead.
You can also use the for making pretty pictures of Quaternion Julia fractals. It uses non-unit quaternions, but typically intersects a plane with the 4D solid:
you can read about some simple rotating systems that, in some sense, end up reversed after a 360 degree rotation amd require another 360 to turn fully around. The article above has a nifty gif of this.
Formally, this kind of thing is studied using what are called spinors and gets used a lot in quantum mechanics and friends when talking about quantum spin. Behind the scenes these are described using things called spinors.
As it turns out, quaternions (and octonions) are capable of describing such things while simple rotations of any kind are insufficient. There are deep connections between spinors of different dimensions and the quaternions/octonions. For those interested, the term here is "Bott periodicity".
Since the quaternion norm is induced via the quaternion dot product, any transformation that preserves the norm automatically also preserves the dot product. This is a standard result for inner product spaces.
No, I was referring to the group of non-zero quaternions. There's a double-cover from the group U of unit quaternions to SO(3) though. If you care about SE(3), there's an obvious surjection U x R^3 -> SE(3) where the domain is "a translation following a rotation". This is a homomorphism of Lie groups.
I just don't get what you were going for with "use Lie groups instead". Everything here appears to already be a Lie group. How am I supposed to use that?
Dual quaternions offer a cheap projection operator by means of dual normalization (very much like quaternion normalization), which the Lie group perspective does not provide.
In fact this is probably the only reason to use dual quaternions at all.
Really both are the same thing up to group homomorphism (double covering in this case).
Dual quaternions only add a cheap way of blending several rigid transformations together, which is useful in computer graphics for skinning meshes around articulated rigid bodies.