Hi! I'm new here and I'm not sure this is the right sub-forum...
But anyway, I'm learning about quaternions, and reading the book John Vince - Quaternions for Computer Graphics. And he is proving that the quaternion notation q = [s, v], have the same "algebraic" rules as the other ways of representing quaternions.
And now he is proving that i*j = k, j*k = i, k*i = j, in that notation, so here is how it goes:
ij = [0, i][0, j]
= [-i * j, i×j]
= [0,k]
I get that i×j = k, but -i*j = 0?
How does that work? I have searched for this and it's not mentioned anywhere?
Thanks in advance!
Ahh! I was starting to wounder more and more about the symbols between the i and j... The author kind of just suddenly threw in the normal vector symbols with the quaternion symbols, i thought it was normal multiplication between i and j as imaginary numbers, did not quite get that until you said it.
Thank you very much!
Edit; wait, how does this work then?
i = [0, i]
i2 = [0, i][0, i]
= [i · i, i×i]
= [−1, 0]
(taken right from the book, same is the i * j thing)
Is i representing a vector with just 1 in the "i-direction" or what?
yes. we can think of a quaternion as an element of R^{4}. but since 4 > 1, we have a number of different ways to "decompose R^{4}".
now one way (perhaps "the standard way") is 4 = 1+1+1+1, we think of "each coordinate of a quaternion q as having 'equal weight' ". and while this is perfectly OK, and works well by analogy with the complex numbers (we have a basis {1,i,j,k} instead of {1,i}, with "similar rules"), the formulas for multiplication and division are particularly unwieldy, and cumbersome.
another way is 4 = 1+3, we divide a quaternion into "a scalar part" and "a vector part". now one of the UNIQUE things about a 3-dimensional vector space, is that we have a cross-product. and it just so happens that representing quaternions this way gives:
pq = [a,u][b,v] = [ab-<u,v>, av+bu+(uxv)]
in the "special case" when a = b = 0, this becomes:
pq = [0,u][0,v] = [-<u,v>, uxv]
when u = i = (1,0,0), and v = j = (0,1,0), (what we are doing here is "identifying" i = (0,1,0,0) and j = (0,0,1,0) with their images inside {0} x R^{3} . i hope that's clear) we have:
ij = [0,i][0,j] = [-<(1,0,0),(0,1,0)>, (1,0,0)x(0,1,0)] = [-((1)(0) + (0)(1) + (0)(0)), ((0)(0) - (1)(0), (0)(0) - (1)(0), (1)(1) - (0)(0)))]
= [-(0+0+0), (0,0,1)] = [0,(0,0,1)] = [0,k] = k.
so we can think of a quaternion as "a complex-like number" with FOUR parts (one real, and THREE imaginary), or: we can think of a quaternion as having TWO parts: a scalar, and a vector.
the latter view has some 3-dimensional spatial ramifications: we can look at "just the vector part" of a quaternion. it turns out that quaternions of interest turn out to be "the unit sphere quaternions", quaternions of the form; q = [0,v], where |q| = |v| = 1. since rotations of a sphere in 3 space correspond to (distance-preserving) rotations of all of R^{3}, we can represent any rotation of a vector v (in 3-space), to another vector v' (also in 3-space), by setting:
u = v/|v|, u' = v'/|v'| ("normalizing the vectors" v,v'), and finding q such that:
u' = quq^{-1} (conjugation by q represents a rotation).
it turns out that for an angle α, the unit quaternion we seek is:
q = [cos(α/2), (sin(α/2))w], where w is the unit vector along the axis of rotation.
the neat thing about this is that if p corresponds to a rotation of angle β about another axis of rotation w', then finding the composition is the (double conjugation):
(pq)u(pq)^{-1} = p(quq^{-1})p^{-1} (first we rotate α around w, then β around w').
the "extra degree of freedom" (4 versus 3) we have in picking a quaternion to represent a rotation (rather than a 3x3 matrix) prevents the phenomenon known as "gimbal lock" (where 2 of the 3 dimensions "line up", locking the system into a two-dimensional rotation system). since we always have a "fourth component", we don't have to worry about whether or not "the vector parts" of the quaternion are linearly dependent (it used to be that if an airplane went straight up, and had a navigational system that was driven by a gimbal (like you see in gyroscopes) pitch and yaw became "locked" and the navigation system could only "spin" the aircraft, and could not "right it" (bring it level). as you might imagine, the results were often unpleasant. the same danger existed with "nose dives" that became too steep).
the same problem can happen in video games that use 3x3 matrices to control object movement (like perhaps objects controlled by the AI). if these objects become "gimbal locked" they are effectively reduced to motion in whatever plane results, often with undesirable results (they might exceed their design parameters and perhaps even crash the program).
perhaps the choice of i,j and k is confusing: especially since using {i,j,k} as a basis of 3-space is somewhat confusing when compared to using the basis {1,i} as a basis for 2-space (as is typically done with complex numbers). what happens is that EACH subspace generated by {1,i}, {1,j} and {1,k} is equivalent to the complex plane. so in complex numbers:
i = (0,1)
whereas in quaternions:
i = (0,1,0,0) = [0,(1,0,0)]
so in "thinking of i as a vector" in complex numbers it's the "y-axis", but in quaternions, it's the "x-axis" (the real part of the quaternion is "in another dimension").