---
title: "Convert vector to spherical system"
subject: "Electromagnetism"
chapter: 1
key: "semester_3/electromagnetism:convert-vector-spherical-fxyz"
source: https://www.bctengineer.com/q/semester_3/electromagnetism/convert-vector-spherical-fxyz
site: BCT Engineering
---

# Convert vector to spherical system

Electromagnetism · Chapter 1: Introduction

- Asked in: 2074 Asoj, 5 marks
- Video: [How to convert vectors from Cartesian to Spherical Coordinates - Electromagnetic Field Theory #emft](https://www.youtube.com/watch?v=aIJeBbE8XQs) — Ed Sharpener
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_3/electromagnetism/convert-vector-spherical-fxyz
- Whole chapter: https://www.bctengineer.com/md/semester_3/electromagnetism/chapter-1

## Question

Convert the vector F = F_x a_x + F_y a_y + F_z a_z to spherical coordinate 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.

## Answer

**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_x | a_y | a_z |
|---|---|---|---|
| a_r | sinθ 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

```text
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:

```text
| 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

```text
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:

```text
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θ
```

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. How are the spherical components of F obtained?
   A. By projecting F onto each spherical unit vector: F_r = F·a_r, etc.
   B. By adding F_x, F_y, F_z
   C. By taking the cross product of F with a_r
   D. By dividing F by r
   Answer: A. Each spherical component is the dot product of F with the corresponding spherical unit vector. (Key point: Projection method)

2. Which is F_r?
   A. F_x cosθ cosφ + F_y cosθ sinφ - F_z sinθ
   B. F_x sinθ cosφ + F_y sinθ sinφ + F_z cosθ
   C. -F_x sinφ + F_y cosφ
   D. F_x cosφ + F_y sinφ
   Answer: B. a_r = sinθ cosφ a_x + sinθ sinφ a_y + cosθ a_z, so F_r = F·a_r gives the second option. (Key point: F_r expression)

3. Which expression gives F_phi, and why has it no F_z term?
   A. F_x cosφ + F_y sinφ; a_φ has a z part
   B. -F_x sinφ + F_y cosφ; a_φ has no z-component
   C. F_x sinφ - F_y cosφ; a_φ is along z
   D. F_z cosθ; a_φ lies along a_z
   Answer: B. a_φ = -sinφ a_x + cosφ a_y lies in the xy-plane, so its dot product with a_z is zero. (Key point: F_phi expression)

4. How is the inverse (spherical to Cartesian) transformation related to the matrix?
   A. It is the inverse found by cofactors only
   B. It is the negative of the matrix
   C. It is the transpose, because the matrix is orthogonal
   D. It is the same matrix
   Answer: C. The unit vectors are mutually orthogonal, so the matrix is orthogonal and its inverse is its transpose. (Key point: Inverse transformation)

## Related in Electromagnetism

- [Cylindrical vector to spherical](https://www.bctengineer.com/question.md?key=semester_3%2Felectromagnetism%3Acylindrical-vector-to-spherical-rho-sinphi) — Electromagnetism, chapter 1
- [Transform vector to spherical coordinates](https://www.bctengineer.com/question.md?key=semester_3%2Felectromagnetism%3Atransform-vector-spherical-point) — Electromagnetism, chapter 1, asked 2×
- [Express a_x field in cylindrical, spherical](https://www.bctengineer.com/question.md?key=semester_3%2Felectromagnetism%3Aexpress-ax-cylindrical-spherical) — Electromagnetism, chapter 1
- [Express W field in cylindrical, spherical](https://www.bctengineer.com/question.md?key=semester_3%2Felectromagnetism%3Aexpress-w-cylindrical-spherical) — Electromagnetism, chapter 1
- [Vector field to cylindrical at point](https://www.bctengineer.com/question.md?key=semester_3%2Felectromagnetism%3Avector-field-transform-cylindrical) — Electromagnetism, chapter 1
- [Vector P to Q in three systems](https://www.bctengineer.com/question.md?key=semester_3%2Felectromagnetism%3Avector-p-to-q-three-systems) — Electromagnetism, chapter 1

## Related in other subjects

- [Cartesian, cylindrical, spherical conversion](https://www.bctengineer.com/question.md?key=semester_4%2Fcomputer_aided_design%3Acoordinate-systems-conversion) — Computer Aided Design, chapter 2
- [Force-couple system at A; couple is free vector](https://www.bctengineer.com/question.md?key=semester_1%2Fapplied_mechanics%3Aforce-couple-system-point-a-box-couple-free-vector) — Applied Mechanics, chapter 3
- [3D world to viewing coordinate matrix](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Aworld-to-viewing-3d-matrix) — Computer Graphics, chapter 4, asked 2×
- [Problems of Lamport's clock; vector clock](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Alamport-problems-vector-clock) — Distributed System, chapter 5, asked 2×
