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

3D Vector Help

  1. Nov 18, 2006 #1
    Hi,

    If you have 2 3d vectors a and b, i.e (1,2,3) and (3,4,5) how would you calculate the angle between them?

    Thanks for any advice,
    Karla
     
  2. jcsd
  3. Nov 18, 2006 #2
    Draw a right triangle.

    Edit-Nevermind, I misread the question.
     
  4. Nov 18, 2006 #3

    JasonRox

    User Avatar
    Homework Helper
    Gold Member

    As far as I'm concerned, it is the same thing as doing it in R^2.
     
  5. Nov 18, 2006 #4

    robphy

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Dot's the answer.
     
  6. Nov 19, 2006 #5
    Any none cryptic ways for working this out? How can the dot product be used? I know a formula for 2d angle calculating but i cant find any info for 3d? And what is R^2 exactly?
     
  7. Nov 19, 2006 #6

    Hootenanny

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    [itex]\Re^2[/itex] is (real) 2-space, or 2D. [itex]\Re^3[/itex] would be 3-space (3D) etc. None of the above post's were cryptic in the slightest (except the first one in which the author acknowledged was erroneous). What is the formula for calculating the cosine of the angle between any two vetors?
     
    Last edited: Nov 19, 2006
  8. Nov 19, 2006 #7
    Sorry, cryptic probably means i don't understand them, For the angle between 2 vectors in the past i have used,

    Cos Theta = (AxBx + AyBy) / |a|*|b| then I simply did Cos-1(Theta)

    I attempted to alter this formula to work with 3d vectors, but it went very wrong.

    Thanks for any help, i do appreciate it.
     
  9. Nov 19, 2006 #8

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    Use the inner product:
    [tex]\cos(\theta) = \frac{\vec a \cdot \vec b}{|\vec a|\,|\vec b|}[/tex]
     
  10. Nov 19, 2006 #9

    Hootenanny

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    And if we rewrite this in co-ordinate form (as yours is above) we have;

    [tex]\cos\theta = \frac{x_{a}x_{b} + y_{a}y_{b} + z_{a}z_{b}}{\sqrt{x_{a}^{2}+y_{a}^{2}}\cdot\sqrt{x_{b}^{2}+y_{b}^{2}}}[/tex]
     
    Last edited: Nov 19, 2006
  11. Nov 19, 2006 #10
    Thanks very much guys :)
     
  12. Nov 19, 2006 #11

    Office_Shredder

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I think you have one too many vectors in there...
     
  13. Nov 19, 2006 #12

    Hootenanny

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Good catch, duly corrected. I think my fingers got carried away there :rolleyes:
     
  14. Nov 19, 2006 #13

    robphy

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    This should read

    [tex]\cos\theta = \frac{x_{a}x_{b} + y_{a}y_{b} + z_{a}z_{b}}{\sqrt{x_{a}^{2}+y_{a}^{2}+z_{a}^{2}}\cdot\sqrt{x_{b}^{2}+y_{b}^{2}+z_{b}^{2}}}[/tex]
     
  15. Nov 19, 2006 #14

    Office_Shredder

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    hootenanny can't catch a break :D
     
  16. Nov 19, 2006 #15

    robphy

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    While this is the best, most succinct answer, I just want to make it clear that it really is the dot-product that answers the question:
    [tex]\cos(\theta) = \frac{\vec a \cdot \vec b}{\sqrt{\vec a \cdot \vec a} \sqrt{\vec b \cdot \vec b}}[/tex]

    That's why: Dot's the answer.
     
  17. Nov 21, 2006 #16

    Hootenanny

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Damn it! :grumpy: Sorry guys; I'm gona have to stop working at the same time as posting! It lucky that not too many of these errors crop up in my work :blushing:
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: 3D Vector Help
  1. 3D vector questions. (Replies: 3)

  2. Vector math for 3D art (Replies: 0)

  3. 3d - Vector question (Replies: 14)

Loading...