Points versus vectors
A point is a location in the plane, written as a pair of coordinates. A vector is a direction with a magnitude, often formed as the difference between two points. Subtracting point A from point B gives the displacement vector that takes you from A to B.
- A point answers where.
- A vector answers which way and how far.
The dot product
The dot product of two vectors multiplies matching coordinates and sums them. It measures how aligned the vectors are. It is positive when they point a similar way, zero when they are perpendicular, and negative when they oppose.
- Used to find angles between directions.
- Used to project one vector onto another.
The cross product
In two dimensions the cross product is a single scalar that captures the signed area of the parallelogram the vectors span. Its sign tells you the turn direction, which is the workhorse of geometric algorithms.
Why this matters
Almost every geometry routine reduces to dot and cross products on small vectors. Mastering these two operations means you rarely need messy trigonometry.
Key idea
Treat points as locations and vectors as displacements, then lean on the dot product for alignment and the cross product for turn direction to express most geometry without trigonometry.