# Derivation of rotation formula in a general coordinate system

• ShayanJ
In summary, the rotation formula in a general coordinate system is a mathematical equation that relates the coordinates of a point in one coordinate system to its coordinates in a rotated coordinate system. It is important because it allows us to describe and understand the motion and orientation of objects in three-dimensional space. The key components of the formula include the rotation matrix, rotation angle, and coordinates in both the original and rotated systems. It is derived using principles from linear algebra and vector calculus. The formula has various applications in fields such as physics, engineering, computer graphics, and robotics.

Gold Member

## Homework Statement

[/B]
In a set of axes where the z axis is the axis of rotation of a finite rotation, the rotation matrix is given by

## \left[ \begin{array}{lcr} &\cos\phi \ \ \ &\sin\phi \ \ \ &0 \\ & -\sin\phi \ \ \ &\cos\phi \ \ \ &0 \\ &0 \ \ \ &0 \ \ \ &1 \end{array} \right]##.

Derive the rotation formula

##\vec{r'}=\vec r \cos\phi+\hat n(\hat n \cdot \vec r)(1-\cos\phi)+(\vec r \times \hat n) \sin\phi ##

by transforming to an arbitrary coordinate system, expressing the orthogonal matrix of transformation in terms of the direction cosines of the axis of the finite rotation.

## The Attempt at a Solution

As far as I know, the transformation is ## S'=A^{-1} S A ## where A is a general rotation matrix and its such a big matrix that even writing it down is a tedious thing to do, let alone multiplying it several times with another matrix! Is there any other way to do this?

Thanks

You have:
r'x = rxcosφ + rysinφ
r'y = -rxsinφ + rycosφ
r'z=rz
n=k
r
cosφ =( rxi + ryj + rzk)cosφ
r'xi =( rxcosφ + rysinφ)i
r'yj= (-rxsinφ + rycosφ)j
r'zk=rz k
r
' = ( rxcosφ + rysinφ)i + (-rxsinφ + rycosφ)j + rzk
= rcosφ - rysinφi + rxsinφj -rzcosφk + rzk
= rcosφ + (rxk)sinφ + (k*r)(1-cosφ)k

ShayanJ
Thanks Fred.
Can you generalize your proof for a general ##\hat n## ?

Shyan said:

## Homework Statement

[/B]
In a set of axes where the z axis is the axis of rotation of a finite rotation, the rotation matrix is given by

## \left[ \begin{array}{lcr} &\cos\phi \ \ \ &\sin\phi \ \ \ &0 \\ & -\sin\phi \ \ \ &\cos\phi \ \ \ &0 \\ &0 \ \ \ &0 \ \ \ &1 \end{array} \right]##.

Derive the rotation formula

##\vec{r'}=\vec r \cos\phi+\hat n(\hat n \cdot \vec r)(1-\cos\phi)+(\vec r \times \hat n) \sin\phi ##

by transforming to an arbitrary coordinate system, expressing the orthogonal matrix of transformation in terms of the direction cosines of the axis of the finite rotation.

## The Attempt at a Solution

As far as I know, the transformation is ## S'=A^{-1} S A ## where A is a general rotation matrix and its such a big matrix that even writing it down is a tedious thing to do, let alone multiplying it several times with another matrix! Is there any other way to do this?

Thanks

First note that $R(\hat{n} , \phi)$ leaves the unit vector $\hat{n}$ invariant, i.e., $$R_{ij}n_{j} = n_{i} . \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (1)$$
Also note the following trivial identities
$$\delta_{ij}n_{j} = n_{i} , \ \ \ n_{i} n_{j} n_{j} = n_{i} (\hat{n} \cdot \hat{n}) = n_{i} ,$$ and $$\epsilon_{ijk}n_{j}n_{k} = 0 .$$ So, covariance requires $R_{ij}$ to be of the form
$$R_{ij} = a(\phi) \ \delta_{ij} + b(\phi) \ n_{i}n_{j} + c(\phi) \ \epsilon_{ijk}n_{k} , \ \ \ \ (2)$$ where $a,b,c$ are functions of the only available scalar $\phi$, the rotation angle. Now, if you substitute (2) in (1) and use the above identities, you find $$a + b = 1.$$
Next, consider the special case where $$\hat{n} = \hat{e}_{3} = (0,0,1) .$$
So, $$R_{11}(e_{3},\phi) = a(\phi) = \cos \phi ,$$ and
$$R_{12}(e_{3},\phi) = c(\phi) \epsilon_{123}n_{3} = c(\phi) = - \sin \phi .$$
Substituting these in the general form (2), we obtain
$$R_{ij} = \delta_{ij} \ \cos \phi + n_{i}n_{j} \left(1 - \cos \phi \right) - \epsilon_{ijk} n_{k} \sin \phi .$$ Now, contracting this with $x_{j}$ gives you
$$\bar{x}_{i} = x_{i} \cos \phi + n_{i} \left( \hat{n} \cdot \vec{x}\right) \left( 1 - \cos \phi \right) + \left( \hat{n} \times \vec{x} \right)_{i} \sin \phi .$$
You can also do it geometrically by decomposing the vector $\vec{x}$ into the sum of two vectors: one parallel to $\hat{n}$ and the other perpendicular to $\hat{n}$
$$\vec{x} = \left( \hat{n} \cdot \vec{x}\right) \hat{n} + \vec{x}_{\perp} . \ \ \ (3)$$ So, rotation by an angle $\phi$ will leaves the parallel vector invariant and sends $\vec{x}_{\perp}$ into
$$R \vec{x}_{\perp} = \vec{x}_{\perp} \cos \phi + \left( \hat{n} \times \vec{x}_{\perp} \right) \sin \phi .$$
Since $$\hat{n} \times \vec{x} = \hat{n} \times \vec{x}_{\perp},$$ we find
$$\vec{x} \to R \vec{x} = \left( \hat{n} \cdot \vec{x}\right) \hat{n} + \vec{x}_{\perp} \cos \phi + \left( \hat{n} \times \vec{x} \right) \sin \phi .$$ Now, the final result follow from substituting (3).

BvU and ShayanJ
That was beautiful!
Thanks Sam!

## What is the rotation formula in a general coordinate system?

The rotation formula in a general coordinate system is a mathematical equation that relates the coordinates of a point in one coordinate system to its coordinates in a rotated coordinate system. It is used to describe the rotation of an object or system in three-dimensional space.

## Why is it important to derive the rotation formula in a general coordinate system?

Deriving the rotation formula in a general coordinate system is important because it allows us to describe and understand the motion and orientation of objects in three-dimensional space. It also enables us to perform calculations and make predictions about the behavior of rotating systems.

## What are the key components of the rotation formula in a general coordinate system?

The rotation formula in a general coordinate system is composed of several key components, including the rotation matrix, the rotation angle, and the coordinates of the point in both the original and rotated coordinate systems.

## How is the rotation formula in a general coordinate system derived?

The rotation formula in a general coordinate system is derived using principles from linear algebra and vector calculus. It involves transforming the coordinates of a point from one coordinate system to another using a rotation matrix and the rotation angle.

## What are some applications of the rotation formula in a general coordinate system?

The rotation formula in a general coordinate system is widely used in various fields such as physics, engineering, computer graphics, and robotics. It is used to describe the rotation of objects in 3D space, such as the motion of planets, the rotation of mechanical systems, and the orientation of objects in virtual environments.