Labs · Vectors

Vector Math Playground

Vector Math Playground simulation

A vector has a magnitude and a direction, stored as an (x, y) pair. Nearly every simulation in this lab is built on a few vector operations.

Vector a (pink) is fixed; drag its tip to move it. Vector b (cyan) follows your mouse. The result is drawn in yellow.

The dot product shows how far one vector points along another, and it is the basis of projections and angle calculations.

In dot product mode, make b perpendicular to a and watch the dot product drop to 0.

Controls

Evolved into Reflection off Walls, Matrices: Transforming Space.