Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Wikipedia link for Cross Product it talks about using cross product to determine if 3 points are in clockwise or anti-clockwise rotation. I'm not able to visualize this or think of it in terms of math. Does it mean that sin of an angle made between two vectors is 0-180 for anticlockwise and 180-360 for clockwise. Can somebody explain at the most fundamental level why cross-product tells us anti-clockwise/clockwise rotation.

I want to understand how can you determine if 3 points have clockwise or anti-clockwise rotation.

share|cite|improve this question
Not sure about explanation. Find the crossproduct of $(1,0,0)$ and $(0,1,0).$ Which way does it point? If your head is in the direction of that cross product vector, which way do you rotate the first vector to get the second vector, in the most expedient manner? Think in terms of a helicopter hovering over the landscape, or a mole digging under the landscape and looking up, those are the choices – Will Jagy Jan 23 '13 at 21:17
I don't see very clearly what the wiki author meant either. In any case, the cross product does not tell you anything about motion. Can you tell us what you have in mind with three points? – rschwieb Jan 23 '13 at 21:18

If you use the cross product of $\vec{AB}\times \vec{AC}$ or of $\vec{AC}\times \vec{AB}$, the sign will be opposite due to the definition of the cross section. Thus you can determine in what direction you must turn around $A$ to reach $C$ from $B$ by looking at the sign of the cross product.

In terms of angles if $\vec{AB}$ and $\vec{AC}$ are in the $xy$ plane : $$\vec{AB}\times \vec{AC} = (|AB||AC|\sin\theta) \hat{z}$$ $$\vec{AC}\times \vec{AB} = (|AB||AC|\sin(-\theta))\hat{z} = -(|AB||AC|\sin(\theta))\hat{z}$$ Thus the angle becomes negative when you switch the direction - it's a bit like saying that to get from 12 o'clock to 3 o'clock you need to go $90^\circ$, but to go from 3 o'clock to 12 o'clock you need $270^\circ = 270^\circ - 360^\circ = -90^\circ$.

share|cite|improve this answer
Note that the cross product gives a vector, and not a scalar as you gave in the equation. And if you decide to take absolute value, you lose the ability to talk about the signage of $\sin \theta$. – Calvin Lin Jan 23 '13 at 21:44
@CalvinLin - technically you are right, but you can always multiply by the perpendicular unit vector. I was just trying to show the general idea. – nbubis Jan 23 '13 at 21:46
That's the main issue, determining the perpendicular unit vector. Why must it be $(0, 0, 1)$ as opposed to $(0, 0, -1)$? And what do you do when your points are in 3-space, and there's no 'canonical' unit vector for you to take? – Calvin Lin Jan 23 '13 at 21:49

The geometric interpretation of the cross product $\vec{a} \times \vec{b}$ is that it gives us a vector that is perpendicular to both $\vec{a}$ and $\vec{b}$, and has length $\left \| \vec{a} \right \| \left\| \vec{b} \right \| \sin \theta$. Howwever, there are 2 such vectors (which point in the exact opposite direction), so this isn't sufficient. We still require the 'right hand rule' to tell us which specified direction the vector points in.

Specifically, if the points $A, B$ are anti clockwise about the origin, then the vector $\vec{a} \times \vec{b}$ will point out of the page, while the vector $\vec{b} \times \vec{a}$ will point into the page. We can tell which direction the vector is pointing at, but taking the dot product with $(0, 0, 1)$. If $( \vec{a} \times \vec{b} ) \cdot (0, 0, 1) >0$, then the points are anti clockwise. If $( \vec{a} \times \vec{b} ) \cdot (0, 0, 1) <0$, then the points are clockwise. If equality holds, then the vectors are parallel to each other.

If you rather look at the algebraic interpretation of the cross product, then $( a_1, a_2 , a_3 ) \times (b_1, b_2, b_3) = \det \begin{pmatrix} a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \\ \vec{i} & \vec{j} & \vec{k} \\ \end{pmatrix}$. In the plane, we have $a_3 =0, b_3 = 0$.

Recall that if points $O, A, B$ are in anti clockwise order, then triangle $OAB$ has positive area equal to $\frac {1}{2} \left | \begin{matrix} 0 & a_1 & b_1 & 0 \\ 0 & a_2 & b_2 & 0 \\ \end{matrix} \right | = \frac {1}{2} (a_1 b_2 - a_2 b_1 )$. As such, the orientation can be described by looking at just the signage of this term, which happens to correspond with the coefficient of vector $\vec{k}$ in $\vec{a} \times \vec{b}$. We can recover this term (and hence it's sign) by looking at $ (\vec{a} \times \vec{b} )\cdot \vec{k}$

share|cite|improve this answer
Can you elaborate on why triangle has positive area for anticlockwise rotation – gizgok Jan 24 '13 at 0:11
That was the chosen convention, that anti clockwise labeling of a triangle will have positive area, while clockwise labeling of a triangle will have negative area. – Calvin Lin Jan 24 '13 at 1:09

I'm fairly sure that the author of the Wikipedia page meant the following at this point. Consider three points on the plane $A,B,C$. Compute the cross product $\vec{AB}\times\vec{BC}$. If that points up (the points are in the $xy$-plane, so only the $z$-component is non-zero), then when you walk about the triangle following the route $A\to B\to C\to A$, you are walking around the triangle in the positive (=counterclockwise) orientation. If the cross product points down, you are walking around the triangle clockwise.

This generalizes to $n$-gons in computer graphics. If the vertices are $A_1,A_2,\ldots,A_n$, you compute the cross products $\vec{A_iA_{i+1}}\times \vec{A_{i+1}A_{i+2}}$. If they all have the same sign (up or down), then the polygon is convex, and you also know which way you are walkiing around it. If the signs alternate, then the polygon is not convex.

Anyway, you are right in the all this follows from the fact sine is positive in the first and second quadrants and negative in the third and fourth quadrants.

share|cite|improve this answer

Given three non-coplanar(!) vectors $v_1, v_2, v_3$ in 3d space, these can be smoothly transformed into another triplet of vectors $w_1, w_2, w_3$ without becoming coplanar at any intermediate moment - or not. Interestingly, if you can't obtain $w_1,w_2,w_3$, then you can obtain $w_1, w_2, -w_3$ and also $w_2,w_1,w_3$.

One can find out beforehand for given $v_1,v_2,v_3$ and $w_1, w_2, w_3$ whether or not such a smooth transition is possible: Check if $v_1\times v_2$ and $v_3$ are on the same side of the plane spanned by $v_1, v_2$. If so, we say the three vectors are positively oriented, otherwise not. Do the same check with the $w_i$. The smooth transition described is possible if and only if the orientation is the same. Thus for two non-collinear vectors in 3d space, we can always find a "standard" third vector to make a positively oriented triple: $v_1\times v_2$.

Considering a nondegenerate triangle $ABC$ in a plane, we have a similar situation: It can be smoothly transformed to $DEF$ without becoming degeneate at an intermediate time iff $\vec{AB}\times \vec{AC}$ and $\vec{DE}\times \vec{DF}$ are in the same halfspace with respect to the plane.

share|cite|improve this answer

Your Answer


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.