---
title: "Point transformation rectangular-spherical"
subject: "Electromagnetism"
chapter: 1
key: "semester_3/electromagnetism:coordinate-point-transform-spherical"
source: https://www.bctengineer.com/q/semester_3/electromagnetism/coordinate-point-transform-spherical
site: BCT Engineering
---

# Point transformation rectangular-spherical

Electromagnetism · Chapter 1: Introduction

- Asked in: 2067 Shrawan, 3 marks
- Video: [Conversion between Cartesian and Spherical Coordinate Systems Electromagnetics](https://www.youtube.com/watch?v=ZNMDlW202s8) — GRADplus
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_3/electromagnetism/coordinate-point-transform-spherical
- Whole chapter: https://www.bctengineer.com/md/semester_3/electromagnetism/chapter-1

## Question

Transform a point (x, y, z) in rectangular co-ordinates to a point (r, θ, φ) in spherical co-ordinates and vice-versa.

## Short answer

Rectangular to spherical: r = √(x²+y²+z²), θ = cos⁻¹(z/r), φ = tan⁻¹(y/x) with quadrant. Spherical to rectangular: x = r sinθ cosφ, y = r sinθ sinφ, z = r cosθ. Example: (1,1,√2) gives r=2, θ=45°, φ=45°.

## Answer

A point can be located by (x, y, z) in rectangular coordinates or by (r, θ, φ) in spherical coordinates, where r is the distance from the origin, θ is the polar angle measured from the +z axis (0 ≤ θ ≤ π) and φ is the azimuth angle measured from the +x axis in the xy-plane (0 ≤ φ < 2π).

```text
              z
              │   P(r, θ, φ)
              │  ╱│
              │θ╱ │
              │╱  │
              ●───┼──── y
             ╱ ╲φ │
            x    ╲│
```

#### Rectangular to spherical

```text
r = √(x² + y² + z²)            (r ≥ 0)
θ = cos⁻¹ ( z / √(x² + y² + z²) )   (0 ≤ θ ≤ π)
φ = tan⁻¹ ( y / x )            (take the quadrant from the signs of x and y)
```

#### Spherical to rectangular

```text
x = r sinθ cosφ
y = r sinθ sinφ
z = r cosθ
```

**How the relations arise:** The projection of OP on the xy-plane is ρ = r sinθ. Resolving ρ along x and y gives x = ρ cosφ and y = ρ sinφ, and the z-component is r cosθ. Squaring and adding gives x² + y² + z² = r².

**Example:** P(1, 1, √2): r = √(1 + 1 + 2) = 2, θ = cos⁻¹(√2/2) = 45°, φ = tan⁻¹(1) = 45°. Back: x = 2 sin45° cos45° = 1, y = 1, z = 2 cos45° = √2. ✓

## Check yourself

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

1. Which relation gives theta from (x, y, z)?
   A. theta = tan^-1(y/x)
   B. theta = cos^-1(z / sqrt(x²+y²+z²))
   C. theta = sin^-1(z)
   D. theta = tan^-1(z/x)
   Answer: B. theta is measured from the +z axis, so cosθ = z/r. (Key point: Rectangular to spherical)

2. Which set is correct?
   A. x = r cosθ cosφ, y = r cosθ sinφ, z = r sinθ
   B. x = r sinθ cosφ, y = r sinθ sinφ, z = r cosθ
   C. x = r sinφ cosθ, y = r cosφ sinθ, z = r cosθ
   D. x = r cosφ, y = r sinφ, z = r cosθ
   Answer: B. The xy projection is rho = r sinθ, resolved by phi into x and y, and z = r cosθ. (Key point: Spherical to rectangular)

3. Which statement is correct about theta and phi?
   A. Both range from 0 to 2π
   B. theta is 0 to π from +z; phi is the azimuth, with its quadrant taken from the signs of x and y
   C. phi is measured from the z axis
   D. theta is measured from the x axis
   Answer: B. θ runs 0 to π from +z, and φ runs 0 to 2π from +x, so the quadrant of tan^-1(y/x) must be fixed from the signs of x and y. (Key point: Range of angles and quadrant)

## Related in Electromagnetism

- [Transform vector to spherical coordinates](https://www.bctengineer.com/question.md?key=semester_3%2Felectromagnetism%3Atransform-vector-spherical-point) — Electromagnetism, chapter 1, asked 2×
- [Cylindrical vector to spherical](https://www.bctengineer.com/question.md?key=semester_3%2Felectromagnetism%3Acylindrical-vector-to-spherical-rho-sinphi) — 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
- [Transform vector to cylindrical coordinates](https://www.bctengineer.com/question.md?key=semester_3%2Felectromagnetism%3Atransform-vector-cylindrical-yxz) — Electromagnetism, chapter 1, asked 3×
- [Transform vector B to cylindrical](https://www.bctengineer.com/question.md?key=semester_3%2Felectromagnetism%3Atransform-vector-b-cylindrical) — Electromagnetism, chapter 1, asked 2×
- [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

- [Long line by short model and vice versa](https://www.bctengineer.com/question.md?key=semester_4%2Fpower_system_analysis_i%3Along-line-short-model-vice-versa) — Power System Analysis I, chapter 5, asked 2×
- [4-point DFT by linear transformation](https://www.bctengineer.com/question.md?key=semester_4%2Fsignals_and_systems%3Adft-linear-transformation) — Signals and Systems, chapter 3
- [Rectangular foundation, stress at point P](https://www.bctengineer.com/question.md?key=semester_4%2Fsoil_mechanics%3Arectangular-foundation-point-p-stress) — Soil Mechanics, chapter 8
- [Cartesian, cylindrical, spherical conversion](https://www.bctengineer.com/question.md?key=semester_4%2Fcomputer_aided_design%3Acoordinate-systems-conversion) — Computer Aided Design, chapter 2
