Rotation matrix and Pythagorean theorem relation

matricespythagorean triplesrotations

From Wikipedia, the trace of the product of $R_z, R_y$, and $R_x$ is equal to $1 + 2\cos(\theta)$. Solving for $\theta$, we get $\theta$ = $\arccos\left(\frac{\text{trace} – 1}{2}\right)$.
What is interesting, is that $\theta$ can be closely approximated with the Pythagorean theorem. Is this a known relation?

For example, suppose a frisbee is thrown with an angle $\alpha$ of $45^\circ$, an angle $\beta$ of $20^\circ$, and an angle $\gamma$ of $0^\circ$. The rotation matrices would be as follows:

$R_x = \begin{bmatrix}1 & 0 & 0 \\\ 0 & \cos(45) & -\sin(45) \\\ 0 & \sin(45) & \cos(45)\end{bmatrix}$

$R_y = \begin{bmatrix}\cos(20) & 0 & \sin(20) \\\ 0 & 1 & 0 \\\ -\sin(20) & 0 & \cos(20)\end{bmatrix}$

$R_z = \begin{bmatrix}\cos(0) & -\sin(0) & 0 \\\ \sin(0) & \cos(0) & 0 \\\ 0 & 0 & 1\end{bmatrix}$

Plugging that into MATLAB, we get:

$R_{zyx} = \begin{bmatrix}0.9397 & 0.2418 & 0.2418 \\\ 0 & 0.7071 & -0.7071 \\\ -0.3420 & 0.6645 & 0.6645\end{bmatrix}$

Taking the trace of the above, we have:

$\text{trace} = R(1,1) + R(2,2) + R(3,3) = 0.9397 + 0.7071 + 0.6645 = 2.3113$

$\theta$ = $\arccos\left(\frac{2.3113 – 1}{2}\right) = 0.8558rad$

Compared to the Pythagorean theorem:

$\theta = \sqrt{\alpha^2 + \beta^2} = 0.8595rad$

Is this a known relation?

Best Answer

This can be explained for small angles using quaternions. A quaternion is a formal sum fo a scalar and a 3D vector (called its real and imaginary parts). A rotation around a directed axis, represented by a unit vector $\mathbf{v}$, by an angle of $\theta$, is represented by the unit quaternion

$$\exp(\alpha\mathbf{v})=\cos(\alpha)+\sin(\alpha)\mathbf{v}.$$

Multiplication of quaternions corresponds to composition of rotations. For any two perpendicular vectors $\mathbf{u}$ and $\mathbf{v}$, their product $\mathbf{uv}$ is also pure imaginary and is perpendicualr to both of them. Thus, if we write

$$ \exp(\theta\mathbf{w})=\exp(\alpha\mathbf{u})\exp(\beta\mathbf{v}) $$

we can look at just the scalar (aka real) parts of both sides and say

$$ \cos(\theta)=\cos(\alpha)\cos(\beta). $$

We can approximate $\cos \nu\approx 1-\frac{1}{2}\nu^2$ for small angles $\nu=\theta,\alpha,\beta$ to get

$$ \Bigl(1-\frac{\theta^2}{2}\Bigr)\approx\Bigl(1-\frac{\alpha^2}{2}\Bigr)\Bigl(1-\frac{\beta^2}{2}\Bigr). $$

Similarly if we approximate $\alpha^2\beta^2\approx0$ we can rewrite the above simply as

$$ \theta^2\approx\alpha^2+\beta^2. $$

I can't say I've seen this approximation specifically, but it follows from the standard quaternion representation for rotations and standard small-angle approximations.


From a more general viewpoint, if we write $e^Xe^Y=e^Z$ for elements $X,Y,Z$ of a matrix lie algebra $\mathfrak{g}$ and $e^X,e^Y,e^Z$ elements of the matrix Lie group $G$, we have $Z=X+Y+$ higher order terms (BCH formula for the full series). If we write $Z\approx X+Y$ as $\theta W\approx\alpha U+\beta V$, we assume $U,V,W$ have equal magnitude and know (by hypothesis) $U,V$ are orthogonal with respect to the Frobenius norm, so taking the squared norm of both sides also yields the approximation $\theta^2\approx\alpha^2+\beta^2$.

Related Question