For the most common choice of spherical polar coordinates,
x=r\sin\phi\cos\theta,y=r\sin\phi\sin\thea,z=r\cos\phi,0\leq{r},0\leq\phi\leq\pi,0\leq\theta\leq{2}\pi[/itex]<br />
we have the following unit vetors relations:<br />
\vec{i}_{r}=\sin\phi(\cos\theta\vec{i}+\sin\theta\vec{j})+\cos\phi\vec{k}<br />
\vec{i}_{\phi}=\frac{\partial}{\partial\phi}\vec{i}_{r}=\cos\phi(\cos\theta\vec{i}+\sin\theta\vec{j})-\sin\phi\vec{k}<br />
\vec{i}_{\theta}=\frac{1}{\sin\phi}\frac{\partial}{\partial\theta}\vec{i}_{r}=-\sin\theta\vec{i}+\cos\theta\vec{j}<br />
Solving for the Cartesian unit vectors we gain, in particular:<br />
\vec{k}=\cos\phi\vec{i}_{r}-\sin\phi\vec{i}_{\phi}<br />
That is of course equal to the coordinate transformation:<br />
(0,0,1)\to(\cos\phi,0,\sin\phi)<br />
In order to find the correct expressions for the other two unit Cartesian vectors, utilize the intermediate result:<br />
\sin\phi\vec{i}_{r}+\cos\phi\vec{i}_{\phi}=\vec{i}_{\hat{r}}=\cos\theta\vec{i}+\sin\theta\vec{j}[/itex]<br />
\vec{i}_{\hat{r}},\vec{i}_{\theta} are polar coordinate vectors in the horizontal plane.