This tiny application demonstrates visually the results of the two-dimensional dot product and cross product.
The products are calculated by two vectors that are given by the three red points. Vector v1 is defined as the vector that starts from point 1 and ends at point 2. Vector v2 is defined as the vector that starts from point 1 and ends at point 3.
Note that the red points can be moved by clicking and dragging them - the results of the products are instantly updated.
Notes about the Dot Product
The dot product of vectors v1 and v2 is defined as v1.x * v2.x + v1.y * v2.y .
If the two vectors are orthogonal, then the dot product is zero.
If two vectors face the same direction, the dot product is the product of the length of the vectors.
The dot product can also be defined as v1.x * v2.x + v1.y * v2.y = len(v1) * len(v2) * cos α where α is the angle between the two vectors.