# Vectors in $$\mathbf R^2$$ and $$\mathbf R^3$$

## Vectors and arrows

A nonzero vector is a quantity, which has both direction and magnitude. In addition, there is only one vector with zero magnitude: the zero vector (null vector). There are a lot of examples of vectors in Dynamics: displacement, velocity, acceleration, force... Vectors are usually denoted by lowercase letters either in boldface (underlined when handwritten): $$\mathbf u,\mathbf v$$ or with an overhead arrow $$\vec u,\vec v$$. This is to differentiate them from numerical quantities, which in the context of Linear Algebra are called scalars. The zero vector is denoted by $$\boldsymbol0$$ or $$\vec0$$.

We can represent a vector by an arrow. We might refer to the starting point as source, and the endpoint as target. The vector represented by the arrow from point $$P$$ to point $$Q$$ is denoted by $$\vec{PQ}$$. The zero vector corresponds to an arrow with matching source and target: $$\boldsymbol 0=\vec{PP}$$. Note that as we only care about the direction and the magnitude, two arrows represent the same vector, if they point in the same direction, and have the same length. In other words, translating the arrow does not change the vector it represents. This also means that translating an arrow so that its source is the origin $$O(0,0,0)$$ gives a special arrow representing the vector. Like this, the vector is described by the target, and different targets give different vectors. That is, we have a one-on-one correspondence between points and vectors.

Recall that a point with coordinates is usually written as $$P(x,y,z)$$. We will write the vector $$\vec{OP}$$ as $$\left(\begin{smallmatrix} x & y & z \end{smallmatrix}\right)$$ or $$\left(\begin{smallmatrix} x \\ y \\ z \end{smallmatrix}\right)$$. The former is called a row vector, the latter a column vector. We will see in chapter 3 why using column vectors is more natural. We refer to the numbers $$x,y,z$$ in $$\left(\begin{smallmatrix} x \\ y \\ z \end{smallmatrix}\right)$$ as the components of the vector. People also write $$(x,y,z)$$ or $$\langle x,y,z\rangle$$.

The collection of plane points, and thus the collection of the corresponding plane vectors is denoted by $$\mathbf R^2$$. Thus, if $$\mathbf u$$ is a plane vector, we write $$\mathbf u\in\mathbf R^2$$. The symbol $$\in$$ means to be part of a collection. Similarly, $$\mathbf v\in\mathbf R^3$$ means that $$\mathbf v$$ is a space vector. We'll write the formulas in space, since the plane can be embedded as the $$xy$$-plane, that is with $$z$$-coordinate 0.

Fact. The vector from point $$P(x_1,y_1,z_1)$$ to $$Q(x_2,y_2,z_2)$$ is $$\left(\begin{smallmatrix} x_2-x_1 \\ y_2-y_1 \\ z_2-z_1 \end{smallmatrix}\right)$$.

Fact. Two vectors are equal precisely when their components agree.

Exercise. Consider the points $$P(2,1)$$, $$Q(0,3)$$, $$R(2,4)$$. Which of the following vectors are equal? $$\vec{OP}$$, $$\vec{OQ}$$, $$\vec{RP}$$, $$\vec{QR}$$

## Addition, scalar multiplication, and subtraction of vectors

Recall the example from last time: the total velocity of a kayak in a river can be gotten by making the source of the river current velocity arrow the target of the paddling velocity arrow, and taking the arrow with source that of the current and target that of the paddling. Or, you can perform addition componentwise.

Definition. Let $$\mathbf u=\vec{OP},\mathbf v=\vec{OQ}$$. Let $$\vec{QR}$$ be gotten by translating $$\vec{OP}$$ by $$\vec{OQ}$$. Then the sum $$\mathbf u+\mathbf v$$ is $$\vec{OR}$$.

Fact. Let's write the coordinates as $$P(x_1,y_1,z_1)$$ and $$Q(x_2,y_2,z_2)$$. Since by translating $$P$$ by $$\vec{OQ}$$ we get $$R(x_1+x_2,y_1+y_2,z_1+z_2)$$, we have $\mathbf u+\mathbf v=\left(\begin{smallmatrix}x_1+x_2\\y_1+y_2\\z_1+z_2\end{smallmatrix}\right).$

Example. Suppose that a car has velocity vector $$\mathbf v=\vec{OP}=\left(\begin{smallmatrix} v_1 \\ v_2\end{smallmatrix}\right)$$. (a) Suppose that it speeds up to twice its original speed. What it its new velocity vector? (b) Suppose that instead it starts going in reverse with half its original speed. What is its new velocity vector?

1. When speeding up to twice its original speed, its new velocity vector can be represented by an arrow with the same direction and twice the length of $$\vec{OP}$$. In component form, it is $$\left(\begin{smallmatrix} 2v_1 \\ 2v_2 \end{smallmatrix}\right)$$.

2. When going in reverse with half its original speed, its new velocity vector can be represented by an arrow with the opposite direction, and half the length of $$\vec{OP}$$. In component form, it is $$\left(\begin{smallmatrix} -\frac12v_1\\-\frac12v_2\end{smallmatrix}\right)$$.

Definition. Let $$c$$ be a scalar, and $$\mathbf u$$ a vector. Then the scalar multiple $$c\cdot\mathbf u$$ is:

1. in case $$c>0$$, the vector with the same direction as $$\mathbf u$$ and $$c$$ times the size

2. in case $$c=0$$, the zero vector

3. in case $$c<0$$, the vector with the opposite direction to $$\mathbf u$$ and $$c$$ times the size.

Fact. Suppose that $$\mathbf u=\left(\begin{smallmatrix}u_1\\u_2\\u_3\end{smallmatrix}\right)$$. Then in all three cases, we have $c\cdot\mathbf u=\left(\begin{smallmatrix}cu_1\\cu_2\\cu_3\end{smallmatrix}\right).$

Definition. Let $$\mathbf u,\mathbf v$$ be two vectors. The the opposite of $$\mathbf u$$ is $$-\mathbf u=(-1)\cdot\mathbf u$$, and the difference $$\mathbf u-\mathbf v$$ is $$\mathbf u+(-\mathbf v)$$.

Theorem. The following arithmetic rules hold for the vector operations we've introduced. \begin{align*} \mathbf u+\mathbf v=&\mathbf v+\mathbf u\\ (\mathbf u+\mathbf v)+\mathbf w=&\mathbf u+(\mathbf v+\mathbf w)\\ \mathbf u+\boldsymbol0=&\mathbf u\\ \mathbf u+(-\mathbf u)=&\boldsymbol0\\ c(\mathbf u+\mathbf v)=&c\mathbf u+c\mathbf v\\ (c+d)\mathbf u=&c\mathbf u+d\mathbf u\\ 1\mathbf u=&\mathbf u\\ 0\mathbf u=&\boldsymbol0 \end{align*}

Checking these properties can be done componentswise. For example, this is how you prove the fifth one. $c(\mathbf u+\mathbf v)=c\left(\left(\begin{smallmatrix}u_1\\u_2\\u_3\end{smallmatrix}\right)+\left(\begin{smallmatrix}v_1\\v_2\\v_3\end{smallmatrix}\right)\right)=c\left(\begin{smallmatrix}u_1+v_1\\u_2+v_2\\u_3+v_3\end{smallmatrix}\right)= \left(\begin{smallmatrix}c(u_1+v_1)\\c(u_2+v_2)\\c(u_3+v_3)\end{smallmatrix}\right)=\left(\begin{smallmatrix}cu_1+cv_1\\cu_2+cv_2\\cu_3+cv_3\end{smallmatrix}\right)= \left(\begin{smallmatrix}cu_1\\cu_2\\cu_3\end{smallmatrix}\right)+\left(\begin{smallmatrix}cv_1\\cv_2\\cv_3\end{smallmatrix}\right)= c\left(\begin{smallmatrix}u_1\\u_2\\u_3\end{smallmatrix}\right)+c\left(\begin{smallmatrix}v_1\\v_2\\v_3\end{smallmatrix}\right)=c\mathbf u+c\mathbf v.$

Fact. Note that using these rules, we can show $\mathbf u+(\mathbf v-\mathbf u)=\mathbf u+(-\mathbf u+\mathbf v)=(\mathbf u-\mathbf u)+\mathbf v=\boldsymbol0+\mathbf v=\mathbf v.$ Let $$\mathbf u=\vec{OP}$$ and $$\mathbf v=\vec{OQ}$$. Using the geometric description of vector addition, we see that $\mathbf u+(\mathbf v-\mathbf u)=\mathbf v=\vec{OQ}=\vec{OP}+\vec{PQ}.$ That is, we have $$\mathbf v-\mathbf u=\vec{PQ}$$.

Warning. Based on these properties, you would think that for these new operations, all the arithmetic rules you're used to hold. That's not always going to be true. For example, in Chapter 3, we'll introduce matrix multiplication, and that's not going to be commutative: $$AB\ne BA$$. Or for a closer example, in Section 1.2, we'll introduce cross products which will be neither commutative: $$\mathbf u\times\mathbf v\ne\mathbf v\times\mathbf u$$ nor associative: $$\mathbf u\times(\mathbf v\times\mathbf w)\ne(\mathbf u\times\mathbf v)\times\mathbf w$$.

Let $$a,b$$ be scalars and $$\mathbf u,\mathbf v$$ be vectors. The expression $$a\mathbf u+b\mathbf v$$ is called a linear combination of $$\mathbf u$$ and $$\mathbf v$$. In Physics and Engineering, people often write $\mathbf i=\left(\begin{smallmatrix}1\\0\\0\end{smallmatrix}\right),\,\mathbf j=\left(\begin{smallmatrix}0\\1\\0\end{smallmatrix}\right),\,\mathbf k=\left(\begin{smallmatrix}0\\0\\1\end{smallmatrix}\right).$ Then for any vector $$\mathbf u=\left(\begin{smallmatrix}a\\b\\c\end{smallmatrix}\right)$$, we write $\mathbf u=a\mathbf i+b\mathbf j+c\mathbf k.$

Exercise. Consider the points $$P(1,3),Q(-1,4),R(-3,0)$$. Find the components of the vectors $$\vec{OP}+3\vec{PQ},2\vec{OP}+\vec{PQ},\vec{OR}+3\vec{OP},\vec{OP}-\vec{QR}$$.

Exercise. Find all the solutions to the following equations. \begin{align} a\left(\begin{smallmatrix}1\\2\\-1\end{smallmatrix}\right)+b\left(\begin{smallmatrix}-3\\1\\2\end{smallmatrix}\right)&=\left(\begin{smallmatrix}1\\-5\\0\end{smallmatrix}\right)\tag{a}\\ a\left(\begin{smallmatrix}1\\2\\-1\end{smallmatrix}\right)+b\left(\begin{smallmatrix}-3\\1\\2\end{smallmatrix}\right)&=\left(\begin{smallmatrix}1\\-5\\1\end{smallmatrix}\right)\tag{b} \end{align}

Chapter 2 is about a systematic way to deal with this sort of question.

## Vector length and unit vectors

Definition. The length $$\|\mathbf u\|$$ of the vector $$\mathbf u=\vec{OP}$$ is the length of the line segment $$\overline{OP}$$. It is also denoted by $$|\mathbf u|$$.

Fact. Suppose that $$\mathbf u=\left(\begin{smallmatrix}a\\b\\c\end{smallmatrix}\right)$$. Then by the Pythagoras Theorem, we have $\|\mathbf u\|=\sqrt{a^2+b^2+c^2}.$

Fact. Let $$c$$ be a scalar and $$\mathbf u$$ be a vector. Then we have $$\|c\mathbf u\|=|c|\cdot\|\mathbf u\|$$.

Definition. A vector $$\mathbf u$$ is a unit vector, if it has unit length: $$\|\mathbf u\|=1$$.

Fact. Let $$\mathbf u$$ be a nonzero vector. Since scalar multiplication by a positive scalar does not change direction, the unit vector $$\frac{1}{\|u\|}\mathbf u$$ is the unique vector that has the same direction as $$\mathbf u$$, and it is a unit vector.

Fact. Let $$\mathbf u$$ and $$\mathbf v$$ be two nonzero vectors. Since two vectors are the same precisely when they have the same length and direction, the vectors $$\mathbf u$$ and $$\mathbf v$$ have the same direction precisely when we have $\frac{1}{\|\mathbf u\|}\mathbf u=\frac{1}{\|\mathbf v\|}\mathbf v.$ Furthermore, this happens precisely when the equation $c\mathbf u=\mathbf v$ has a solution. In Chapter 4, we'll learn an additional method to decide this.

Exercise. Consider the vectors $\left(\begin{smallmatrix}2\\-1\\4\end{smallmatrix}\right)\,\left(\begin{smallmatrix}-2\\-1\\4\end{smallmatrix}\right)\,\left(\begin{smallmatrix}1\\1/2\\2\end{smallmatrix}\right)\,\left(\begin{smallmatrix}-1\\-1/2\\2\end{smallmatrix}\right)\,\left(\begin{smallmatrix}4\\2\\-8\end{smallmatrix}\right).$ Can you find a pair which have the same direction? What is the unit vector in that direction? Can you find a pair which have the opposite direction?