Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm writing a PHP algorithm to calculate the sum of two 2D vectors with the same origin, given their intensity and their angle with a given axis. How to calculate the properties of the sum vector? I have some ideas about the intensity (Pythagorean theorem and Carthesian components), but I don't have a clue of how to calculate the angle.

share|improve this question

migrated from physics.stackexchange.com Dec 18 '12 at 11:42

This question came from our site for active researchers, academics and students of physics.

1  
What you need is to convert the polar notation to cartesian, add the components and covert back to polar. –  ja72 Dec 18 '12 at 15:25

1 Answer 1

If your resultant vector is $c$ and $\hat c = c/|c|$, then $\hat c \cdot \hat x = \cos \theta$ and $\hat c \cdot \hat y = \sin \theta$, where $\hat x, \hat y$ are the unit vectors in the x- and y-directions and $\theta$ is the angle $c$ makes with respect to the x-axis.

share|improve this answer
    
What is $\hat c = c/|c|$? –  Giulio Muscarello Dec 18 '12 at 17:57
    
$\hat c$ means the unit vector in the direction of $c$. $c/|c|$ is a way of calculating this unit vector. –  Muphrid Dec 18 '12 at 18:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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