Component Form

Dealing with vectors graphically, as we did in the previous section, is a great way to get a sense of what's going on. But if we want a precise answer to a question— for instance, "Suppose I walk 2 km northeast, then 3 km south, how far am I from my starting point?"— then the graphical representation can be frustrating: you either have to break out a ruler and protractor, or use esoteric geometrical facts, and in either case it's a pain. Instead, we will write vectors in component form, which is a numerical way of representing them that makes calculations much easier.

A vector in component form is written as a combination of basis vectors. In the typical Cartesian coordinate system, \(\vec a=2\hat x\), \(\vec b=\hat x+\hat y\) and \(\vec c=\hat x-2\hat y\) are all vectors written in component form, and which look like this:

We use the notation \(A_x\) to refer to the x component of the vector \(\vec A\) (that is, the coefficient of \(\hat x\) when it is written in component form; for example, if \(\vec A=3\hat x-4\hat y\), then \(A_x=3\) and \(A_y=-4\). A generic vector can be written as

\(\vec v=v_x\hat x+v_y\hat y+v_z\hat z\)
(component form)

In Cartesian coordinates, the magnitude of a vector can be found by squaring each component (i.e. the coefficient of each basis vector), adding the squares together, and then taking the square root. That is,

\(\left|{\vec v}\right|=\sqrt{v_x^2+v_y^2+v_z^2}\)
(magnitude of a vector)
For example, the magnitude of the vector \(\hat x-2\hat y\) above is
\(\sqrt{(1)^2+(-2)^2}=\sqrt{1+4}=\sqrt5\)
which you might recognize as the Pythagorean theorem. This same technique works even if we include a z component.
Find the following vector magnitudes:
Find the unit vector of \(\vec v=\hat x+\hat y\).
The unit vector of \(\vec v\) is found by dividing \(\vec v\) by its magnitude, which is
$$\abs{\vec v}=\sqrt{(1)^2+(1)^2}=\sqrt{2}$$
Thus
$$\hat v=\frac{\vec v}{\abs{\vec v}}=\boxed{\displaystyle\frac{\hat x+\hat y}{\sqrt 2}}$$

The reason component form is so powerful is that it makes addition and subtraction very easy: we simply add (or subtract) them component by component. For example, if \(\vec A=2\hat x\) and \(\vec B=\hat x+\hat y\), then
$$\begin{eqnarray} &&\color{red}{\vec A}+\color{blue}{\vec B}\\ &=&(\color{red}{2\hat x})+(\color{blue}{\hat x+\hat y})\\ &=&(\color{red}{2}+\color{blue}{1})\hat x+(\color{red}{0}+\color{blue}{1})\hat y\\ &=&3\hat x+\hat y\\ \end{eqnarray}$$
Scalar multiplication is also easy. For example, if
$$\vec B=\hat x+\hat y,$$
then
$$-2\vec B=-2(\hat x+\hat y)=-2\hat x-2\hat y$$
and so, as we see in the figure,
$$\color{red}{\vec A}\color{blue}{-2\vec B} =\color{red}{2\hat x} \color{blue}{-2\hat x-2\hat y}=-2\hat y$$

In summary, you can treat the basis vectors just as if they were variables in algebra: just as $$(2x)-2(x+y)=2x-2x-2y=-2y,$$ the same is true if we put hats on top of the letters.

We know we can add vectors together and subtract them, but can we multiply them? The answer is yes, after a fashion. In fact, there are two different forms of vector multiplication, although neither of them are as straightforward as vector addition is.