This section introduces the concept of coordinate transformations, which allow us to express the position of a point in one coordinate system in terms of another rotated coordinate system. We develop the rotation matrix using direction cosines and show how it applies in both two and three dimensions.
target
Learning Objectives
1.Understand how a point's coordinates change when the coordinate axes are rotated.
2.Define direction cosines and use them to construct a rotation matrix.
3.Apply forward and inverse coordinate transformations in 2D and 3D.
4.Construct a rotation matrix for a given rotation angle and compute transformed coordinates.
library_books
Related Topic in Source
menu_bookClassical Dynamics of Particles and Systems
subdirectory_arrow_rightMatrices, Vectors, and Vector Calculus
arrow_rightCoordinate Transformations
Why Do We Need Coordinate Transformations?
Imagine you know the coordinates of a point P as (x1,x2,x3) in a given Cartesian coordinate system. Now suppose someone else is using a different set of axes — one that has been rotated relative to yours. How would you express the same point P in their system (x1′,x2′,x3′)?
This is the central question of coordinate transformations. They provide a systematic way to convert coordinates from one reference frame to another when the two frames differ by a rotation.
The Two-Dimensional Case
Let's start with two dimensions. Suppose the new coordinate axes (x1′,x2′) are obtained by rotating the original axes (x1,x2) by an angle θ. (see Figure 1)
Figure 1
To find the new coordinate x1′, we project the original coordinates onto the new x1′-axis. (See Figure 2, blue lines)
Figure 2
In Figure 2, label the points as k, l, m, n, and r. Then, write the projection of x1 onto x1′ and the projection of x2 onto x1′: projx1′x1=Ok=x1cosθ projx1′x2=Or=x2sinθ
Next, draw a line parallel to kn and another line parallel to the x1′-axis. Let these two lines intersect at point t (see Figure 3).
Figure 3
Since (kntm) is a rectangle, the length nt is equal to the sum of kl and lm: nt=kl+lm. Similarly, since (x2OnP) is a rectangle, we obtain Pn=x2. Using the right triangle (Pnt)△, we have nt=x2sinθ. Therefore, because nt=kl+lm, it follows that nt=kl+lm=x2sinθ. As a result, since x1′=Ok+kl+lm, we obtain x1′=x1cosθOk+x2sinθkl+lm.
Finally, we find the new coordinate x1′ in terms of x1 and x2 by projecting the x1 and x2 coordinates onto the new x1′-axis: x1′=x1cosθ+x2sinθ
Similarly, assign the labels k, l, m, n, and r to the points shown in Figure 4.
Next, determine the projections of x1 and x2 onto the x2′-axis. These projections can be written as projx2′x1=−Om=−x1sinθ projx2′x2=Ok=x2cosθ
These segments represent the components of x1 and x2 along the x2′ direction.
Figure 4
Afterward, draw a line through point r parallel to the segment lP, and draw another line parallel to the x2′-axis. Denote the intersection point of these two lines by t (see Figure 5). This construction helps visualize the geometric relationship between the projections and the rotated coordinate axis.
Figure 5
Since triangles △(mnO) and △(trP) are similar with similarity ratio 1, i.e. △(mnO)∼△(trP), we obtain tP=Om. Moreover, since (klPt) is a rectangle, we have kl=tP, and therefore, using tP=Om, we get kl=Om. From the geometry of the figure (see Figure 5), it follows that lO=Ok−Om Finally, since lO=x2′, Ok=x2cosθ, and Om=x1sinθ, substituting into lO=Ok−Om gives x2′=x2cosθ−x1sinθ
By combining the two results we obtained, we derive two relations between the old and the new coordinates of point P: x1′=x1cosθ+x2sinθx2′=−x1sinθ+x2cosθ
Direction Cosines
To generalize this idea, we introduce a useful notation. The direction cosineλij is defined as the cosine of the angle between the new axis xi′ and the original axis xj: λij=cos(xi′,xj) Each λij tells us how much the j-th original axis contributes to the i-th new axis. Using this notation, the transformation equations become elegant and compact.
info
Direction Cosine Convention
The first index of λij always refers to the new (primed) axis, and the second index refers to the old (unprimed) axis. Think of it as: "How does old axis j relate to new axis i?"
The General Transformation in 3D
In three dimensions, each new coordinate is a linear combination of all three original coordinates, weighted by the appropriate direction cosines:
xi′=j=1∑3λijxj,i=1,2,3
Forward transformation: from original to rotated coordinates.
The inverse transformation — going back from the rotated system to the original — has a very similar form:
xi=j=1∑3λjixj′,i=1,2,3
Inverse transformation: from rotated back to original coordinates. Notice that the indices on λ are swapped.
The Rotation Matrix
It is natural to collect all the direction cosines λij into a square array. This gives us the rotation matrix (also called the transformation matrix): A=λ11λ21λ31λ12λ22λ32λ13λ23λ33 Each row of this matrix contains the direction cosines for one of the new axes. Once you know A, you can transform any point between the two coordinate systems.
lightbulb
Reading the Rotation Matrix
Row i of the matrix A tells you how the new axis xi′ is oriented relative to the original axes. Column j tells you how the original axis xj projects onto all the new axes.
psychology
Example 1 — Rotation of 30° Around the x₃-Axis
A point P has coordinates (2,1,3) in the original system. A second coordinate system is obtained by rotating the x2-axis toward x3 by 30° around the x1-axis (i.e., x1 stays fixed).
Find the rotation matrix A and the coordinates of P in the new system.
chevron_rightShow Solution
Solution Steps
1
Since the rotation is around x1, the x1′-axis coincides with x1. The angles between axes give us the following direction cosines: λ11=cos(0°)=1, λ12=cos(90°)=0, λ13=cos(90°)=0
So the rotation matrix is: A=10000.866−0.500.50.866 Applying the forward transformation: x1′=(1)(2)+(0)(1)+(0)(3)=2 x2′=(0)(2)+(0.866)(1)+(0.5)(3)=2.37 x3′=(0)(2)+(−0.5)(1)+(0.866)(3)=2.10 The point in the new system is approximately P(2;2.37;2.10).
warning
Common Pitfall
Be careful with the angle signs. When computing direction cosines like cos(90°+30°), the supplementary angle accounts for the fact that the new axis has rotated past the perpendicular. Getting the sign wrong here flips the entire axis.