1

Given two normalized quaternions $p$ and $q$, what do the following products compute, in terms of relative differences in rotation between the two quaternions?

  • $qp^{-1}$
  • $q^{-1}p$
  • $pq^{-1}$
  • $p^{-1}q$

I assume one of these represents the relative rotation from $p$ to $q$, but I have seen conflicting information about which of these formulas represents that difference. I assume that $p^{-1}q \neq qp^{-1}$, because otherwise this would imply that $q = pqp^{-1}$ (and also because rotations do not commute).

Second question: how should $pqp^{-1}$ and $p^{-1}qp$ be interpreted?

  • 1
    I have seen conflicting information about which of these formulas represents that difference - The key point is that you need to understand precisely how you are representing a rotation as a quaternion. There are different ways to do this which leads to different interpretations of what $p$ or $pq$ means. – Kimball Aug 04 '20 at 14:39
  • @Kimball can you please elaborate? – Luke Hutchison Aug 06 '20 at 03:20
  • For instance, in the answer below $v \mapsto p v p^{-1}$ is the representation used, but you could also do $v \mapsto p^{-1} v p$. See also https://math.stackexchange.com/q/331539/11323 and https://math.stackexchange.com/q/3682934/11323. – Kimball Aug 06 '20 at 12:43

1 Answers1

1

For me, a quaternion is a scalar plus a 3D vector. These can be called the real and imaginary parts.

Perpendicular vectors anticommute (i.e. $\mathbf{uv}=-\mathbf{vu}$) and parallel vectors commute. Scalars are central; they commute with everything. The square roots of $1$ are scalars $\pm1$ and the square roots of $-1$ are precisely the unit 3D vectors. The absolute value of a quaternion $p=a+\mathbf{v}$ is $|p|=\sqrt{a^2+\|\mathbf{v}\|^2}$. This is multiplicative, i.e. $|pq|=|p||q|$ for all $p,q$. Every nonzero quaternion has a polar form $r=e^{\theta\mathbf{u}}=r(\cos\theta+\sin\theta\mathbf{u})$ where $r=|p|$ is the magnitude, $\theta$ is a convex angle, and $\mathbf{u}$ is $p$'s normalized imaginary part. (This is unique except if $p$ is one of $-1,0,1$.)

Incidentally, how should $pqp^{-1}$ be interpreted?

If $\mathbf{v}$ is a 3D vector and $p=re^{\theta\mathbf{u}}$ then $p\mathbf{v}p^{-1}$ is $\mathbf{v}$ rotated around the oriented $\mathbf{u}$-axis by $2\theta$. Note there is some redundancy: $r$ doesn't matter and $\pm p$ effect the same rotation. Thus $pqp^{-1}$ will have the effect of rotating $q$'s imaginary part by $2\theta$ around $p$'s imaginary part (as an axis).

4D rotations, interpreted as functions which turn quaternions into quaternions, are all of the form $x\mapsto axb$ for unit quaternions $a$ and $b$, with some redundancy: $(a,b)$ and $(-a,-b)$ effect the same rotation.

Given any two unit quaternions $p$ and $q$, there will be infinitely many 4D rotations that turn $p$ into $q$ or vice-versa. The ones which are left or right multiplications are unique, though: for mapping $p$ to $q$ they are $x\mapsto (qp^{-1})x$ or $x\mapsto x(p^{-1}q)$, or for $q$ to $p$ they are $x\mapsto (pq^{-1})x$ or $x\mapsto x(q^{-1}p)$, respectively. In some sense, these are not "minimum energy," or the most efficient, rotations that do this (but nor are they quite the "maximum energy" ones either...).

The "minimum energy" rotation turning $p$ into $q$ is "halfway" between these, however: it is given by the expression $x\mapsto \sqrt{qp^{-1}}x\sqrt{p^{-1}q}$, where square roots are taken by halving convex angles in polar form, which I discuss in my answer here.

In 3D we can think of the "energy" of a rotation as the size of the (convex) angle it rotates by - the bigger the angle the greater the energy. Given two 3D unit vectors $\mathbf{u}$ and $\mathbf{v}$ (distinct, not antipodal), the "maximum energy" rotation is by $180^{\circ}$ around midpoint between them, and "minimum energy" rotation is by the angle between them around the axis perpendicular to the plane they span.

In 4D, every rotation is by two angles in two orthogonal planes (uniquely determined if the convex angles are distinct), and the "energy" is an increasing function of both angles. More precisely, we can measure the "energy" of a rotation matrix $R$ as $\|R-I\|^2$ where $I$ is the identity matrix and we use the Frobenius norm $\|A\|^2=\mathrm{tr}(A^TA)=\sum |a_{ij}|^2$.

anon
  • 151,657
  • Ah, so you're saying $p^{-1}q$ and $qp^{-1}$ ultimately represent the same relative rotation from $p$ to $q$, however those two products represent different rotational paths from $p$ to $q$? – Luke Hutchison Aug 04 '20 at 07:11
  • 1
    They do rotate $p$ to $q$ along different paths. Which means they don't "represent the same rotation," they are different rotations even though they both slide $p$ to $q$. – anon Aug 04 '20 at 07:16
  • So is it true that given quaternions $p$ and $q$, the following four expressions ultimately all produce the "same effectual rotation" (looking only at the end result of the rotation, not the path taken), although each of the four "follows a different path"?: (1) $p^{-1} q$; (2) $p q^{-1}$; (3) $q^{-1} p$; (4) $q p^{-1}$. – Luke Hutchison Sep 03 '20 at 05:14
  • 1
    No. Left-multiplying by $qp^{-1}$ or right-multiplying by $p^{-1}q$ will both turn $p$ into $q$, but in general these are still different rotations! If by "same effectual rotation" you merely mean they move $p$ to the same place, then sure, but that should be phrased as "have the same effect on $p$" since they still have different effects on other points besides $p$! Similarly for left-multiplying by $pq^{-1}$ and right-multiplying by $q^{-1}p$ both moving $q$ to $p$; these don't move other points to the same place as they do for $q$. – anon Sep 04 '20 at 04:12
  • Thanks, and yes, I'm concerned only about the effect on the moved point. Can you please clarify what you mean by left-multiplying and right-multiplying? I thought quaternions in a chain of multiplications were always in concept applied in right-to-left order? But I think you're saying that $(qp^{−1})v(qp^{−1})^{-1}$ and $(p^{−1}q)v(p^{−1}q)^{-1}$ both have the same effect on a vector $v$? – Luke Hutchison Sep 04 '20 at 04:57
  • 1
    No. Left-multiplication-by-$a$ means the function $L_a(x):=ax$ and right-multiplying-by-$b$ means the function $R_a(x):=xa$. Of course, the conjugation action $C_a(x)=(L_a\circ R_a^{-1})(x)=axa^{-1}$ is important for 3D rotations, but both left and right multiplications independently are important for 4D rotations. I am saying $L_{qp^{-1}}(p)=q$ and $R_{p^{-1}q}(p)=q$, but I am not saying $L_{qp^{-1}}(v)=R_{p^{-1}q}(v)$ for all $v$! Similarly $L_{pq^{-1}}(q)=p$ and $R_{q^{-1}p}(q)=p$ but $L_{pq^{-1}}\ne R_{q^{-1}p}$ are not the same function. – anon Sep 04 '20 at 05:01
  • 1
    Also, none of these four quotients conjugate $p$ to $q$ or vice-versa; as I pointed out in my answer, you have to take the square root for that, because conjugating by a versor rotates by twice the angle in that versor's polar form ("versor" means "unit quaternion" which has polar form $e^{\theta\mathbf{u}}$). – anon Sep 04 '20 at 05:04
  • Sorry, I should have phrased my question more succinctly. What is the right way to think about the difference between left and right rotations? I was taught that concatenating rotations in left multiplication order composes them in sequence of application, and I know that $(pq)^{-1} = q^{-1}p^{-1}$, but I'm unsure how to interpret the opposite (right) application order, e.g. $qp$, when $q$ "happens before" $p$. – Luke Hutchison Sep 04 '20 at 23:44
  • 1
    Suppose $p=\exp(\theta{\bf u})$ with $\mathbf{u}$ a unit vector and $\theta$ convex. Extend ${{\bf u}}$ to an ordered, oriented basis ${{\bf u},{\bf v},{\bf w}}$ of $\Bbb R^3$. Both $L_p$ and $R_p$ rotate by $\theta$ in the $1{\bf u}$-plane and the $\bf vw$-plane, however $R_p$ rotates the opposite direction in the latter plane (i.e. from ${\bf v}$ towards $-\bf w$). These are called "left isoclinic" and "right isoclinic" rotations respectively. Inverting $R_p$ and combining them for conjugation makes them cancel in the $1{\bf u}$-plane and double in the other... – anon Sep 05 '20 at 06:28
  • 1
    ... which means if we restrict to $\Bbb R^3$, the conjugation $C_p(x)=pxp^{-1}$ will rotate around the $\bf u$-axis (i.e. in the $\bf vw$-plane) by $2\theta$. I've explained this in multiple places on MSE under multiple accounts - this one is probably the most recent and relevant. – anon Sep 05 '20 at 06:28