# Changing to x,y,z

1. Nov 2, 2008

### Philosophaie

I have an equation:

Br*r + BƟ*Ɵ

BØ = 0

I want to change it into x,y,z. How do I do this?

x=r*cosƟ*sinØ = 0
y=r*sinƟ*sinØ = 0
z=r*cosØ = r

?

2. Nov 3, 2008

### HallsofIvy

Is B a constant? If so then we have $\phi= 0$ which means we are on the z-axis and $\theta$ becomes irrelevant. $\vec{r}$, the unit vector pointing directly away from the origin must be <0, 0, 1> "Br*]b]r[/b] + BƟ*Ɵ" becomes just <0, 0, Bz>.