Something is a little bit unclear to me. In the image below you see that you need to divide the angle by a half. Acccording to wikipedia they say that this is so that I could rotate clockwise or counter clockwise. The sine function returns a value between 1 and -1. So I don't understand it. Could somebody explain why I need to divide my angle by a half?

Quaternion rotation

  • $\begingroup$ For the benefit of others: the context is that the quaternion $\mathbf q$ which represents a rotation of $\theta$ about the axis $(a_x,a_y,a_z)$ involves the sine and cosine of $\theta/2$ (and not of $\theta$ as one might naively expect). $\endgroup$ – Rahul Feb 13 '13 at 21:49
  • 2
    $\begingroup$ To be honest, I don't find Wikipedia's explanation very illuminating at all. You can think about it this way instead: The actual rotation is defined by the map $\mathbf x\mapsto\mathbf q\mathbf x\mathbf q^*$. You get a $\theta/2$ from $\mathbf q$ on the left, and another $\theta/2$ from $\mathbf q^*$ on the right, which adds up to a $\theta$. Of course, this is not a rigorous explanation. $\endgroup$ – Rahul Feb 13 '13 at 21:52
  • 1
    $\begingroup$ Another reason: If it were $\cos\theta+\mathbf a\sin\theta$ instead of $\cos\theta/2+\mathbf a\sin\theta/2$, then rotation of $\pi$ about any axis would give you the same result. But you can readily verify that that's not true for rotations in 3D. $\endgroup$ – Rahul Feb 14 '13 at 2:41

In one sense, there is no "reason" as such. Sometimes you just need a constant factor. In this case, however, there is one way of thinking about it which helps: The quaternion represents a directed area, and you're rotating by that area.

Here's why it's the correct area: Consider a sector of a unit circle, where the angle of the sector is $\theta$. (Note that we're all grown-ups here, so we're working in radians.) Then the area of the sector is $\frac{\theta}{2}$. There's that division by two.

What's not obvious, though, is why a quaternion represents an area, or what that even means. That's a little bit too involved for this box, but I'll try to explain how things in 2D, then give an outline of how to fill in the gaps.

Consider a 2D plane with vectors. We'll add two basis vectors, called $\hat{e_1}$ and $\hat{e_2}$ (you may know them as $i$ and $j$ in some notation). We know that vectors have an inner product (a.k.a. dot product) which returns a scalar, commutes and so on. (I won't formally define a vector space or inner product space here; look it up.) The basis vectors are orthonormal:

$$e_1 \cdot e_1 = e_2 \cdot e_2 = 1$$ $$e_1 \cdot e_2 = 0$$

We also know that in 3D, there is another product, the outer product (a.k.a. cross product, Gibbs product), which obeys the laws of a Lie bracket. The outer product anticommutes (i.e. $x \times y = - y \times x$). We could, therefore, think of there being a more general product, where the inner product is the bit that commutes and the outer product is the bit that anticommutes.

So we will assume a geometric product $xy$, which in general neither commutes nor anticommutes. If $x$ and $y$ are vectors, we will define:

$$x \cdot y = \frac{1}{2}(xy + yx)$$ $$x \times y = \frac{1}{2}(xy - yx)$$

You can see that by construction, the inner product commutes and the outer product anticommutes. Moreover, if $x$ and $y$ are vectors:

$$xy = x \cdot y + x \times y$$

The first term is a scalar and the second term would, in 3D, be a vector. This is looking a bit like quaternions already, but let's not get ahead of ourselves. In 2D, there is no cross product, so we need to find out exactly what the outer product means.

Whatever it means, if $x$ is a vector, $xx$ must be a scalar, because the outer product part must be zero (after all, $x \times x = - x \times x$). In particular, ${\hat e_1}{\hat e_1} = {\hat e_2}{\hat e_2} = 1$.

So let's expand $x$ and $y$ in terms of the basis vectors and see what happens.

$$(x_1 \hat e_1 + x_2 \hat e_2)(y_1 \hat e_1 + y_2 \hat e_2) = (x_1 x_2 + y_1 y_2) + (x_1 y_2 + x_2 y_1) {\hat e_1}{\hat e_2}$$

The first part is the inner product; we already know that. The second part is the outer product of two vectors. We don't know what ${\hat e_1}{\hat e_2}$ is, but the thing it's multiplied by is the area of a parallelogram with adjacent sides $x$ and $y$. So it has something to do with area.

To save typing, we will call this quantity (known as a pseudoscalar) $I = {\hat e_1}{\hat e_2}$. Why $I$? Let's multiply it by itself using the geometric product and see what happens. Note that the expansion into inner and outer product is only defined for vectors, and this isn't a vector. But we do know what it does to basis vectors, and in particular that ${\hat e_2}{\hat e_1} = - {\hat e_1}{\hat e_2}$, and so:

$$I^2 = {\hat e_1}{\hat e_2}{\hat e_1}{\hat e_2} = -{\hat e_1}{\hat e_1}{\hat e_2}{\hat e_2} = -1$$

So the geometric product of two vectors can be thought of as a complex number. Again, this is looking a lot like quaternions.

To complete the connection, we need to work out what exponentiation does. We can use the well-known identity that if $I\theta = \theta I$ and $I^2=-1$ then $e^{I\theta} = \cos \theta + I \sin \theta$.

(Incidentally, if $J\theta = \theta J$ and $J^2 = 1$ then $e^{J\theta} = \cosh \theta + J \sinh \theta$. This turns out to be important when you extend this idea to 4D, which you need to do to analyse relativistic space-time.)

You can probably see immediately from this what $e^{I\theta}$ does to vectors in 2D, but I encourage you to work out the theory of it. Then you can impress your physicist friends by telling them you independently invented 2D spinors.

The final piece of the puzzle which connects this to quaternions is that if $v$ is a 3D unit vector represented as a quaternion with no real component, then $v^2 = -1$. The proof is left as an exercise.

You should be able to work the rest out for yourself if you want to. If you don't, I would suggest asking Google about "geometric algebra" or "Clifford algebra". There are some excellent tutorials around on the net.

  • 1
    $\begingroup$ Interesting viewpoint on interpreting spinors as areas. How do you reconcile this idea with the construction of rotations by a pair of reflections? $\endgroup$ – Muphrid Feb 13 '13 at 23:29
  • $\begingroup$ I don't want to go into the whole theory of it because this is already quite long. As a clue, think about what happens in higher dimensions. In Euclidean $n$-space, you reflect about a $n-1$-dimensional hyperplane, but you rotate about a $\frac{n(n-1)}{2}$-dimensional directed area. $\endgroup$ – Pseudonym Feb 14 '13 at 1:41
  • $\begingroup$ Well yeah, that's the number of bivectors in any $n$ dimensional space. But if bivectors are directed areas, how can you geometrically say spinors are also directed areas? What do you do with the scalar part? $\endgroup$ – Muphrid Feb 14 '13 at 4:24
  • $\begingroup$ From Wikipedia page on Spinors: "In applications of spinors in two dimensions, it is common to exploit the fact that the algebra of even-graded elements (which is just the ring of complex numbers) is identical to the space of spinors. So, by abuse of language, the two are often conflated." $\endgroup$ – Pseudonym Feb 14 '13 at 4:35
  • $\begingroup$ One more comment: If $\gamma$ is an even-graded element of $\hbox{Cl}^0_{2,0}$ and $u$ is a vector, then $\gamma u \gamma^* = \gamma^2 u$. This is another possible reason for the $\theta/2$. $\endgroup$ – Pseudonym Feb 14 '13 at 4:37

My understanding of the reason half angles are generally used with quaternions is that when you have a point in 3-D space, $p=(x,y,z)$ which you want to rotate $\theta$ degrees about an axis given by a vector $\vec{v}$:

Write $p$ as a 4-D quaternion that will have real part $0$, just like a point on the $xy$-plane written in 3-D coordinates will have a $z$-coordinate of $0$. Therefore $p=0+xi+yj+zk$

Make a quaternion $q$ to represent the rotaion. You can consider a quaternion to be a 4-D vector that is the axis of rotation vector $\vec{v}$ rotated $\pi-\frac{\theta}{2}$ out of our 3-D space, which means it forms an angle of $\frac{\theta}{2}$ with the $w$-axis. Assuming $\vec{v}$ lies on the unit sphere (if it doesn't, divide by its length), then right now it also lies on the unit hypersphere, since the unit sphere is the "equator" of a unit hypersphere. To rotate it out of 3-D space but keeping it on the hypersphere is very similar to having a vector lying on the $xy$-plane and rotating it upward keeping it on the unit sphere to from angle $\alpha$ with the $z$-axis:

rotate on unit sphere

As you can see, we scale the $xy$-coordinates of the original point $A$ by $\sin{\alpha}$, and the new $z$-coordinate will be just $\cos{\alpha}$. We can do the same to rotate a point on the unit sphere like $\vec{v}$ so it forms an angle $\frac{\theta}{2}$ with the $w$-axis, scaling $\vec{v}$ by $\sin{\frac{\theta}{2}}$ and making the new $w$-coordinate, the real part, $\cos{\frac{\theta}{2}}$so the quaternion will be $\cos{\frac{\theta}{2}} + \sin{\frac{\theta}{2}}\vec{v}$.

It is $\frac{\theta}{2}$ because...

$p'=qpq^{-1}$ will be the a quaternion with real part $0$ (in 3-D space) that corresponds to the point that is the result of the specified rotation. The reason you multiply on one side by $q$ and on the the other by $q^{-1}$ is that a multiplication by just $q$ would produce a $p'$ with real part $\ne 0$, that lies outside of our 3-D space and doesn't make sense because a rotation in 3-D space should produce a point in 3-D space. Essentially by multiplying on the left by $q$ takes you out of our 3-D space and multiplying by the right by $q^{-1}$ brings you back, but with the same real part or angle of rotation each time, kind of like this diagram but 3-D rotation in 4-D space instead of 2-D rotation 3-D space:


THE ANSWER As you can see this keeps us in the plane/space we started in, but ends up doubling $\theta$ as you rotate once by $\theta$ on your way out and once by $\theta$ on your way back. So we use $\frac{\theta}{2}$ so you end up with $\theta$


Although this question was asked and answered quite a while a go I notice that people are still viewing this page. From my point of view quaternions is a subject that is not very much described, relative to for example vectors. Therefore I would like to share some information that was useful to me and I hope that it would benefit other people whom are interested in the subject

I think that a question that often arises when people are confronted with quaternions (for the first time) they might wonder how to get an intuitive understanding about quaternions. For the intuitive approach I would like to recommend to take a look at Möbius strip. Link: http://en.wikipedia.org/wiki/M%C3%B6bius_strip

For a more mathematical treatment about this subject recommend a paper from Jaap Suter. , titled: A Geometric Algebra Primer. Link: http://www.lomont.org/Math/GeometricAlgebra/Geometric%20Algebra%20Primer%20-%20Suter%20-%202003.pdf


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.