Category: Linear Algebra Level: 301
u + v = (ux + vx, uy + vy) = v + u
To add two vectors, place the tail of the second at the tip of the first. Either order lands on the same point, which is the far corner of a parallelogram.
The vector u goes 4 right and 1 up. The vector v goes 1 right and 3 up.
u = (4, 1), v = (1, 3)
Slide a copy of v so its tail sits on the tip of u. Sliding keeps its length and direction.
tail at (4, 1)
The sum runs from the origin to the tip of the copied v. Add the components to get its coordinates.
u + v = (4 + 1, 1 + 3) = (5, 4)
Put u at the tip of v instead. The path lands on the same point, so u + v = v + u. The two paths outline a parallelogram. Addition does not care who goes first.
v + u = (5, 4) = u + v
cd svg-generator python3 -m svgmath render vector-addition --out /tmp/vector-addition
Source: svgmath/diagrams/vectors.py