### Taking square root of space rotation

While taking squares is easy, taking square roots may be dangerous. Taking square root of leads to imaginary numbers. Paul Dirac took square root of the Schrödinger equation, and he has created antimatter. Very dangerous. From Wikipedia:

The reaction of 1 kg of antimatter with 1 kg of matter would produce 1.8×1017 J (180 petajoules) of energy (by the mass–energy equivalence formula, E = mc2), or the rough equivalent of 43 megatons of TNT – slightly less than the yield of the 27,000 kg Tsar Bomb, the largest thermonuclear weapon ever detonated.

Now we want to take square roots of rotations. We will see how dangerous it is. We know that quaternions (equivalently elements of the special unitary group produce rotations. We even know the exact formula. Given and quaternion

or, equivalently,

(1)

we have the rotation matrix given as (see Putting a spin on mistakes):

(2)

The matrix is determined by products of the quaternion components. Therefore Taking squares is easy. But how to go from to ? This amounts to taking square root of the rotation. How do we do it? The problem can be solved, for instance, with a computer algebra system. Here is such a solution:

Given matrix define
q(R)=

(3)

and

(4)

Then, with we have
The following REDUCE code verifies this statement:
 OPERATOR R; MATRIX RR(3,3); FOR I:=1:3 DO FOR J:=1:3 DO RR(I,J):=R(I,J); R(1,1):=W^2+X^2-Y^2-Z^2; R(1,2):=2*(X*Y-W*Z); R(1,3):=2*(W*Y+X*Z); R(2,1):=2*(W*Z+X*Y); R(2,2):=W^2-X^2+Y^2-Z^2; R(2,3):=2*(Y*Z-W*X); R(3,1):=2*(X*Z-W*Y); R(3,2):=2*(W*X+Y*Z); R(3,3):=W^2-X^2-Y^2+Z^2; LET X**2=1-Y^2-Z^2-W^2; %LET ABS(W)=W; s:=2*SQRT(TRACE(RR)+1); q0:=s/4; q1:=(R(3,2)-R(2,3))/s; q2:=(R(1,3)-R(3,1))/s; q3:=(R(2,1)-R(1,2))/s; END; 
At first sight it looks innocent. We have verified that we have a solution. What else do we need?
Let’s do a test. We take rotations about z-axis (see Mathematics and sex).

and tilt by angle about y axis to obtain

(5)

We now use the above map from rotation matrices to quaternions, and then stereographic projection. Mathematica draws the following path:

But we know from More recollections that it should look as follows:

Something is evidently going wrong at the bottom pf the plot.
What is going wrong is this: in the formula (3) we divide by When is very close to the calculations become unstable. That is what happens at the bottom of the graph. Mathematica skips the segment for which the precision becomes questionable. Instead of the nice arc, we see a straight line segment there.

In the next post we will be drawing the trajectory of the asymmetric top that is rotating and nutating close to its z axis. In order to avoid instabilities as the one above, we will take special precautions.

### More recollections

The recollections in the last post were incomplete. So, here is the continuation.
We have derived the property

(1)

On the other hand we stressed the fact that

given a unit vector :

(2)

is the rotation matrix that describes the rotation about the axis in the direction by an angle .

From these two properties we can deduce the third one:

If is a rotation, then rotation about the vector by the angle is given by the matrix

(3)

To deduce this last property we use the fact that for any and any invertible we have:

The proof of the above follows by expanding as a power series, and noticing that
I will use spin equivalent of Eq. (3) when explaining how exactly I got the two images from the last post that I am showing again below:

The advantage in using Eq. (3) is that it may be easy to calculate the exponential but not so easy the exponential

Our aim is to draw trajectories in the rotation group made by the asymmetric top spinning about its largest moment of inertia axis, which in our setting is the third axis. As the rotation group is not very graphics friendly, we are using the double covering group or, equivalently, the group of unit quaternions. We then use stereographic projection to project trajectories from the 3-dimensional sphere to 3-dimensional Euclidean space

But first things first. Before doing anything more we first have to translate the above properties into the language of Therefore another recollection is necessary at this point. In Pauli, rotations and quaternions we have defined three spin matrices:

(4)

In Putting a spin on mistakes we have explained that we have the map that associates rotation matrix to every matrix in such a way that for every vector we have

(5)

It follows immediately from the above formula that is a group homomorphism, that is we have

(6)

At the end of Putting a spin on mistakes we have arrived at the formula:

(7)

which tells us that the matrix defined as

(8)

describes the rotation about the direction of the unit vector by the angle at the level.
The map is 2:1. We have Matrices and implement the same rotation. When changes from to the matrix in Eq. (7) describes the full turn, but the matrix becomes rather than . We need to make rotation at the vector level to have rotation at the spin level. That is described by in the exponential in Eq. (7).
At the spin level we then obtain the following analogue of Eq. (\ref:rqr}):

(9)

Now we can finally look back at the images of trajectories. In Seeing spin like an artist we noticed that rotation about the z-axis is described by the matrix

(10)

while rotation by the angle about y-axis is described by the matrix

(11)

describes uniform rotation of the top about its z-axis, when the z-axis of the top and of the laboratory frame are aligned. As observed in Towards the road less traveled with spin that is not an interested path for drawing. To make the path more interesting we tilt the laboratory frame. To this end we use, for instance, the matrix with

(12)

Now the axis of rotation of the top is tilted by 30 degrees with respect to the z-axis of the laboratory frame. We get new path of the evolution in the group

(13)

From Eq. (1) in Chiromancy in the rotation group we can now calculate real parameters For a general matrix the formulas are:

(14)

In our particular case we get:

(15)

We then get rather awfully looking the parametric formulas for the stereographic projection:

(16)

The result (running from to ) is not very interesting – just a circle:

It is better than the straight line with a non tilted top, but not a big deal. But the next thing we want to do is to rotate the tilt axis in the (x,y) plane, that is about the -axis of the laboratory. If we want to rotate by an angle we should replace by – according to Eq. (9). That is we should look at the trajectory:

Now, Since anyway we are are going to run with through the whole interval, we can as well use instead of Therefore we can draw

We can calculate and then Here are the results from my Mathematica code:

(17)

(18)

And here is the resulting of plotting 30 such circles, each for with increasing from 0 t0 180 degrees, every 6 degrees:

It looks like half of a torus. With we get another, larger torus …
In the next posts we will disturb the motion of the top to see what kind of trajectories we will be getting then.

### Mathematics and sex

Nowadays mathematics is almost everywhere. To know some cool mathematics (or mathematician) is nowadays sexy.

Therefore I am helping you here, on this blog, to have better relations in your lives. Just looking at the equations can already make you feel better. When you look for a little at Euler’s equations, you will sleep better. That is why today I recall some of these pretty formulas from the dynamics of spinning bodies.

Repetitio est mater studiorum – repetition is the mother of study/learning, that is what they say. So let us repeat, recollect, before traveling another road. If we climb high enough, then going down will be easy.

It is not that climbing up is difficult. It is not. We can take stairs. But it takeS time. And that is what we are going to do now: take time, do it easy way. Enjoying happy sliding down afterwards.

The two essential ingredients af the asymmetric top spinning in zero gravity are:

1. Euler’s equations
2. Attitude matrix equations

Euler equations, written in terms of the angular momentum vector with components are

(1)

are principal moments of inertia. We assume that our spinning body is asymmetric, therefore are all different from each other, and we will order them as Perhaps it is worthwhile to mention that physics of ordinary materials requires that all three numbers are strictly positive, and that   I have my pet rigid body that is essentially flat, with It looks as on the picture below

It is kind of simple but it shows all the nontrivial behavior that a rigid body can have.

Remark: As noted by Bjab in the discussion of this post, the sentence above is incorrect. At the other end of the spectrum of rigid body shapes there are one-dimensional objects. These are flying rods with They deserve a separate study.

But that is not important now.  What is important is that the components are the components of the angular momentum vector with respect to the noninertial frame that rotates with the body. Its components with respect to the inertial laboratory frame are constant in time. This is “conservation of angular momentum”- one of the most fundamental “laws” of classical mechanics. Why such a law holds, or at least approximately holds, in our Universe is not known. Physicists and philosophers are debating about “the origin of inertia”.  Some say that “because of space”, some say “because of distant parallelism”, some other say “because of distant matter”. We will not worry about these problems now. We have our laboratory inertial frame, we have frame rotating with the body, and we have rotation matrix that maps coordinates in the rotating frame to coordinates in the laboratory frame.

Recall from Angular momentum

Let be an orthonormal frame corotating with the body, and aligned with its principal axes, and let be an inertial laboratory frame, both centered at the center of mass of the body. The two frames are related by time-dependent orthogonal matrix

(2)

The inverse of is denoted by

(3)

and it is often called the attitude matrix. For a rotating body, if are coordinates of a fixed point in the body, then its coordinates in the laboratory system change in time:

(4)

Matrix satisfies differential equation that is essentially nothing more than the definition of the angular velocity vector:

(5)

thus

(6)

where for any vector

(7)

We have

(8)

A couple of comments are due at this point. First of all a careful Reader will notice that in Angular momentum we had

(9)

while now we have

(10)

What is going on?
Several things at once. First we have the map that associates a matrix to every vector. In fact it associates an antisymmetric matrix. The association has the property that is easy to verify: for every vector we have

Acting with the matrix is the same as taking cross product with vector That such an association should exist should be not a surprise. Taking cross-product with a fixed vector is a linear operation, and every linear operation on vectors is implemented by a matrix. However many students who learn about cross products,

do not learn about their relation to antisymmetric matrices and bivectors. And many students that are learning about matrices, operations with them, eigenvalues and eigenvectors, do not learn about cross-product of vectors. Perhaps because the cross-product is particular to 3D?
Anyway, we have this association, and this association has a very nice property of “covariance”: for every orthogonal matrix of determinant one we have:

(11)

That is a very important and very useful property. It can be equivalently expressed as the “covariance of the cross-product”

(12)

But equivalent expression does not replace the proof, and to prove it needs a bunch of simple but lengthy algebraic calculations and taking into account the definitions of cross-product and determinant. It can be easily done with any computer algebra software. I skip it now.
The second thing is the difference between that represents the angular momentum vector in the laboratory frame, and that represents the same vector in the body frame. Our matrix by definition, connects the two representations (see Eq. (4) above, but now we skip the time-dependence):

Now, going back to Eq. (9), we have (again we skip the time dependence)

which solves our puzzle.
Remark
: Above we have used and to distinguish between numerical representation of the same vector with respect to two different frames. But when there is no possibility of a confusion, we can denote a vector by any convenient letter whatsoever.
Let us see how the above recollection of facts can be applied. In Towards the road less traveled with spin there was the following statement:

The vertical z-axis is the natural axis to try to spin the thing. Imagine our top is floating in space, in zero gravity. We take the z-axis between our fingers, and spin the device. If our hand is not shaking too much, our top will nicely spin about the z-axis. This is the most stable axis for spinning.

The corresponding solution of Euler’s equations is where is a constant. The solution of the attitude matrix equation is

I promised to answer the question why is it so.

In general, when we have matrix differential equation of the type:

where is a constant (i.e. time independent) matrix, we can verify that is a solution. In fact, it is the unique solution with the initial data To prove it, one would have to expand into power series, take care about the convergence of the infinite series (no care needed, it is absolutely convergent), and then differentiate term by term. Let us take it for granted that is the case. In the quote from the other post above I used the letters instead of “more adequate”, but, as in the remark above, we are supposed to adjust the meaning to the context. For the matrix in the attitude equation we have so the solution with the property is which, because is a linear map, is the same as
In fact here we have the opportunity to make another application of today’s recollections. Suppose that our spinning top is completely symmetric – a perfect ball spinning one of its axes. Perfect ball means If so, the right side of the Euler’s equations is automatically zero. Therefore any constant vector is a solution. Let us choose a unit vector, so that the absolute value of the angular velocity is 1. That means our top makes a complete rotation about the axis along the vector every units of time. As noticed above the solution of the attitude equation is Therefore is the rotation matrix that describes the rotation about the axis in the direction by an angle . We have already used this fact before, but now it was a good place for recollecting.
After all these recollections we are now ready to look again at the roads that are less traveled.

Of course it is not Albert Einstein who is the author, but, in the age of fake news, who cares?