Rotations of Coordinate System

Transcribed Lecture Notes (Complete Derivations & Diagrams)

1. Change of Coordinate System (2D Case)

For simplicity, let us start with a two-dimensional case. We establish a coordinate system with two mutually perpendicular axes, x1x_1 and x2x_2.

Consider a point PP with position vector r⃗=OP⃗\vec{r} = \vec{OP}, where OO is the coordinate origin. When we rotate the reference frame counter-clockwise by an angle θ\theta, we obtain our new coordinate axes, x1′x_1' and x2′x_2'.

Fundamental Invariance Principle

The physical position of the vector r⃗\vec{r} in physical space does not change; only the reference coordinate system used to measure its coordinates rotates.

Ox₁x₂x₁'x₂'P (r⃗)θθFigure: Counter-clockwise rotation of coordinates by angle θ

Let e^1,e^2\hat{e}_1, \hat{e}_2 be the unit basis vectors along the unprimed axes x1,x2x_1, x_2, and let e^1′,e^2′\hat{e}_1', \hat{e}_2' be the unit basis vectors along the rotated primed axes x1′,x2′x_1', x_2'.

r⃗=OP⃗=x1e^1+x2e^2\vec{r} = \vec{OP} = x_1 \hat{e}_1 + x_2 \hat{e}_2
r⃗=OP⃗=x1′e^1′+x2′e^2′\vec{r} = \vec{OP} = x_1' \hat{e}_1' + x_2' \hat{e}_2'

Resolving the rotated unit vectors along the original axes gives:

e^1′=e^1cos⁡θ+e^2sin⁡θ\hat{e}_1' = \hat{e}_1 \cos\theta + \hat{e}_2 \sin\theta
e^2′=−e^1sin⁡θ+e^2cos⁡θ\hat{e}_2' = -\hat{e}_1 \sin\theta + \hat{e}_2 \cos\theta

Projection and Derivation of Coordinates

Each coordinate is obtained by projecting the position vector onto the respective basis vector:

x1=r⃗⋅e^1,x2=r⃗⋅e^2x_1 = \vec{r} \cdot \hat{e}_1, \quad x_2 = \vec{r} \cdot \hat{e}_2

For the transformed coordinate x1′x_1':

x1′=r⃗⋅e^1′=(x1e^1+x2e^2)⋅e^1′=x1(e^1⋅e^1′)+x2(e^2⋅e^1′)=x1cos⁡θ+x2sin⁡θ\begin{aligned} x_1' &= \vec{r} \cdot \hat{e}_1' \\ &= (x_1 \hat{e}_1 + x_2 \hat{e}_2) \cdot \hat{e}_1' \\ &= x_1 (\hat{e}_1 \cdot \hat{e}_1') + x_2 (\hat{e}_2 \cdot \hat{e}_1') \\ &= x_1 \cos\theta + x_2 \sin\theta \end{aligned}

In the same way, for x2′x_2':

x2′=r⃗⋅e^2′=(x1e^1+x2e^2)⋅e^2′=x1(e^1⋅e^2′)+x2(e^2⋅e^2′)=−x1sin⁡θ+x2cos⁡θ\begin{aligned} x_2' &= \vec{r} \cdot \hat{e}_2' \\ &= (x_1 \hat{e}_1 + x_2 \hat{e}_2) \cdot \hat{e}_2' \\ &= x_1 (\hat{e}_1 \cdot \hat{e}_2') + x_2 (\hat{e}_2 \cdot \hat{e}_2') \\ &= -x_1 \sin\theta + x_2 \cos\theta \end{aligned}

Thus, the 2D coordinate transformation relations are:

x1′=x1cos⁡θ+x2sin⁡θx_1' = x_1 \cos\theta + x_2 \sin\theta
x2′=−x1sin⁡θ+x2cos⁡θx_2' = -x_1 \sin\theta + x_2 \cos\theta
(x1′x2′)=(cos⁡θsin⁡θ−sin⁡θcos⁡θ)(x1x2)\begin{pmatrix} x_1' \\ x_2' \end{pmatrix} = \begin{pmatrix} \cos\theta & \sin\theta \\ -\sin\theta & \cos\theta \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix}

2. 3D Rotation and Direction Cosines

We can scale this derivation up to three-dimensional space. The position vector r⃗\vec{r} expanded in both unprimed and primed orthonormal coordinate systems is:

r⃗=x1e^1+x2e^2+x3e^3\vec{r} = x_1 \hat{e}_1 + x_2 \hat{e}_2 + x_3 \hat{e}_3
r⃗=x1′e^1′+x2′e^2′+x3′e^3′\vec{r} = x_1' \hat{e}_1' + x_2' \hat{e}_2' + x_3' \hat{e}_3'

Taking the dot product of r⃗\vec{r} with e^1′\hat{e}_1':

x1′=r⃗⋅e^1′=(x1e^1+x2e^2+x3e^3)⋅e^1′=x1(e^1′⋅e^1)+x2(e^1′⋅e^2)+x3(e^1′⋅e^3)\begin{aligned} x_1' &= \vec{r} \cdot \hat{e}_1' \\ &= (x_1 \hat{e}_1 + x_2 \hat{e}_2 + x_3 \hat{e}_3) \cdot \hat{e}_1' \\ &= x_1 (\hat{e}_1' \cdot \hat{e}_1) + x_2 (\hat{e}_1' \cdot \hat{e}_2) + x_3 (\hat{e}_1' \cdot \hat{e}_3) \end{aligned}

Direction Cosines Notation

In 3D rotations, instead of a single angle θ\theta, we define direction cosines between the primed and unprimed unit vectors:

aij≡cos⁡θij=e^i′⋅e^ja_{ij} \equiv \cos\theta_{ij} = \hat{e}_i' \cdot \hat{e}_j

where θij\theta_{ij} is the angle between the ii-th new axis and the jj-th old axis.

Therefore, the direction cosine coefficients for the first row are:

a11=e^1′⋅e^1,a12=e^1′⋅e^2,a13=e^1′⋅e^3a_{11} = \hat{e}_1' \cdot \hat{e}_1, \quad a_{12} = \hat{e}_1' \cdot \hat{e}_2, \quad a_{13} = \hat{e}_1' \cdot \hat{e}_3
x1′=x1a11+x2a12+x3a13x_1' = x_1 a_{11} + x_2 a_{12} + x_3 a_{13}

Similarly, for the second coordinate x2′x_2':

x2′=r⃗⋅e^2′=x1(e^2′⋅e^1)+x2(e^2′⋅e^2)+x3(e^2′⋅e^3)=x1a21+x2a22+x3a23\begin{aligned} x_2' &= \vec{r} \cdot \hat{e}_2' = x_1 (\hat{e}_2' \cdot \hat{e}_1) + x_2 (\hat{e}_2' \cdot \hat{e}_2) + x_3 (\hat{e}_2' \cdot \hat{e}_3) \\ &= x_1 a_{21} + x_2 a_{22} + x_3 a_{23} \end{aligned}

In the exact same way for x3′x_3':

x3′=x1a31+x2a32+x3a33x_3' = x_1 a_{31} + x_2 a_{32} + x_3 a_{33}

In matrix notation, the full 3D coordinate transformation becomes:

(x1′x2′x3′)=[a11a12a13a21a22a23a31a32a33](x1x2x3)\begin{pmatrix} x_1' \\ x_2' \\ x_3' \end{pmatrix} = \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix} \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix}

3. General Transformation Matrix & Index Notation

The full direction cosine matrix in terms of unit vector scalar products is:

[a11a12a13a21a22a23a31a32a33]=[(e^1′⋅e^1)(e^1′⋅e^2)(e^1′⋅e^3)(e^2′⋅e^1)(e^2′⋅e^2)(e^2′⋅e^3)(e^3′⋅e^1)(e^3′⋅e^2)(e^3′⋅e^3)]\begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix} = \begin{bmatrix} (\hat{e}_1' \cdot \hat{e}_1) & (\hat{e}_1' \cdot \hat{e}_2) & (\hat{e}_1' \cdot \hat{e}_3) \\ (\hat{e}_2' \cdot \hat{e}_1) & (\hat{e}_2' \cdot \hat{e}_2) & (\hat{e}_2' \cdot \hat{e}_3) \\ (\hat{e}_3' \cdot \hat{e}_1) & (\hat{e}_3' \cdot \hat{e}_2) & (\hat{e}_3' \cdot \hat{e}_3) \end{bmatrix}

We can write each component compactly using summation notation:

xi′=∑j=13aijxjx_i' = \sum_{j=1}^{3} a_{ij} x_j

Einstein Summation Convention

According to Einstein's summation convention, whenever an index is repeated in a single term, a summation over all valid values (1 to 3) is automatically implied:

Einstein Convention
xi′=aijxjx_i' = a_{ij} x_j

Because both basis sets are orthonormal (e^i′⋅e^k′=δik\hat{e}_i' \cdot \hat{e}_k' = \delta_{ik}), the rotation matrix is orthogonal, satisfying aikajk=δija_{ik} a_{jk} = \delta_{ij}, which corresponds to AAT=IA A^T = I and det⁡(A)=+1\det(A) = +1.

4. Multiple Rotations & Euler Angles

We can handle any complex 3D orientation in multiple stages. Before marching to classic Euler angles, let us start with a simpler and widely used formulation: Tait-Bryan angles (x3−x2′−x1′′x_3 - x_2' - x_1'' sequence).

  • Tait-Bryan (x3−x2′−x1′′x_3 - x_2' - x_1''): First rotate about the original x3x_3 axis, then about the intermediate x2′x_2' axis, and finally about x1′′x_1''.
  • Classic Euler Angles (x3−x2′−x3′′x_3 - x_2' - x_3''): Rotations performed about x3x_3, then intermediate x2′x_2', and finally about x3′′x_3''.

First Rotation: About the x3x_3 Axis by Angle θ\theta

Since the rotation is about x3x_3, the x3x_3 coordinate and its basis vector remain unchanged:

x3′=x3,e^3′=e^3x_3' = x_3, \quad \hat{e}_3' = \hat{e}_3

The generalized transformation matrix becomes:

[(e^1′⋅e^1)(e^1′⋅e^2)0(e^2′⋅e^1)(e^2′⋅e^2)0001]\begin{bmatrix} (\hat{e}_1' \cdot \hat{e}_1) & (\hat{e}_1' \cdot \hat{e}_2) & 0 \\ (\hat{e}_2' \cdot \hat{e}_1) & (\hat{e}_2' \cdot \hat{e}_2) & 0 \\ 0 & 0 & 1 \end{bmatrix}

Even though our transformation occurs in a 3D space, the rotation happens within the 2D plane formed by x1,x2x_1, x_2:

e^1′⋅e^1=cos⁡θ,e^1′⋅e^2=sin⁡θ\hat{e}_1' \cdot \hat{e}_1 = \cos\theta, \quad \hat{e}_1' \cdot \hat{e}_2 = \sin\theta
e^2′⋅e^1=−sin⁡θ,e^2′⋅e^2=cos⁡θ\hat{e}_2' \cdot \hat{e}_1 = -\sin\theta, \quad \hat{e}_2' \cdot \hat{e}_2 = \cos\theta

Hence, the transformation matrix for rotation about x3x_3 is:

Rx3(θ)=[cos⁡θsin⁡θ0−sin⁡θcos⁡θ0001]R_{x_3}(\theta) = \begin{bmatrix} \cos\theta & \sin\theta & 0 \\ -\sin\theta & \cos\theta & 0 \\ 0 & 0 & 1 \end{bmatrix}

5. Successive Rotations and Total Matrix

Second Rotation: About Newly Formed x2′x_2' by Angle α\alpha

Evaluating the direction cosines between the newly generated basis vectors e^i′′\hat{e}_i'' and the intermediate primed vectors e^j′\hat{e}_j':

Dot ProductAngular SeparationEvaluated Value
e^1′′⋅e^1′\hat{e}_1'' \cdot \hat{e}_1'Angle α\alphacos⁡α\cos\alpha
e^1′′⋅e^2′\hat{e}_1'' \cdot \hat{e}_2'Angle 90∘90^\circ (Perpendicular)0
e^1′′⋅e^3′\hat{e}_1'' \cdot \hat{e}_3'Angle 90∘+α90^\circ + \alpha−sin⁡α-\sin\alpha
e^2′′⋅e^j′\hat{e}_2'' \cdot \hat{e}_j'Rotation axis unchanged(0,1,0)(0, 1, 0)
e^3′′⋅e^1′\hat{e}_3'' \cdot \hat{e}_1'Angle 90∘−α90^\circ - \alphasin⁡α\sin\alpha
e^3′′⋅e^2′\hat{e}_3'' \cdot \hat{e}_2'Angle 90∘90^\circ0
e^3′′⋅e^3′\hat{e}_3'' \cdot \hat{e}_3'Angle α\alphacos⁡α\cos\alpha

Therefore, the rotation matrix Rx2′(α)R_{x_2'}(\alpha) is:

Rx2′(α)=[cos⁡α0−sin⁡α010sin⁡α0cos⁡α]R_{x_2'}(\alpha) = \begin{bmatrix} \cos\alpha & 0 & -\sin\alpha \\ 0 & 1 & 0 \\ \sin\alpha & 0 & \cos\alpha \end{bmatrix}

Third Rotation: About Newly Formed x1′′x_1'' by Angle β\beta

In the exact same way, executing a rotation about x1′′x_1'' by angle β\beta leaves the first coordinate unchanged:

Rx1′′(β)=[1000cos⁡βsin⁡β0−sin⁡βcos⁡β]R_{x_1''}(\beta) = \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos\beta & \sin\beta \\ 0 & -\sin\beta & \cos\beta \end{bmatrix}

Total Composite Transformation Matrix

The complete transformation matrix describing the entire sequence of rotations is obtained by multiplying the individual rotation matrices in sequence:

Composite Transformation
Tfinal=Rx1′′(β) Rx2′(α) Rx3(θ)T_{\text{final}} = R_{x_1''}(\beta) \, R_{x_2'}(\alpha) \, R_{x_3}(\theta)

Each rotation matrix acts sequentially on the position vector coordinates from right to left.

Watch the Lecture Masterclass