Dot Product
a . b = |a||b| cos theta. The sign tells whether vectors point the same way.
Plane Geometry: Points, a vector and a distance
Dot product: u . v = ux vx + uy vy = |u||v| cos(angle). With itself, (4, 3) . (4, 3) = 25, the squared length. With the perpendicular (3, -4) it is 4 x 3 + 3 x -4 = 0. Its sign says whether two vectors point the same way. Cross product: ux vy - uy vx = |u||v| sin(angle), zero for parallel vectors and signed by the turn direction.
Cost
- Space
- O(1)
Before this
Leads to
Topics that need this one first.
Taught by the same lesson
Plane Geometry covers these too, in the same run.