#### Definition of a vector

A vector is an object that has both a magnitude and a direction. Geometrically, we can picture a vector as a directed line segment, whose length is the magnitude of the vector and with an arrow indicating the direction. The direction of the vector is from its tail to its head.

The vector addition is the way forces and velocities combine. For example, if a car is travelling due north at 20 miles per hour and a child in the back seat behind the driver throws an object at 20 miles per hour toward his sibling who is sitting due east of him, then the velocity of the object (relative to the ground!) will be in a north-easterly direction. The velocity vectors form a right triangle, where the total velocity is the hypotenuse. Therefore, the total speed of the object (i.e., the magnitude of the velocity vector) is $\sqrt{20^2+20^2}=20\sqrt{2}$ miles per hour relative to the ground.

Addition of vectors satisfies two important properties.

- The commutative law, which states the order of addition doesn't matter: $$\vc{a}+\vc{b}=\vc{b}+\vc{a}.$$ This law is also called the parallelogram law, as illustrated in the below image. Two of the edges of the parallelogram define $\vc{a}+\vc{b}$, and the other pair of edges define $\vc{b}+\vc{a}$. But, both sums are equal to the same diagonal of the parallelogram.
- The associative law, which states that the sum of three vectors does not depend on which pair of vectors is added first: $$(\vc{a}+\vc{b})+\vc{c} = \vc{a} + (\vc{b}+\vc{c}).$$

You can explore the properties of vector addition with the following applet. (This applet also shows the coordinates of the vectors, which you can read about in another page.)

*The sum of two vectors.* The sum $\vc{a}+\vc{b}$ of the vector $\vc{a}$ (blue arrow) and the vector $\vc{b}$ (red arrow) is shown by the green arrow. As vectors are independent of their starting position, both blue arrows represent the same vector $\vc{a}$ and both red arrows represent the same vector $\vc{b}$. The sum $\vc{a}+\vc{b}$ can be formed by placing the tail of the vector $\vc{b}$ at the head of the vector $\vc{a}$. Equivalently, it can be formed by placing the tail of the vector $\vc{a}$ at the head of the vector $\vc{b}$. Both constructions together form a parallelogram, with the sum $\vc{a}+\vc{b}$ being a diagonal. (For this reason, the commutative law $\vc{a}+\vc{b}=\vc{b}+\vc{a}$ is sometimes called the parallelogram law.) You can change $\vc{a}$ and $\vc{b}$ by dragging the yellow points.

##### Vector subtraction

Before we define subtraction, we define the vector $-\vc{a}$, which is the opposite of $\vc{a}$. The vector $-\vc{a}$ is the vector with the same magnitude as $\vc{a}$ but that is pointed in the opposite direction.