Homogeneous transformation matrix (6)

Kinematics & Universal Numerics
July 25, 2019

The axis-angle representation (2).

As promised, we prove today that for every vector 𝐯 in the original coordinate system, the rotation matrix

𝐑=𝐒0Rotz(θ)𝐒0T (1)

indeed rotates 𝐯 around the unit direction 𝐝 by angle θ. Here

𝐒0=[sψcϕcψsϕcψ-cψcϕsψsϕsψ-sϕcϕ]and𝐝=[sϕcψsϕsψcϕ]=𝐒0[001]=𝐒0𝐞1,3. (2)

Recall first

Rotz(θ)=[cθ-sθsθcθ1]soRotz(θ)𝐞1,3=𝐞1,3.

Without loss of generality, we assume 𝐯 is also a unit vector. After the rotation, we let 𝐮 denote the resulting unit vector

𝐮=𝐑𝐯=(𝐒0Rotz(θ)𝐒0T)𝐯. (3)

Our proof consists of two parts:

  1. (i)

    The angle between 𝐝 and 𝐯 equals the angle between 𝐝 and 𝐮. That is, the dot products of these two pairs are equal.

  2. (ii)

    Let 𝐧1 denote the unit vector that is parallel with the cross product of 𝐝 and 𝐯. Similarly, let 𝐧2 be such a vector for 𝐝 and 𝐮. Then the angle between 𝐧1 and 𝐧2 is θ, and their cross product is 𝐝.

We prove (i) first by evaluating directly the dot product.

𝐝T𝐯 =(𝐒0𝐞1,3)T𝐯=𝐞1,3T(𝐒0T𝐯) (substitute 𝐝 using (2))
=𝐞1,3T(Rotz(θ)-1𝐒0-1𝐮) (substitute 𝐮 for 𝐯 using (3))
=(𝐞1,3TRotz(-θ))(𝐒0T𝐮)
=𝐞1,3T𝐒0T𝐮=𝐝T𝐮 (use (2) again).

Therefore, the angle between 𝐝 and 𝐯 and that between 𝐝 and 𝐮 are the same. We denote this angle by α, so 𝐝T𝐯=𝐝T𝐮=cα.

To prove (ii), we first note that

{sα𝐧1=𝐝×𝐯sα𝐧2=𝐝×𝐮.

For any four vectors 𝐚,𝐛,𝐜,𝐝, an identity holds for the following scalar triple product:

(𝐚×𝐛)T(𝐜×𝐝)=(𝐚T𝐜)(𝐛T𝐝)-(𝐚T𝐝)(𝐛T𝐜).

The angle between 𝐧1 and 𝐧2 is revealed by their dot product, so we first derive

(sα𝐧1)T(sα𝐧2)
=(𝐝×𝐯)T(𝐝×𝐮)
=(𝐝T𝐝)(𝐯T𝐮)-(𝐝T𝐮)(𝐝T𝐯) (use the identity)
=𝐯T𝐈𝐮-𝐯T𝐝𝐝T𝐮 (reorganize multiplications)
=𝐯T(𝐈-𝐝𝐝T)𝐮 (do factorization)
=𝐯T(𝐈-𝐝𝐝T)(𝐒0Rotz(θ)𝐒0T)𝐯. (plug in 𝐮 in (3))
=𝐯T(𝐈-𝐒0𝐞1,3𝐞1,3T𝐒0T)(𝐒0Rotz(θ)𝐒0T)𝐯. (plug in 𝐝 in (2))
=𝐯T𝐒0(Rotz(θ)-𝐞1,3𝐞1,3T)𝐒0T𝐯 (simplify and do factorization)
=𝐯T𝐒0[cθ-sθsθcθ0]𝐒0T𝐯 (expand)
=sθ𝐯T𝐒0[-110]𝐒0T𝐯+cθ𝐯T𝐒0[110]𝐒0T𝐯 (separate terms)
=:sθA+cθB (derive scalars A,B below).

We claim

A=𝐯T𝐒0[-110]𝐒0T𝐯=0

because

A=AT =(𝐯T𝐒0[-110]𝐒0T𝐯)T=𝐯T𝐒0[1-10]𝐒0T𝐯
=-𝐯T𝐒0[-110]𝐒0T𝐯=-A.

In essence, this is the proof for 𝐯T𝐀𝐯=0 for any vector 𝐯 and a skew-symmetric matrix 𝐀. A matrix is skew-symmetric if it is the opposite of its transpose: 𝐀T=-𝐀.

For the second scalar B, we have

B =𝐯T𝐒0[110]𝐒0T𝐯
=𝐯T𝐒0(𝐈-𝐞1,3𝐞1,3T)𝐒0T𝐯
=𝐯T𝐒0𝐒0T𝐯-𝐯T(𝐒0𝐞1,3)(𝐒0𝐞1,3)T𝐯
=1-𝐯T𝐝𝐝T𝐯
=1-cα2=sα2,

for 𝐒0𝐞1,3=𝐝 by (2). Hence

(sα𝐧1)T(sα𝐧2)=(𝐝×𝐯)T(𝐝×𝐮)=sα2cθ,

and thus

sα2(𝐧1T𝐧2-cθ)=0.

If sα=0 and hence α=0 or π, then vectors 𝐝,𝐯,𝐮 align, so the rotation angle θ simply does not matter. Otherwise if sα0 and hence α0 nor π, then 𝐝 and 𝐯 do not align, so

𝐧1T𝐧2=cθ,

which means that the rotation is indeed θ.

Lastly, it is simple to show

(sα𝐧1)×(sα𝐧2) =(𝐝×𝐯)×(𝐝×𝐮)=sα2𝐝,

because 𝐝 is perpendicular to both 𝐝×𝐯 and 𝐝×𝐮 and

|𝐝×𝐯|=|𝐝×𝐮|=sα.

In case where sα0, we have

𝐧1×𝐧2=𝐝,

which means that the rotation axis is indeed 𝐝.