Addition & subtraction

The sum of two or more vectors is called the resultant vector. We can add and subtract vectors with the help of a geometric interpretation and a little bit of trigonometry.

To find the sum of `vec u` and `vec v`, we can use the parallelogram law. Start by drawing both vectors with their tails beginning at the same point. Then complete the parallelogram using a copy of each vector. The resultant vector is the diagonal of the parallelogram from tails to heads.

The parallelogram law of vector addition

Once you have your diagram, you can find the magnitude and direction of the resultant vector using cosine law and sine law. To subtract vectors, you can use the same method—notice that `vec u - vec v = vec u + (-vec v)`. In other words, flip the subtrahend and then add.

Vector addition is commutative, meaning

`vec u + vec v = vec v + vec u`,

and it is also associative:

`(vec a + vec b) + vec c = vec a + (vec b + vec c)`.

Since we can add vectors, there must be an additive identity: some vector `vec a` where `vec v + vec a = vec v`. This is called the null vector or the zero vector, and we represent it with `vec 0`. It has no magnitude, and consequently its direction is undefined (there is no arrow to point anywhere). For example, adding a vector to its additive inverse yields the zero vector: `vec v + (-vec v) = vec 0`.

An important identity for simplifying vector expressions is

`vec(AB) + vec(BC) = vec(AC)`.

This should be obvious if you think about it: going from A to B and from B to C is the same as going straight from A to C. You will often need to apply `vec(AB) = -vec(BA)` to make an expression match the left-hand side above.