# Find the sine sign given a pair of 3D vectors

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?

-
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

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||$.

-

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\,$ )

-
yes, but in this way i have the same problem, the sin is always positive, i want the sign, is it possible to obtain? :) – Luca 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