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 want to find the exact sine between two vectors in 3-dimensional space.

Data:

  • $x$: vector
  • $y$: vector
  • $z = \Vert x \times y \Vert$

I have tried this:

$$\sin \alpha = \frac{\Vert z\Vert}{( \Vert x\Vert\cdot \Vert y\Vert)}$$

but i obtain only the absolute value of the angle, is there a way to obtain even the sign?

share|improve this question
    
The angle between two vectors will always be less than $180^\circ$ until you give a direction of rotation about the perpendicular axis, by which to measure positive and negative angles. –  Daryl Jan 16 '13 at 22:32
add comment

2 Answers

Hint: Take the projection of $x$ onto $y$, and check if they are pointing in the same, or opposite directions.

Note that your given formula for $\sin \theta$ is incorrect. It should involve $||z||$.

share|improve this answer
add comment

But if you know a little about inner product then you have that the angle $\,\theta\,$ between both vectors fulfills:

$$\cos\theta=\frac{x\cdot y}{||x||\;||y||}$$

and now simply use the trigonometric identity

$$\sin x=\sqrt{1-\cos^2x}$$

to get what you want. (Warning: the sign above must be carefully chosen depending on the wanted/given domain of $\,\theta\,$ )

share|improve this answer
    
yes, but in this way i have the same problem, the sin is always positive, i want the sign, is it possible to obtain? :) –  PhantomFav Jan 16 '13 at 12:01
    
No. If, for example, $\,\cos\theta=0.5\,$ and you know the angle between the vectors is acute (since you say you're given the vectors!), then you must choose the positive sign for sine (i.e., first quadrant), but if you know the angle is obtuse then you must take the negative sign (fourth quadrant), and etc. It all depends on what you know. –  DonAntonio Jan 16 '13 at 12:04
add comment

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.