I can't seem to come up with a simple formula to head-tail adding two vectors in spherical coordinates. So I'd like to know:

  1. Can anybody point out a way to do it in spherical coordinates (without converting back and forth from cartesian coordinates)?
  2. For the sake of execution speed in a computer program, is it faster to do it straight in spherical coordinates or converting back and forth from cartesian coordinates?

update: to clarify, I'm not talking about the trivial case in which the tails of the two vectors lay in the same point

  • $\begingroup$ Depends: what are you intending to do? Do you want to know the coordinates of the point that you will end up at after moving along a particular vector from some other point? It's important to note that treating coordinates as vectors only works in exceedingly nice coordinate systems (e.g. Cartesian). $\endgroup$ – Zhen Lin Jan 15 '11 at 9:07
  • $\begingroup$ In a computer program I would have a class that contains both representations, and depending on what operation is being performed on the vector it work with the most natural representation. You do have to keep the representations consistent of course, but that's not much overhead (since you would still need only $1$ conversion as opposed to $2$ if you convert back and forth). $\endgroup$ – user2520938 Aug 20 '15 at 9:29

Added: As pointed out by David Zaslavsky in his comment the sum below holds only in the trivial case in which $\overrightarrow{u}_P$, $\overrightarrow{v}_P$ are applied to the same point $P$. If the vectors $\overrightarrow{u}_P$, $\overrightarrow{v}_Q$ are applied to two different points $P,Q$, then the unit vectors $\overrightarrow{e}_{r},\overrightarrow{e}_{\theta },\overrightarrow{e}_{\varphi }$ have different directions, and consequently the sum $\overrightarrow{u}_P+\overrightarrow{v}_Q$ is given by a more complex formula and I do NOT see how to avoid the usual spherical to Cartesian coordinates conversion and back.

If you have two vectors in spherical coordinates

$\overrightarrow{u}=u_{r}\overrightarrow{e}_{r}+u_{\theta }\overrightarrow{e}% _{\theta }+u_{\varphi }\overrightarrow{e}_{\varphi }$

$\overrightarrow{v}=v_{r}\overrightarrow{e}_{r}+v_{\theta }\overrightarrow{e}% _{\theta }+v_{\varphi }\overrightarrow{e}_{\varphi }$

their sum is

$\overrightarrow{u}+\overrightarrow{v}=\left( u_{r}+v_{r}\right) \overrightarrow{e}_{r}+\left( u_{\theta }+v_{\theta }\right) \overrightarrow{% e}_{\theta }+\left( u_{\varphi }+v_{\varphi }\right) \overrightarrow{e}% _{\varphi }$

  • 1
    $\begingroup$ This only applies if the two vectors exist at the same point, though - such as if you had two vector fields and you wanted to add up the values at corresponding points. Because the OP talks about the head-tail method, I suspect that may not be the case here. $\endgroup$ – David Z Jan 14 '11 at 22:38
  • $\begingroup$ @David Zaslavsky, You are right! I updated my answer. $\endgroup$ – Américo Tavares Jan 15 '11 at 0:04

To my knowledge you cannot add vectors in polar / spherical coordinates by adding the components as you would in Cartesian coordinates. This is because even when the tails of the two vectors lie in the same point, the unit vectors in the $r$, $\theta$ and $\phi$ directions have different directions for the two different vectors. This means that the two vectors have e.g. two different $r$-directions and adding the two $r$ components to each other would be like adding apples and pears - something that is not allowed.

Here is a 2D example to prove my point:

Suppose you have two vectors that start in the origin of the coordinate system and respectively point to the two points A(1,0) and B(0,1) in the Cartesian coordinate system. Let's call these two vectors A and B.

In Cartesian coordinates we can add the two vectors by adding their components. Therefore, the sum of the two vectors are: C = A + B = [1 0] + [0 1] = [1 1]. You can draw these three vectors easily and confirm that they form a closed triangle.

Now let's convert the two points to polar coordinates and then do the same calculation. Points A and B in polar coordinates are: A(1,0) and B(1,$\frac{\pi}{2}$). If we now try to add the two vectors by adding their components, we get C = A + B = [1 0] + [1 $\frac{\pi}{2}$] = [2 $\frac{\pi}{2}$].

Converting this back to Cartesian coordinates yields [0 2] $\neq$ [1 1]. You can further confirm that the vector obtained from the polar coordinate addition does not form a closed triangle when drawn together with the two vectors that was added to obtain it.

It might be possible to derive a formula for adding vectors in polar / spherical coordinates, but I expect that this formula will in any case be a (quite complicated / ugly) form of a coordinate transformation.

So in conclusion, as far as I know, the simplest and safest solution is to convert the two vectors to Cartesian coordinates before adding them.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.