Math and physics › Vectors
Cross product: an arrow perpendicular to two others
Know first: Vectors: arrows you can add, Dot product: how much two arrows point the same way, Angles, sine and cosine: a point on a circle
The cross product turns two arrows into a third. The new arrow stands perpendicular to both, and its length equals the area of the parallelogram they span. Games use it to find the normal of a triangle and to tell which side of a face turns toward the camera. It also decides whether a target is on the left or the right, and whether a pixel falls inside a triangle. The lesson starts in 2D, where everything comes down to one number with a sign. Then it moves to 3D: where the formula comes from, and why it has two pictures, one for the right hand and one for the left.
Why this matters
The dot product tells you how much two arrows point the same way. Often you need something else: an arrow perpendicular to both. Lighting needs the normal of a triangle, the perpendicular to its face. A camera needs “up” once “forward” and “right” are known. Physics needs the axis a nut turns around when you push on the handle of a wrench.
In 2D the same calculation gives one number with a sign. A character uses it to tell whether a target is on its left. The graphics card uses it to find out which pixels a triangle covers and which side of the triangle faces the camera.