the purpose of quaternions

Started by
18 comments, last by biaze 4 years, 3 months ago
The purpose of complex numbers is obvious: thanks to complex numbers it's possible to take square roots of negative numbers. A complex number raised to any other complex number has a complex number as result and there are always solutions (unlike with real numbers). But since you can take square roots of any complex number to get another complex number, and I can't think of any other mathematical operations that you can do on a complex number that hasn't got a complex number as result (except maybe tetration, who knows), what's the purpose of quaternions? What possibilities do they add to existing mathematics? Also, why isn't there something defined with 3 numbers? Complex numbers have 2 numbers, quaternions have 4 numbers, octonions have 8 numbers, etc... but why's there nothing with 3, 5, 6, 7, ... numbers?
Advertisement
well, that's a huge topic... Even Hamilton himself hadn't come up with answers to some of your questions during his lifetime. It is known that Hamilton was trying to come with a generalization of complex numbers in three dimensions and seemed to be having a really hard time. Finally he came up with the quaternions in 4d and had to assume the 'scalar part' (as he called it) being zero... pure quaternions.

Quaternions were originally geared towards an algebraic re-interpretation of that time's known geometry via (hyper)complex numbers. Concepts like vectors and matrices had yet to come, not to mention their calculus... The analogy between the euclidean 2d plane and the complex plane was obvious, Hamilton couldn't help wandering whether there could be something similar in higher number of dimensions, while keeping the interesting properties of complex numbers.

People were interested in exploring all aspects of things back then.
You may find it interesting, nowadays, that you can re-interpret 3d rotations with quaternions, but they would find it more interesting that a quaternion polynomial equation can have more roots than its degree!
Most of these aspects are theoretical, that's why quaternions -today- seemed to pop-up like a solution without a problem.
The advent of vector algebra and matrices -as we know them- was one of the major reasons why Hamilton's quaternions didn't spread. It was only the beginning of a debate that continues... up to our days.

However, people still think much of Hamilton. He introduced many concepts, quite radical at the time being. Abandoning the commutativity of multiplication was one. He was also the first one to introduce concepts like the inner and cross product. And many more I can't remember right now. I believe that if it wasn't for the huge revolution brought with vectors, there would have been much more research in the area. It's quite intriguing as it seems to provide a unique way of understanding space through the properties of complex numbers.

edit:
btw, for number of dimensions 3, 5 etc. it seems that the properties of hypercomplex numbers can't be defined *that well*.
E.g. for 3 dimensions, you should have 2 roots for -1, 'i' and 'j'.
Given the usual way to this, their product i*j should be the additive inverse of the third imaginary root, but there's not such a thing as '-k' here. I don't know how a second root for -1 can be introduced, and how the multiplication table would be defined, while keeping the properties of complex numbers. You'd also have to come up with associative multiplication and other operations...
I guess Hamilton knew better when he had to work with 4d and constrain one dof.
Aside from theoretical math - quaternions allow you to rotate objects without intruducing gimbal lock problem, which you would get when you would rotate them using matrices. And that's pretty important feature, since without it creating smooth animation on computers would be rather difficult... :-)
Quaternions were specifically created to analyze 3-space. Everytime the concept of number is extended, because humans are inflexible, they wish to retain properties that were had in the original simplistic meaning. Properties as associativity, distributivity and so on. As to what possibilities quaternions added?

They led to a few discoveries in optics by hamilton and Knott managed to say some stuff on heat and electricity, but really? Nothing much. The main benefit of quaternions is that they helped us broaded the concept of number and not be so inflexible. After quaternions a bunch of new algebras and mathematical concepts, including vectors were let loose like a flood gate. But really, just as with vectors, anything you can do with quaternions you can do without them as Cayley emphasised. Problem is, it will be more cumbersome.

Why not 3,5,6,7? The answer is very complicated. Again, it is to do with the properties we wish to retain and the way we have defined our mathematics. Quaternions are part of what is called a division algebra. The key is in parallelizable spheres S^n-1 (very loosely, ability to derive tangent spaces from arbitrary points) which are only possible in n = 1,2,4,8 (why this is so is even more involved, cross sections of cohomology classes, vector bundles and what not). The linchpin of any proof would be Bott's Periodicity Theorem (Raoul Bott only just recently died a mere few weeks ago! [sad]) which links division algebras to vector bundles, a property of them which can be stated in terms of afore mentioned S^n-1 spheres. In English I would say, just because.

If I wasnt clear please tell me where I should clarify.
Quote:Original post by Koshmaar
Aside from theoretical math - quaternions allow you to rotate objects without intruducing gimbal lock problem, which you would get when you would rotate them using matrices. And that's pretty important feature, since without it creating smooth animation on computers would be rather difficult... :-)


Gimbal lock have nothing to do whether you're using matrices or not, but whether you're using an Euler angle representation to represent your rotation. It's perfectly possible to make a rotation system with matrices that doesn't suffer from gimbal lock problem; just stay away from Euler angles. You can use an axis-angle representation of the rotation instead for example.

Quaternions is not the solution to the gimbal lock problem. The solution is to not use Euler angles.
EDIT: Looks like Brother Bob beat me to it....


Quote:Original post by Koshmaar
Aside from theoretical math - quaternions allow you to rotate objects without intruducing gimbal lock problem, which you would get when you would rotate them using matrices. And that's pretty important feature, since without it creating smooth animation on computers would be rather difficult... :-)


Quaternions used for rotations specify an axis and degree to rotate. A Matrix for rotation shares this property.
It is possible to still have gimbal lock when using quaternions for rotation. And it is possible to avoid gimbal lock when using matrices.

Gimbal lock is really a property of how you logically organize your rotations ordering; it is not a direct result of the implementation used -matrix or quaternion.

The main advantage of quaternions over matrices for graphics, is computational savings. The quaternion representation requires fewer multiplication operations when combining them.
Quote:Original post by someusername
Finally he came up with the quaternions in 4d and had to assume the 'scalar part' (as he called it) being zero... pure quaternions.


Huh? This is not clear. He dropped commutation and added an extra axis. He didnt call anything zero, pure quaterions came later.

Quote:Quaternions were originally geared towards an algebraic re-interpretation of that time's known geometry via (hyper)complex numbers. Concepts like vectors and matrices had yet to come, not to mention their calculus... The analogy between the euclidean 2d plane and the complex plane was obvious, Hamilton couldn't help wandering whether there could be something similar in higher number of dimensions, while keeping the interesting properties of complex numbers.

No they werent. Quaternions were specifically a geometric treatment of cartesian numbers. They followed a reasoning of a treatment as ordered couples complex numbers. 3-space extensions failed to retain the all important property of non ambigious division among others, so he went to 4 and dropped commutativity. Simply that (seems obvious now but such was complete and utter heresy then). Tait used to lament that Hamilton did not have the courage to remove all those seperate components to treat the quaternion as an entire geometric entity whose properties were so natural to space (according to him. we now know that this is not true)!

Quote:
The advent of vector algebra and matrices -as we know them- was one of the major reasons why Hamilton's quaternions didn't spread. It was only the beginning of a debate that continues... up to our days.


Also, dont forget that they were not as intuitive, were not very physical (square of pure quaternion and gradient as well is negative ) and were limited only to analysis of 3-space. No debate remains or (ever existed actaully) among the mathematics community. The physicist might have passed this legacy on to the engineers.

Quote: He was also the first one to introduce concepts like the inner and cross product.


No he wasnt, people like Mathew O'Brien, Bellavitis, Saint-Venant, Mobius and Grassman preceded him. Actually, I think Mobius was first although i dont think he had a cross product equivalence.
Quote:Original post by Lode
The purpose of complex numbers is obvious: thanks to complex numbers it's possible to take square roots of negative numbers. A complex number raised to any other complex number has a complex number as result and there are always solutions (unlike with real numbers).

But since you can take square roots of any complex number to get another complex number, and I can't think of any other mathematical operations that you can do on a complex number that hasn't got a complex number as result (except maybe tetration, who knows), what's the purpose of quaternions? What possibilities do they add to existing mathematics?

Also, why isn't there something defined with 3 numbers? Complex numbers have 2 numbers, quaternions have 4 numbers, octonions have 8 numbers, etc... but why's there nothing with 3, 5, 6, 7, ... numbers?


A 3-tuple isn't sufficient to encode the information needed.


I don't know your level of math skills, so please make sure you understand each line before continuing to the next line.


Let's start with a rotation angle and polar coordinates.

We want to just state a rotation angle.

A polar coordinate is (r, Θ), the distance from the center (r) and the angle from the positive x axis (Θ).

If you use a value of r=1 and Θ = angle, you have a unit circle. It's a bit overkill for a single rotation angle, but they still have a 1:1 correspondance.

With a small amount of math, you can convert between a location polar(r, Θ) to a location on the 2D cartesian plane Cartesian(x, y).

If you want to through the shortest rotation between polar(1,1) and polar(1,359), you would need to step between (1,2), (1,3), (1,4) ... (1,359).

Even though the Cartesian result is the same, we can't go to polar(1,-1) since it is mathematically a different point than polar(1,359).

But we weren't interested in the same mathematic point in polar coordinates, we really wanted the same mathematic point in cartesian coordinates.

If we converted the same polar(1,1) and polar(1,359) to Cartesian coordinates, we'd see that the shortest distance is going down a tiny bit on the Y axis. So we'd just follow the circle along that tiny bit of Cartesian space. It requires a bit more math if we stay in Cartesian coordinates, but the end result is a the short curve we were interested in.

Complex numbers are basically the same as Cartesian (x,y) coordinate vectors.

So now we have a set of 2D conversions:
angle ↔ (1, Θ) ↔ (X,Y) ↔ complex number

If you don't understand that, please go back and review it.


Let's move to 3D.

To represent an orientation in 3-space, we can use the three Euler angles for yaw, pitch, and roll.

If we want to draw that inside a unit sphere, we get (1, Θ, Φ, ρ).

You might think that since we added a dimension we just need one more polar coordinate, (r, Θ,Φ). But it doesn't work. That gives a point on the sphere (yaw and pitch). That's not the full orientation, since we can also roll in 3-space that we could not do in 2-space.

That four-tuple represents orientation in 3-space using angles.

Now when we want to rotate from polar(1,1,1,1) to polar(1,359,359,359), we still need go around the long way, since (1,-1,-1,-1) is a different point mathematically.

But we are still interested in the Cartesian results, not polar results.

Can we convert that same thing to (X,Y,Z) coordinates and follow the short spherical path as we did in 2D?

No.

The Cartesian coordinate (X,Y,Z) is the same as (r, Θ, Φ), and doesn't encode the possible roll. Instead of a 3x1 matrix for XYZ, we end up needing a 3x3 matrix to include the roll. Nasty.

Using exactly the same conversion math that is used between polar coordinates (r, Θ) ↔ complex numbers, we convert between (r, Θ, Φ, ρ) ↔ quaternions.

So we can use four variables in the quaternion instead of the 9 in an 3x3 matrix. Amazing.



So as far as orientation goes, we can state conversions as

2D: angle ↔ (1, Θ) ↔ (X,Y) orientation ↔ complex number
3D: euler angles ↔ (1, Θ, Φ, ρ) ↔ [3x3] oreintation ↔ quaternion

Hopefully that makes some sense.

frob.

[Edited by - frob on January 10, 2006 11:32:57 AM]
Quote:
Finally he came up with the quaternions in 4d and had to assume the 'scalar part' (as he called it) being zero... pure quaternions.

The part "(as he called it)" refers to 'scalar part'

Quote:
He was also the first one to introduce concepts like the inner and cross product.

well, I haven't had the chance to ask Hamilton myself, this are all stuff I've found googling around... I suppose you know better
As far as why theres nothing in 3-space, Hamilton struggled for years to figure out how to represent the rotations in 3-space, but he could never find the answer until he did it in 4-space.

I don't know much about math, so I couldn't give you the reason why... I just use the things :)

Check out my new game Smash and Dash at:

http://www.smashanddashgame.com/

This topic is closed to new replies.

Advertisement