Skip to main content

Convert vector to spherical system

Short answer

F_r = F_x sinθ cosφ + F_y sinθ sinφ + F_z cosθ, F_θ = F_x cosθ cosφ + F_y cosθ sinφ − F_z sinθ, F_φ = −F_x sinφ + F_y cosφ. The transformation matrix is orthogonal; inverse uses the transpose. Replace x,y,z with r sinθ cosφ, r sinθ sinφ, r cosθ if needed.

Convert the vector F = F_x a_x + F_y a_y + F_z a_z to spherical coordinate system.

Aim: Write F = F_x a_x + F_y a_y + F_z a_z as F = F_r a_r + F_θ a_θ + F_φ a_φ.

Step 1: Dot products of unit vectors

The spherical components are the projections of F on the spherical unit vectors, F_r = F · a_r and so on. The dot products of the unit vectors are:

a_xa_ya_z
a_rsinθ cosφsinθ sinφcosθ
a_θcosθ cosφcosθ sinφ−sinθ
a_φ−sinφcosφ0

(These follow from a_r = sinθ cosφ a_x + sinθ sinφ a_y + cosθ a_z, and similarly for a_θ and a_φ, using the geometry of the spherical system.)

Step 2: Components

F_r = F_x sinθ cosφ + F_y sinθ sinφ + F_z cosθ
F_θ = F_x cosθ cosφ + F_y cosθ sinφ − F_z sinθ
F_φ = −F_x sinφ + F_y cosφ

In matrix form:

| F_r |   | sinθ cosφ   sinθ sinφ   cosθ  | | F_x |
| F_θ | = | cosθ cosφ   cosθ sinφ  −sinθ  | | F_y |
| F_φ |   | −sinφ       cosφ        0     | | F_z |

Step 3: Express in spherical variables

If F_x, F_y, F_z are functions of x, y, z, replace them using

x = r sinθ cosφ,   y = r sinθ sinφ,   z = r cosθ

(and r = √(x² + y² + z²), θ = cos⁻¹(z/r), φ = tan⁻¹(y/x) for a given point).

The inverse transformation is the transpose of the matrix, because the matrix is orthogonal:

F_x = F_r sinθ cosφ + F_θ cosθ cosφ − F_φ sinφ
F_y = F_r sinθ sinφ + F_θ cosθ sinφ + F_φ cosφ
F_z = F_r cosθ − F_θ sinθ

✓ Answer checked by Claude Opus 5.5 (high effort)

All Electromagnetism chapter 1 questions →