Math Dopers... Quaternions? (a primer, please?)

Hrm. Well, thanks for dispelling some misconceptions.

I agree, though the significance of the Victorian use of quaternions is not really their (somewhat limited) influence on Maxwell. The idea that Hamilton wasted most of his career on the subject only to be ignored by his contemporaries and successors has a whiff of E.T. Bell about it. Now it’s certainly possible to argue that Hamilton’s devotion to his brainchild was a waste, but it was also a commitment that attracted many others and understandably so. It also tends to be forgotten just how prominent he was in his own lifetime, when he was regarded as one of the greatest mathematical physicists of the age.
From a 21st century perspective, we tend to think of quaternions as just one example of an abstract algebra. But that wasn’t Hamilton’s interest in them, nor was it the use that he and others tried to put them to. To somewhat simplify the context, physicist and mathematicians had had to think about Cartesian geometry in a messy coordinate form. Working in three dimensions, you had to write out different equations for each coordinate. However, there was the nice example in two dimensions of complex numbers, where you could combine both dimensions into a single entity. By manipulating these you could still understand the likes of rotations without having to break everything apart into components. Quaternions were Hamilton’s way of trying to do something similar in a higher dimensional space.
As such, they were reasonably widely adopted, at least in Britain, and a large literature on the subject and their applications in physics appeared through the rest of the century.
Maxwell’s attitude towards them is complicated, but well documented. The major proponent of quaternion methods after Hamilton’s death was P.G. Tait, who had been friends with Maxwell since their schooldays in Edinburgh and they argued out the merits and otherwise of the subject in their letters. Maxwell actually didn’t study them in detail until about 1870 and so all his major discoveries in electromagnetism were made and published without using quaternions at all. Having learnt the methods, he still disagreed with Tait about their usefulness in general. But he did like some of Hamilton’s innovations, like the del operator, and does incorporate these into the Treatise. Still, there’s far more coordinate stuff in there than quaternions and Maxwell’s own description of the book is that it’s “bilingual”, with some of his coordinate proofs being translated into quaternion form. He also continued to publically argue that the methods were cumbersome. (The third of the great Scottish Victorian mathematical physicists, Lord Kelvin, was never convinced by quaternions, despite collaborating extensively with Tait.)
After Maxwell’s death, Gibbs and Heaviside introduced vector analysis in, more or less, its modern guise. There was then a long, polemical debate about which were better. (With the additional complication that Grassmann’s alternatives were popular in Germany.) Gibbs and Heaviside win out.

In hindsight, the proponents of quaternions in the period were trying to use them to do things we’d now automatically use vector analysis for. They’d recognised the need for a new tool to simplify such calculations, but hadn’t yet hit on the better one. But quaternion methods could be - and were - used to do serious calculations.
My understanding of their use in engineering nowadays is that, just as no tool is perfect for every job, they still have their advantages in some niches. Or so I’m told.
A History of Vector Analysis: The Evolution of the Idea of a Vectorial System (1967; Dover, 1994) by Michael J. Crowe is a good history of how Hamilton and Grassmann led to Gibbs and Heaviside and the debates along the way.

I’m not sure what you mean by this, or why you think it’s relevant. Hamilton’s paper of 1843, On a new Species of Imaginary Quantities connected with a theory of Quaternions did a bit more than “invent the Nabla operator”.

I find this comment a bit hard to understand, too. The theories of electromagnetism and quantum mechanics developed in the late 19th/early 20th centuries describe what happens in, say, lasers, which didn’t exist at the time the theories gained prominence. That sort of thing happens all the time. It’s not remarkable at all, except by those who have no understanding of history.

I thought the weirdness of spatial rotation as it concerns fermions wasn’t really elucidated until the development of relativistic quantum field theory, which Dirac birthed in 1928, but took a while to “sink in”, as it were…

Link to Hamilton’s paper:

That link doesn’t seem to work. Try:

http://www.maths.tcd.ie/pub/HistMath/People/Hamilton/Quatern1/Quatern1.html

I think you misunderstand me. I’m not denigrating Hamilton’s contributions to physics and mathematics, which were extremely significant. (I mentioned the Nabla operator specifically only because the article you cited seemed to be a history of that operator.) But you seemed to be suggesting (and perhaps I misunderstood you) that the reason quaternions turned out to be useful in quantum mechanics (which is what Loopydude was commenting on) is because all of modern physics was built on vector calculus, which was in turn based on quaternions. But so far as I know vector calculus is completely expressible in terms of cartesian unit vectors instead of quaternions, and the article you cited suggests this was the norm even in Maxwell’s day. So if you’re saying this explains the fact that quaternions would be useful for describing things like spin, I’m not convinced.

I think that’s a flawed analogy. Lasers were developed based on the principals of electricity and magnetism, and couldn’t have been invented without a knowledge of those theories. So of course those theories are of great use in describing them. In contrast, the vector calculus needed to describe Maxwell’s electromagnetism was perfectly expressible without any reference to quaternions (and the article you cited says he expressed it in this way to make his work more accessible). So given that cartesian vectors were good enough to deal with physical problems up until the discovery of spin, this doesn’t explain why quaternions were far more useful than Cartesian vectors in describing spin. So much so that they would have certainly been invented at that point if they hadn’t been already.

To summarize my point: Vector calculus could have been invented without inventing quaternions. Electromagnetism could have been expressed without inventing quaternions. So far as I know, the first point where you would practically have had to invent quaternions in order to do physics is with the discovery of quantum mechanical spin. I’m not saying the fact that they already existed is some astonishing mystical coincidence, but it does seem like a bit of good luck.

I thought part of the reason Schrödinger failed to accomodate fermions in his shot at relativistic QFT was that he failed to treat quantum numbers as matrixes instead of simple numbers, which Dirac did do, and out of that effort popped four solutions, two for an electron, two for a positron (eureka!!), and somehow (for reasons I don’t quite understand), those solutions encompass spin, and it follows from those matrix representations of quantum numbers that you need to rotate a fermion through two complete turns to restore its original state. Maybe I’m wrong, but given what was said above about how quaternions allow you to distinguish rotations, it seems line a person needs quaternions to deal with this property, which has physical consequences, is totally weird, and Hamilton would never have imagined his quaternions would have such an application.

My who premise falls apart, of course, if you can also express this weird rotational behavior of fermions using cartesian unit vectors.

Now that I think of it, I’m reminded of another story (perhaps mythical): Heisenberg, plagued by allergies, retreats to the North Sea island of Heligoland to think long and hard about hydrogen spectra. Through this effort, he finds if he arranges certain values in neat rows and columns, and performs the appropriate operations on them, he gets results that agree perfectly with experiment. Basically, he invents matrix mechanics on the spot. Thing is, he knew nothing about linear algebra, so he had to partially remake the wheel to solve a particular physical problem. He had to figure out noncommutivity on his own to make the math fit the observations; and the orignial linear algebrists, when they deduced this property of matrices, had no idea that noncommutivity was some fundamental property of nature (and may, in fact, have much to do with geometry on the quantum scale and whatever quantum theory of gravity emerges, something Heisenberg probably had no appreciation of at the time).

I’m no mystic myself, nor do I put any stock in mystical nonsense, but I have a hard time not getting a little thrill out of stories like that. Of course, if the stories are mythology, that may have a lot to do with their ability to inspire; and my lack of math knowledge and skill may cloud my appreciation for how mundanely inevitable such associations ultimately are. As related to me, however, I do feel discoveries like this, and the way seemingly abstract and physically irrelevant mathematics wind up being highly relevant, in ways no one could have predicted, are a little mind-blowing.

Quaternions are probably good. The norm of a - b can be taken as a metric, and that’ll let you know whether two quaternions are close. You can generate quaternions that are close to a given one by adding small random numbers to the components of what you’re starting with.

This is an educated guess, so be sure to test it and make sure it generates reasonable results.

Thanks, loopydude. I am not a mthematician, but i’ve always been fascinated by the tremendous effort that goes into mathematics. I also tend to think that the truly gifeted mathematicians experience a "higher plane’ of reality. take Gauss: i recall that he wrote that he wrestled with a new equation , far into the night-he was exhausted and felt burnt out. he closed his eyes…and all of a sudden the solution popped into his head! Hamilton was also such a guy-he would all of a sudden get ideas, and had no idea where they came from.
I also reall that LaGrange was a man who constanly rechecked his work-so much so that just as he was about to deliver a paper to a learned society, he frown, shuffled his notes, and announced “gentlemen, i must think about this some more”-and walked off!

Indeed one of the advantages of quaternions is how easy it is to pick a random rotation in 3-space: just pick a random point on the unit sphere. Is this a rotation in 2d or 3d?

Actually, here is a pretty good illustration of the “belt trick”, which shows a more familiar system that runs into the same hangup about SO(3) not being simply-connected.

3D, so does that mean if I have a quaternion (x, y, z, (1 - x^2 - y^2 - z^2), then the quaternion (x + 0.01, y + 0.01, z + 0.01, …) will be close?

IANAMathematician. But I am a programmer and artist.

A key to being good at programming–and what can make someone be not good at programming–is the ability to visualise what is happening. You’ve just got this box making a whirring sound and not doing what it was you told it to do: So what next? Somehow you have to try and make that whirring box into some sort of “something”–like gears and buckets of water–because otherwise you’re only left with random output and a whirring box and no way to proceed.

A key to being a good artist is to be able to visualise an image of a world that does not exist and then to “trace” it down on paper. People who “cannot draw” may just be people who can’t hold that image in their head long enough–or keep it from changing–though generally I think it is an issue of interference from mental symbolism filling in for realistically shaped objects.

So not to say that they’re not on a special plane–but just that there is probably such a special plane for most any field, where you just have some ability to see through the core mental blocks that stop others from being good at that thing.

Very cool! Thanks!

Errr…spinor? Whazzat?

Should be. The distance formula is d[sup]2[/sup] = (a[sub]1[/sub] - a[sub]2[/sub])[sup]2[/sup] + (b[sub]1[/sub] - b[sub]2[/sub])[sup]2[/sup] + (c[sub]1[/sub] - c[sub]2[/sub])[sup]2[/sup] + (d[sub]1[/sub] - d[sub]2[/sub])[sup]2[/sup].

Note that it’s unit quaternions that represent orientations, so you’ll have to renormalize your values. Also note that they represent more than just pointing in a certain direction, but also the twist along that direction. Finally, if you’re interested in interpolating between two quaterions, you can’t just interpolate the values. Instead you should use a slerp: spherical linear interpolation. Ken Shoemake wrote it up in the SIGGRAPH 1985 Proceedings, but there are other writeups on the web if you don’t have access to that.

Hm… okay, the term “spinor” is really a holdover from the physics. Basically, the quaternion group acts on many different vector spaces. It acts by rotations on 3-dimensional space, which is how we’ve been talking about it. It also acts on a 2-dimensional vector space – the space of states of an electron, for instance – by the Pauli matrices. Elements of this latter sort of vector space representation are called “spinors”, just like elements of R[sup]3[/sup] with the quaternions acting by rotations are called “vectors”

He’s just testing nearby values of a function trying to find a minimum. Renormalizing each time adds dozens if not hundreds of multiplications and divisions. ugh!

Just define f on all quaternions so it’s constant on lines through the origin. Bingo: no more renormalizing.