17

Wikipedia link for Cross Product talks about using the cross-product to determine if $3$ points are in a 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 the cross-product tells us about an anti-clockwise/clockwise rotation?

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

gizgok
  • 399
  • 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

5 Answers5

6

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

  • 2
    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. – Nathaniel Bubis Jan 23 '13 at 21:46
  • 1
    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
  • I like this argument, but why can you write that the cross product is equal to the lengths times ths sine of the angle? Shouldn't it be the "length" of the cross product that equals the lengths times the sine of the angle? – Magnus Feb 25 '21 at 16:37
3

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

Calvin Lin
  • 68,864
  • Can you elaborate on why triangle has positive area for anticlockwise rotation – gizgok Jan 24 '13 at 00: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 01:09
2

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.

1

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

Jyrki Lahtonen
  • 133,153
1

In https://www.whitman.edu/mathematics/calculus_online/section12.04.html:

What about the direction of the cross product? Remarkably, there is a simple rule that describes the direction. Let's look at a simple example: Let ${\bf A}=\langle a,0,0\rangle$, ${\bf B}=\langle b,c,0\rangle$. If the vectors are placed with tails at the origin, $\bf A$lies along the x-axis and $\bf B$ lies in the x-y plane, so we know the cross product will point either up or down. The cross product is $$\eqalign{ {\bf A}\times {\bf B}=\left|\matrix{{\bf i}&{\bf j}&{\bf k}\cr a&0&0\cr b&c&0\cr}\right| &=\langle 0,0,ac\rangle.\cr}$$ As predicted, this is a vector pointing up or down, depending on the sign of ac. Suppose that a>0, so the sign depends only on c: if c>0, ac>0 and the vector points up; if c< 0, the vector points down. On the other hand, if a< 0 and c>0, the vector points down, while if a< 0 and c< 0, the vector points up. Here is how to interpret these facts with a single rule: Imagine rotating vector $\bf A$ until it points in the same direction as $\bf B$; there are two ways to do this—use the rotation that goes through the smaller angle. If a>0 and c>0, or a< 0 and c< 0, the rotation will be counter-clockwise when viewed from above; in the other two cases, $\bf A$ must be rotated clockwise to reach $\bf B$. The rule is: counter-clockwise means up, clockwise means down. If $\bf A$ and $\bf B$ are any vectors in the x-y plane, the same rule applies—$\bf A$ need not be parallel to the x-axis.

And please check the answer in How to know direction of cross product between two vectors? for the more general case.

YourBestBet
  • 111
  • 2