7 ms·
Quarternions aren't weird. With a 2D angle we use 2 numbers (sin and cos) to calculate vector rotations. It turns out that in 3D we use 4 numbers.
by marcv81 9y ago
Quarternions aren't weird. With a 2D angle we use 2 numbers (sin and cos) to calculate vector rotations. It turns out that in 3D we use 4 numbers.
- klodolph 9y agoThere's a lot of hand waving in that phrase, "it turns out". Sure, "it turns out" that 3D uses four numbers. Why? Geometric algebra explains that in a succinct way that also appeals to our intuition about geometry. Start by using bivectors to represent reflections, then take the closure of your bivectors and you get the even-ordered subalgebra. This will have dimension 2^(N-1)... so 2 for 2D, 4 for 3D, and 8 for 4D. This, to me, takes the mystery out of why quaternions can represent rotations, and it places quaternions in a coherent theory of geometry that works in any number of dimensions, not just 3D. Alternatively, we could accept that the math just happens to work out that way, or we could even show that quaternions are a double cover of SO(3), but all that does is analyze why something works, whereas the geometric algebra version is a bit less of a leap and builds quaternions from the ground up.
- yequalsx 9y agoI think there is a lot of unintentional irony in what you wrote. You start out saying, "There's a lot of hand waving in that phrase..." and then go on to write: "Start by using bivectors to represent reflections, then take the closure of your bivectors and you get the even-ordered subalgebra." It reminds me of the running joke we had in graduate school. Any book whose title starts off with "An Elementary Introduction to..." was going to be very difficult.
- twic 9y agoThere's definitely something a bit "just a monoid in the category of endofunctors" about that description. Which is not to say that it's not both true and helpful - it's just not very accessible. Perhaps if there was a one-sentence explanation of what a bivector was, it would be a lot clearer.
- defen 9y agoA bivector is a plane spanned by two vectors, with an associated orientation.
- abainbridge 9y agoThat hasn't helped!
- defen 9y agoIn a geometric setting - if you have two vectors, you can position them so that both have one end at the origin. This spans a plane (test it out yourself in 2D or 3D space with two pencils, put the eraser at the origin for each; it's a parallelogram). The area of the plane will depend on the length of the pencils. You can assign an orientation to the plane by imagining a rotor embedded in the plane that spins either clockwise or counterclockwise.
- abainbridge 9y agoHmmm. "The area of the plane will depend on the length of the pencils". Surely the area of the plane is infinite? The area of the _parallelogram_ will depend on the length of the pencils. And I can't see how "you can assign an orientation to the plane" other than by changing the directions of the pencils. Again this description sounds like it refers to the parallelogram, not the plane. And I don't know what a rotor is. But other than that, I'm doing great.
- klodolph 9y agoThe length of a line is infinite too. If you think of a vector as a line + magnitude, it's a bit more natural to think of a bivector as a plane + magnitude.
- defen 9y agoYes, when I said plane I really meant the parallelogram. By rotor I literally just meant "a thing that spins" - you could draw a circle on the parallelogram with an embedded arrow describing the direction it is spinning - that arrow could either be going clockwise or counterclockwise.
- klodolph 9y agoI aiming that explanation at people who had read and understood the article. The article explains bivectors and how they can be used to represent reflections, and "closure" is a fairly common concept, so once you put those two together you should get a mathematical object which I've called "the even-ordered subalgebra". I haven't explained why it's even-ordered or what a subalgebra is, but I used those terms so you could at least have the vocabulary to talk about it or do a Google search. Mathematics education is hard. In my experience, you start out with no understanding of a subject and can't understand it when people explain it to you, and at some point it clicks and you can't understand why it was ever difficult. I could be intentionally obtuse and, for example, describe a vector space as an "abelian group, field, and homomorphism from the field to group endomorphisms", but I feel that's the only people who would use that definition already have a good understanding of vector spaces. The reason that I consider the non-GA approach to quaternions as rotations "hand wavy" is because it's not constructive, or perhaps just because I personally don't understand it. Using GA, I can construct a representation for rotations in any Euclidean space, not just 3D space, but 2D, 4D, 5D, whatever. However, without GA at my disposal, the fact that unit quaternions are a double cover for SO(3) seems like some kind of black magic that came from the void. I have a few drafts of an introductory article I was writing on geometric algebra sitting on my hard drive, but I've never been able to get the article into a state I'd consider publishable. So instead, I'm trying to inject what I know into HN discussions.
- yequalsx 9y agoI was a math Ph.D. student at Purdue University and studied commutative algebra. I understand what you were getting at. My comment was mostly tongue in cheek. For someone not versed in mathematics what you wrote could be ironic in a slightly humorous way. I.E. that the hand wavy way explanation is more understandable to a layman than subalgebras, and whatnot. That's the ironic difference between mathematicians and non-mathematicians. What is hand wavy to us is concrete to them and vice versa.
- marcv81 9y agoWhat I meant is that quaternions don't seem any weirder to me than sin/cos.
- tgb 9y agoI think that's a good motivation why we would study quaternions, but it's kinda hiding the big difference between 2D and 3D under the rug. In 2D, we have a nice, global coordinate system for the space of all rotations: what we call the angle. (Actually, it's a coordinate system for the "universal cover" of the space of rotations since angle X and angle X + 2pi give the same rotation, which mostly doesn't really matter.) Meanwhile, in 3D, there is no global coordinate system for the space of rotations! Euler examples uniquely specify a rotation, but the problem of Gimbal lock [1] means that they break down as coordinates at some point (i.e. there's no inverse to go from rotation in 3D to its corresponding Euler angles, which there is in 2D, with the caveat already mentioned). This is analogous to the problem of finding a coordinate system for the globe: specifying latitude and longitude tells you were you are, but there's a degeneracy at the poles. And no possible coordinate system can solve this problem entirely. Contrast this to the situation of giving a coordinate system for the circle, which we do with it's angle. This isn't quite a coordinate system, due to the problem we already encountered that X and X + 2pi are the same, but that's OK because the these two points are separated from each other. On the sphere, the latitude/longitude pair (pi/2, x) gives the north pole for any value of x, even ones that are arbitrarily close together. That maps not even locally invertible! You suggest we think of points on the circle as point in 2D space that happen to lie on the circle (i.e. cos and sin of the angle corresponding to that point). Analogously, we can think of points on the sphere as points in 3D space that happen to lie on the sphere (like some point (x,y,z) with x^2 + y^2 + z^2 = 1). And analogously, we can think of rotations of 3D space as a point in 4D space (that happens to satisfy some conditions), and the quaternions give that 4D point. This is fantastic and convenient in both 2D and 3D! But in 2D we didn't need to do this, but could if we wanted to. For 3D rotations, we do need to, or else we have this terrible degeneracy that never rears its head in 2D. In that sense, 2D and 3D are very different! [1] https://en.wikipedia.org/wiki/Gimbal_lock https://en.wikipedia.org/wiki/Gimbal_lock
- Grustaf 9y ago> Meanwhile, in 3D, there is no global coordinate system for the space of rotations There are plenty, it's just that you can't have a 3-dimensional one without singularities. https://en.wikipedia.org/wiki/Hairy_ball_theorem https://en.wikipedia.org/wiki/Hairy_ball_theorem