I understand that the formula for quaternion multiplication of $q_1=(s_1,\vec{v_1})$ by $q_2=(s_2,\vec{v_2})$ $q_1q_2=(s_1s_2-\vec{v_1}\cdot\vec{v_2}, \vec{v_1} \times\vec{v_2} + \vec{v_1}s_2 + \vec{v_2}s_1)$ is derived from the simple expansion of $(a_1+b_1i+c_1j+d_1k)(a_2+b_2i+c_2j+d_2k)$. I also understand that the conjugation of a pure quaternion by a unit quaternion accomplishes a rotation in 3-D about the vector part of the quaternion by $2\theta$ where $\theta$ is the angle between the quaternion as a 4-D vector and our 3-D space. I am trying to understand the geometric significance of the formula for quaternion multiplication in its own right, not as half of a rotation. In other words, why does the $qp$'s projection into 3-D space lie half way between $p$ and $qpq^{-1}$? Is it analogous in some way to the way multiplying imaginary numbers adds their angles?


To be more clear, I'm wondering if there is a geometric interpretation of this formula $q_1q_2=(s_1s_2-\vec{v_1}\cdot\vec{v_2}, \vec{v_1} \times\vec{v_2} + \vec{v_1}s_2 + \vec{v_2}s_1)$. For example, why is it that the new real part is the product of the real parts minus the cosine of the angle between the imaginary vectors (the dot product)? Why is the new imaginary vector the orthogonal vector (cross product) minus each original vector scaled by the real part of the other quaternion?

Alternatively, if someone could do the same sort of explanation for the equivalent Cayley-Dickinson form of a quaternion $w+xi+yj+zk=(w+xi)+(y+zi)j$, and multiplying two quaternions each with two complex numbers like $(a,b)(c,d)=(ac-bd^*, ad+bc^*)$.


The geometric interpretation of quaternion multiplication is fundamentally 4-dimensional (unlike quaternion conjugation, which can be considered as an action on $\Bbb{R}^3$).

Let's start with an easy case. Say $q=a+bi$ with $b \neq 0$, $a^2+b^2=1$. That is, $q$ is a non-real unit quaternion in the subalgebra of $\Bbb{H}$ generated by $i$. What affect does multiplying by $q$ have on an arbitrary quaternion $r$?

First of all, if $r$ also lies in the subalgebra generated by $i$, then we can consider multiplication of $q$ and $r$ to be ordinary complex multiplication; that is, multiplication by $q$ rotates $r$ by $\theta$ in the $\{1, i\}$ plane.

Secondly, if $r$ lies in the orthogonal complement of that subalgebra, $r=cj+dk$, we can write $r=(c+di)j=j(c-di)$. The first of these representations can be used to left-multiply by $q$ via ordinary complex multiplication; the second one can be used to right-multiply. In either case, multiplying by $q$ rotates $r$ by $\theta$ in the $\{j, k\}$-plane; however, the sign difference means that the two multiplications rotate in opposite directions from each other.

We can then find the effect of multiplying $q$ by an arbitrary quaternion by projecting that quaternion into these two planes. That is, an arbitrary quaternion will have its $\{1, i\}$-projection and $\{j, k\}$-projection both rotated by $\theta$ when it is multiplied by $q$; the direction of the $\{j, k\}$-rotation, but not of the $\{1, i\}$-rotation, will be affected by whether we're left-multiplying or right-multiplying by $q$.

The general case works similarly. For any unreal unit quaternion $q$ that makes an angle $\theta$ with the real axis, multiplication by $q$ rotates by $\theta$ in the $\{1, q\}$-plane, and also rotates by $\theta$ in its orthogonal complement. The direction of the first rotation is fixed, but the direction of the second rotation depends on whether we're multiplying by $q$ on the left or on the right. You can see this just by noticing that any unreal quaternion generates a 2-dimensional subalgebra isomorphic to $\Bbb{C}$, making the previous few paragraphs work in general after some relabeling.

This also gives you a way to see why quaternion conjugation works the way it does on $\Bbb{R}^3$. If $q$ makes an angle $\theta$ with the real axis, then the map $r \mapsto qrq^{-1}$:

  • is the identity map in the $\{1, q\}$-plane, since that plane forms a commutative subalgebra of $\Bbb{H}$
  • involves a rotation by $2\theta$ in its orthogonal complement. Both $q$ and $q^{-1}$ rotate quaternions in $\{1, q\}^{\perp}$ by $\theta$. If they were multiplied on the same side, those rotations would have to cancel out; since left-multiplication behaves oppositely to right-multiplication, this means they must reinforce each other. Since the orthogonal complement of $\{1, q\}$ is orthogonal to $1$, it is pure imaginary, so we've reproduced the fact that quaternion conjugation corresponds to a double-angle rotation in $\Bbb{R}^3$ (when identified with $\Im(\Bbb{H})$).

Note also that multiplying by a general quaternion involves scaling by the norm of that quaternion, but conjugation conveniently causes the norms of $q$ and $q^{-1}$ to cancel.

  • $\begingroup$ why is $\theta$ the angle between $q$ and the real axis? $\endgroup$
    – JJW5432
    Jun 7 '14 at 18:05
  • $\begingroup$ $\theta$ is defined to be the angle between $q$ and the real axis. Multiplication by $q$ then results in rotation by $\theta$ in each plane because that's how complex multiplication works, and once we're in each plane that's all we need to do the computation. $\endgroup$
    – Micah
    Jun 7 '14 at 18:30
  • $\begingroup$ I know that complex multiplication rotates by the angle, and since $q=(\cos{\theta}+\sin{\theta}i) + (\sin{\theta} + \sin{\theta}i)j$, I can see how the first complex number will have angle $\theta$, but I can't see how the second one does. $\endgroup$
    – JJW5432
    Jun 7 '14 at 19:44
  • $\begingroup$ How do you find the projection of a quaternion on the plane ${1,q}$? By factoring out $q$? $\endgroup$
    – JJW5432
    Jun 7 '14 at 20:32

Why is it that vectors and quaternions, then, rotate by different amounts?

Consider a rotation map $\underline R(a) = q a q^{-1}$. Let's rotate this by some other map $\underline S(a) = p a p^{-1}$. The composition is

$$\underline SR(a) = pqaq^{-1} p^{-1}$$

The net quaternion of this transformation is $pq$. Now, consider the case that $p = -1$. This is a quaternion corresponding to a rotation by $\pi$. Then $pq = -q$ is distinct from the original quaternion $q$, even though the net rotation performed by $pq$ is the same as by $q$. This is the origin of saying that quaternions "double-cover" the group of rotations; they take more rotation to be rotated back to what they were, but the rotations they themselves represent still go as you'd expect.

Edit: a useful setting to understand quaternions is the geometric (or clifford) algebra.

Geometric algebra uses a geometric product of vectors. Some of the relevant properties of this product are:

  • Anticommutativity of orthogonal vectors: If $u,v$ are orthogonal, then $uv = -vu$.
  • Reduction to scalar product: for any vector $u$, $uu$ is a scalar, and $uu$ (or $u^2$) is equal to $|u|^2$.
  • Associativity: if $a, b, c$ are vectors, then $a(bc) = (ab)c$.

Products of $k$ orthogonal vectors are called $k$-blades. Vectors are $1$-blades, and just as each vector is associated with a subspace (a line), any $2$-blade may be associated with a planar subspace, any 3-blade with a volumetric subspace, and so on. The algebra of blades allows you to talk about these objects in a more natural and easy-to-use manner than traditional linear algebra.

Why am I talking about geometric algebra, though? Because GA is a useful setting to understand quaternions.

The geometric product makes it easy to write reflection maps. Let $\underline N$ be such a reflection map, associated with reflection across a plane with normal $n$. Then the reflection of a vector $a$ is

$$\underline N(a) = -nan^{-1}$$

It's commonly known that two reflections form a rotation, so let's do it twice. Given another vector $m$, we can build a rotation like so:

$$\underline R(a) = mn a n^{-1} m^{-1}$$

The quantity $mn$ is the GA analogue of a quaternion, here called a rotor. Unlike quaternions, the number of elements of a rotor varies based on the base vector space. In 2d, for instance, rotors have only two components, and they can be identified with complex numbers.

Yes, you read correctly: GA rotors are the natural setting for both complex numbers and quaternions, as well as for describing rotations in higher dimensional spaces!

In any 2 or 3 dimensions, rotors are linear combinations of scalars and 2-blades. Each unit 2-blade squares to a negative number. Example: let $e_1, e_2$ be an orthonormal basis of $\mathbb R^2$. Then $(e_1 e_2)^2 = e_1 e_2 e_1 e_2$. Using anticommutativity, we see that $e_1 e_2 e_1 e_2 = -e_1 e_2 e_2 e_1$. Using the reduction to scalar product, this resolves to $-1$. $e_1 e_2$ directly represents the $xy$-plane, if you will.

That rotors in GA involve 2-blades (or bivectors) instead of regular vectors is a critical distinction from quaternions: it means that you no longer identify the "imaginary part" of a quaternion with a vector. While there is always a correspondence between the 2-blade part of a quaternion and a vector, they are not the same and should not be confused with each other.

With that in mind, we can write a rotor $q = s + B$, where $s$ is the scalar part and $B$ is the bivector (2-blade) part. Then, the multiplication of two quaternions follows the distributive property:

$$q_1 q_2 = (s_1 + B_1)(s_2 + B_2) = s_1 s_2 + s_1 B_2 + B_1 s_2 + B_1 B_2$$

At this point, it's common to adopt some shorthands for different terms in a geometric product: for instance, two scalars multiplying each other always produce a scalar, so you can see that $s_1 s_2$ is scalar. There is a scalar part in $B_1 B_2$ also. This is usually denoted with $\cdot$, the dot product. There is also a 2-blade term in $B_1 B_2$. We usually say that

$$B_1 B_2 = B_1 \cdot B_2 + B_1 \times B_2$$

where $B_1 \cdot B_2$ is defined as the scalar part and $B_1 \times B_2$ is defined as the bivector part. You can see this starts assembling the pieces of the formula you're concerned about; the terms arrange themselves merely as a fact of algebra.

So, if you want to understand how quaternions perform rotations, my GA perspective tells me it's good enough to understand how single vectors are used to perform reflections instead. To me, that's simple enough: the product $nan^{-1}$ can be broken down as follows: $na$ breaks $a$ into a parallel part (which becomes a scalar, from the dot product) and a perpendicular part (which forms a bivector with $n$). Multiplying by $n^{-1}$ on the wrong side maintains the parallel part while changing the sign of the perpendicular part. The overall minus is then required to get the right result for a reflection. A rotation just does this process twice.

  • $\begingroup$ I understand that multiplying two quaternions composes their rotations, but what effect does it have independent of their use as rotations? What is the significance of the 4-D point produced by pq? $\endgroup$
    – JJW5432
    Jun 4 '14 at 23:10
  • $\begingroup$ Sorry, perhaps you could elaborate? Are you trying to interpret a quaternion as something other than a rotation? $\endgroup$
    – Muphrid
    Jun 4 '14 at 23:25
  • $\begingroup$ I guess I am. I'm trying to understand how conjugating by a quaternion creates a rotation by understanding each half of the conjugation, that is what happens when you multiply just two quaternions, before you multiply by the inverse of the first on the right. $\endgroup$
    – JJW5432
    Jun 5 '14 at 0:16
  • $\begingroup$ I've edited some sections in that might be useful, though I don't think I can come up with a good, direct geometric explanation of your question without getting hand-wavy, unfortunately. $\endgroup$
    – Muphrid
    Jun 5 '14 at 5:22
  • $\begingroup$ Thanks for the explanation! I'm okay with hand-wavy, I'm really going for more of an intuitive understanding than a rigorous proof, so if theres anything else you want to include that would aid my understanding, even if it's not rigorous, I would appreciate that. $\endgroup$
    – JJW5432
    Jun 5 '14 at 5:48

"I am trying to understand the geometric significance of the formula for quaternion multiplication in its own right, not as half of a rotation."

Here is a geometric description of what happens. I won't bother to show that the math gives you this result, it will be obvious when you look at it.

First off, let's ignore everything but unit quaternions. If you have two quaternions Q and R, |QR|=|Q||R|. There's nothing special about that. Anything that isn't obvious will happen with unit quaternions too.

You can always describe a quaternion in terms of two separate complex numbers. For example, if you have Q=[t,x,y,z] then one way to split it up is into [t,z] and [x,y]. Two separate complex planes.

Q shows you a way to split things. t and the (x,y,z) vector give one plane A. And in 3 dimensions, if |(x,y,z)| > 0 there is a plane perpendicular to (x,y,z). That's the second plane B. Any quaternion number can be split up into two complex numbers, one in plane A and one in plane B.

Here's what happens to the geometry when you have a quaternion R and you do QR. Split R into two complex numbers, Ra in plane A and Rb in plane B. You rotate Ra by the angle that has t as its cosine and |(x,y,z)| as its sine. You rotate Rb by the same angle.

Here's what happens when you do RQ. You rotate Ra by the same angle as before, and you rotate Rb the opposite direction.

That's all there is to it. You can think of quaternion multiplication as two simultaneous complex rotations.

If you do QRQ then the two rotations in the A plane add, and the two rotations in the B plane cancel.

If you instead find Qinverse and multiply on the right by that, then the two rotations in the B plane add, and the rotations in A cancel.

It's simple and easy to visualize.

Is there anything more to it than that?

Well, there's this. The difference between [t,x,y,z] and [t,-x,-y,-z] is that one way you wind up looking at your B plane upside down. There's nothing special about quaternions in that, those two ways to look at it are inherent in the geometry.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.