# 3.3 Transformations between Coordinate Systems

The position of a given point in space of course does not depend on the choice of coordinate system. That is, its location is the same irrespective of which specific coordinate system is used to represent it. The same is true for vectors. Nevertheless, certain coordinate systems may be more useful than others in solving a given problem, so it is essential that we have the tools to “translate” the problem from one system to another. In this section, we shall establish the relations between the variables (x,y,z) of the Cartesian system, (r,ϕ,z) of the cylindrical system, and (R,θ,ϕ) of the spherical system. These relations will then be used to transform expressions for vectors expressed in any one of the three systems into expressions applicable in the other two.

# 3.3.1 Cartesian to Cylindrical Transformations

Point P in Fig. 3-16 has Cartesian coordinates (x,y,z) and cylindrical coordinates (r,ϕ,z). Both systems share the coordinate z, and the relations between the other two pairs of coordinates can be obtained from the geometry in Fig. 3-16. They are

r=x 2+y 2+,ϕ=tan−1 y x, (3.51)

and the inverse relations are

x=r cos ϕ,y=r sin ϕ. (3.52)

# Figure 3-16 Interrelationships between Cartesian coordinates (x,y,z) and cylindrical coordinates (r,ϕ,z).

Figure 3 16 Full Alternative Text

Next, with the help of Fig. 3-17, which shows the directions of the unit vectors x ˆ, y ˆ, r ˆ, and ϕ ˆ in the x–y plane, we obtain the relations:

r ˆ⋅x ˆ=cos ϕ,r ˆ⋅y ˆ=sin ϕ, (3.53a)
ϕ ˆ⋅x ˆ=−sin ϕ,ϕ ˆ⋅y ˆ=cos ϕ. (3.53b)

To express r ˆ in terms of x ˆ and y ˆ, we write r ˆ as

r ˆ=x ˆ a+y ˆ b, (3.54)

where a and b are unknown transformation coefficients. The dot product r ˆ⋅x ˆ gives

r ˆ⋅x ˆ=x ˆ⋅x ˆ a+y ˆ⋅x ˆ b=a. (3.55)

# Figure 3-17 Interrelationships between base vectors (x ˆ,y ˆ) and (r ˆ,ϕ ˆ).

Figure 3 17 Full Alternative Text

Comparison of Eq. (3.55) with Eq. (3.53a) yields a=cos ϕ. Similarly, application of the dot product r ˆ⋅y ˆ to Eq. (3.54) gives b=sin ϕ. Hence,

Repetition of the procedure for ϕ ˆ leads to

The third base vector z ˆ is the same in both coordinate systems. By solving Eqs. (3.56a) and (3.56b) simultaneously for x ˆ and y ˆ, we obtain the following inverse relations:

The relations given by Eqs. (3.56a) to (3.57b) are not only useful for transforming the base vectors (x ˆ,y ˆ) into (r ˆ,ϕ ˆ), and vice versa, they also can be used to transform the components of a vector expressed in either coordinate system into its corresponding components expressed in the other system. For example, a vector A=x ˆ A x+y ˆ A y+z ˆ A z in Cartesian coordinates can be described by A=r ˆ A r+ϕ ˆ A ϕ+z ˆ A z in cylindrical coordinates by applying Eqs. (3.56a) and (3.56b). That is,

and, conversely,

The transformation relations given in this and the following two subsections are summarized in Table 3-2.

# Table 3-2 Coordinate transformation relations.

Table 3 2 Full Alternative Text

# Example 3-8: Cartesian to Cylindrical Transformations

Given point P 1=(3,−4,3) and vector A=x ˆ 2−y ˆ 3+z ˆ 4 defined in Cartesian coordinates, express P 1 and A in cylindrical coordinates and evaluate A at P 1.

Solution: For point P 1, x=3, y=−4, and z=3. Using Eq. (3.51), we have

r=x 2+y 2+=5,ϕ=tan−1 y x=−53.1°=306.9°,

and z remains unchanged. Hence, P 1=P 1(5,306.9°,3) in cylindrical coordinates.

The cylindrical components of vector A=r ˆ A r+ϕ ˆ A ϕ+z ˆ A z can be determined by applying Eqs. (3.58a) and (3.58b):

A r=A x cos ϕ+A y sin ϕ=2 cos ϕ−3 sin ϕ,A ϕ=−A x sin ϕ+A y cos ϕ=−2 sin ϕ−3 cos ϕ,A z=4.

Hence,

A=r ˆ(2 cos ϕ−3 sin ϕ)−ϕ ˆ(2 sin ϕ+3 cos ϕ)+z ˆ 4.

At point P, ϕ=306.9°, which gives

A=r ˆ 3.60−ϕ ˆ 0.20+z ˆ 4.

# 3.3.2 Cartesian to Spherical Transformations

From Fig. 3-18, we obtain the following relations between the Cartesian coordinates (x,y,z) and the spherical coordinates (R,θ,ϕ):

R=x 2+y 2+z 2+, (3.60a)
θ=tan−1 x 2+y 2+z, (3.60b)
ϕ=tan−1 y x. (3.60c)

# Figure 3-18 Interrelationships between (x,y,z) and (R,θ,ϕ).

Figure 3 18 Full Alternative Text

The converse relations are

x=R sin θ cos ϕ, (3.61a)
y=R sin θ sin ϕ, (3.61b)
z=R cos θ. (3.61c)

The unit vector R ˆ lies in the r ˆ–z ˆ plane. Hence, it can be expressed as a linear combination of r ˆ and z ˆ as

R ˆ=r ˆ a+z ˆ b, (3.62)

where a and b are transformation coefficients. Since r ˆ and z ˆ are mutually perpendicular,

R ˆ⋅r ˆ=a, (3.63a)
R ˆ⋅z ˆ=b. (3.63b)

From Fig. 3-18, the angle between R ˆ and r ˆ is the complement of θ and that between R ˆ and z ˆ is θ. Hence, a=R ˆ⋅r ˆ=sin θ and b=R ˆ⋅z ˆ=cos θ. Upon inserting these expressions for a and b in Eq. (3.62) and replacing r ˆ with Eq. (3.56a), we have

A similar procedure can be followed to obtain the expression for θ ˆ:

Finally ϕ ˆ is given by Eq. (3.56b) as

Equations (3.64a) through (3.64c) can be solved simultaneously to give the expressions for (x ˆ,y ˆ,z ˆ) in terms of (R ˆ,θ ˆ,ϕ ˆ):

Equations (3.64a) to (3.65c) also can be used to transform Cartesian components (A x,A y,A z) of vector A into their spherical counterparts (A R,A θ,A ϕ), and vice versa, by replacing (x ˆ,y ˆ,z ˆ,R ˆ,θ ˆ,ϕ ˆ) with (A x,A y,A z,A R,A θ,A ϕ).

# Example 3-9: Cartesian to Spherical Transformation

Express vector A=x ˆ(x+y)+y ˆ(y−x)+z ˆ z in spherical coordinates.

Solution: Using the transformation relation for A R given in Table 3-2, we have

A R=A x sin θ cos ϕ+A y sin θ sin ϕ+A z cos θ=(x+y) sin θ cos ϕ+(y−x) sin θ sin ϕ+z cos θ.

Using the expressions for x, y, and z given by Eq. (3.61c), we have

A R=(R sin θ cos ϕ+R sin θ sin ϕ) sin θ cos ϕ+(R sin θ sin ϕ-R sin θ cos ϕ) sin θ sin ϕ+R cos 2 θ=R sin 2 θ(cos 2 ϕ+sin 2 ϕ)+R cos 2 θ=R sin 2 θ+R cos 2 θ=R.

Similarly,

A θ=(x+y) cos θ cos ϕ+(y−x) cos θ sin ϕ−z sin θ,A ϕ=−(x+y) sin ϕ+(y−x) cos ϕ,

and following the procedure used with A R, we obtain

A θ=0,A ϕ=−R sin θ.

Hence,

A=R^A R+θ^A θ+ϕ^A ϕ=R^R−ϕ^R sin θ.

# 3.3.3 Cylindrical to Spherical Transformations

Transformations between cylindrical and spherical coordinates can be realized by combining the transformation relations of the preceding two subsections. The results are given in Table 3-2.

# 3.3.4 Distance between Two Points

In Cartesian coordinates, the distance d between two points P 1=(x 1,y 1,z 1) and P 2=(x 2,y 2,z 2) is given by Eq. (3.12) as

Upon using Eq. (3.52) to convert the Cartesian coordinates of P 1 and P 2 into their cylindrical equivalents, we have

A similar transformation using Eqs. (3.61a) through (3.61c) leads to an expression for d in terms of the spherical coordinates of P 1 and P 2:

# Example 3-10: Vector Component

At a given point in space, vectors A and B are given in cylindrical coordinates by

A=r ˆ 2+ϕ ˆ 3−z ˆ,B=r ˆ+z ˆ.

Determine (a) the scalar component of B, or projection, in the direction of A, (b) the vector component of B in the direction of A, and (c) the vector component of B perpendicular to A.

Solution: (a) Let us denote the scalar component of B in the direction of A as C, as shown in Fig. 3-19. Thus,

C=B⋅a ˆ=B⋅A|A|=(r ˆ+z ˆ)⋅(r ˆ 2+ϕ ˆ 3−z ˆ)4+9+1=2−1 14=0.267.

# Figure 3-19 Vectors A, B, C, and D of Example 3-10.

(b) The vector component of B in the direction of A is given by the product of the scalar component C and the unit vector a ˆ:

C=a ˆ C=A|A|C=(r ˆ 2+ϕ ˆ 3−z ˆ)14×0.267=r ˆ 0.143+ϕ ˆ 0.214−z ˆ 0.071.

(c) The vector component of B perpendicular to A is equal to B minus C:

D=B−C=(r ˆ+z ˆ)−(r ˆ 0.143+ϕ ˆ 0.214−z ˆ 0.071)=r ˆ 0.857−ϕ ˆ 0.214+z ˆ 0.929.

Concept Question 3-7: Why do we use more than one coordinate system?

Concept Question 3-8: Why is it that the base vectors (x ˆ,y ˆ,z ˆ) are independent of the location of a point, but r ˆ and ϕ ˆ are not?

Concept Question 3-9: What are the cyclic relations for the base vectors in (a) Cartesian coordinates, (b) cylindrical coordinates, and (c) spherical coordinates?

Concept Question 3-10: How is the position vector of a point in cylindrical coordinates related to its position vector in spherical coordinates?