Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Dot product in spherical coordinates

  1. Sep 18, 2011 #1
    1. The problem statement, all variables and given/known data
    What is the dot product of two unit vectors in spherical coordinates?

    2. Relevant equations
    AB = ||A|| ||B|| cos([itex]\theta[/itex]) = cos([itex]\theta[/itex])

    3. The attempt at a solution

    The above equation is the only relevant form of the dot product in terms of the angle [itex]\theta[/itex] that I can find. However, I'm not sure if the spherical coordinates need a term for [itex]\phi[/itex]. If so, is this correct?

    AB = ||A|| ||B|| cos([itex]\theta[/itex]) sin([itex]\phi[/itex]) = cos([itex]\theta[/itex]) sin([itex]\phi[/itex])
    Last edited: Sep 18, 2011
  2. jcsd
  3. Sep 18, 2011 #2
    Unit vectors in spherical coordinates are

    i = cos(φ)cos(θ)ρ + cos(φ)cos(θ)φ - sin(θ)θ
    j = sin(φ)sin(θ)ρ + cos(φ)sin(θ)φ + cos(θ)θ
    k = cos(φ)ρ - sin(φ)φ
  4. Sep 18, 2011 #3
    Ah, sorry, by "unit vector" all I meant was both vectors have unit length, so ||A|| ||B|| = 1. Even if this didn't apply, I'm wondering if AB = ||A|| ||B|| cos([itex]\theta[/itex]) sin([itex]\phi[/itex]).
  5. Sep 18, 2011 #4
    No, your formula is incorrect.
  6. Sep 18, 2011 #5
    A spherical coordinate system is a coordinate system for three-dimensional space where the position of a point is specified by three numbers.
  7. Sep 18, 2011 #6
    So if I have two vectors, they can each be described by the angles [itex]\theta[/itex] and [itex]\phi[/itex], roughly equivalent to the azimuth and the altitude of a sphere, right? So what I'd like to know is what the dot product is between two vectors in terms of these angles. I know, at least in cartesian coordinates, that the dot product is equal to ||A|| ||B|| cos([itex]\theta[/itex]). If I'm describing the dot product of two vectors in three dimensional space, does this still apply, or do I need to take [itex]\phi[/itex] into account?
  8. Sep 18, 2011 #7
    Like I said you need three numbers to describe a point in spherical coordinates, namely ρ, θ, and φ. θ and φ are not enough.
  9. Sep 18, 2011 #8
    Ah, of course, sorry I misunderstood. In this case I believe [itex]\rho[/itex] is equal to 1. Is there a way to use the i, j and k identities you mentioned to express the dot product in terms of [itex]\rho[/itex], [itex]\theta[/itex] and [itex]\phi[/itex]?
  10. Sep 18, 2011 #9
    I do not understand your question. Perhaps you are talking about the cross product or the divergence. The divergence is like the dot product of the del operator and the vector function F. i.e. div F = F.
  11. Sep 18, 2011 #10
    Hmm... I don't think the divergence is what I'm looking for exactly. Basically, this is the setup: there are two vectors centered on the origin. I know [itex]\rho[/itex], [itex]\theta[/itex] and [itex]\phi[/itex]. How do I express the dot product of the two vectors in these terms?
  12. Sep 18, 2011 #11
    Can you convert from spherical to Cartesian coordinates?
  13. Sep 18, 2011 #12
    I think I know what you mean. Two compute <ρ1, φ1, θ1>⋅<ρ2, φ2, θ2> express spherical coordinates in terms of Cartesian coordinates (x, y, z) and use the fact that cos(θ1)cos(θ2) + sin(θ1)sin(θ2) = cos(θ1 - θ2).
  14. Sep 18, 2011 #13
    Hint: <x1, y1, z1>⋅<x2, y2, z2> = ρ1sin(φ1)cos(θ12sin(φ2)cos(θ2) + ...
  15. Sep 18, 2011 #14
    Thanks for all of your help glebovg, I think I'm on the right track. One thing though: I'd like to be able to express it in terms of the angles [itex]\theta[/itex] and [itex]\phi[/itex] between the two vectors, so there's only one value of [itex]\theta[/itex] and [itex]\phi[/itex] ([itex]\rho[/itex], too, but that is equal to 1 and won't show up, I believe).

    Here is an example for two vectors in 2D, using [itex]\theta[/itex]:
    http://meandmark.com/vectorpart4.html" [Broken]

    What would the equivalent be if I needed [itex]\theta[/itex] and [itex]\phi[/itex] to describe the two vectors?
    Last edited by a moderator: May 5, 2017
  16. Sep 18, 2011 #15
    If you are looking for an equivalent of ab = |a||b|cos(θ) just use the hint I gave you and you will derive the general formula.

    Note that <x1, y1, z1>⋅<x2, y2, z2> = ab.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook