Further Applications of Trigonometry

10.8 Vectors

Vectors

Like complex numbers, vectors are another type of number that can have more than one dimension. Complex numbers are a type of vector, but while complex numbers have 2 parts, vectors can have any number of parts. For example, you might describe a force pointing to a location in space with an $(x,y,z)$ order triplet and a value. For the sake of this course, we're only going to consider 2 dimensional vectors.

Definition: Vector

A vector is a mathematical object that has both a length and a directon. In this class, thier parts will be real numbers $a$ and $b$. To distinguish a vector from other variables, they can be written in several ways.

$$\vec{v} = a\mathbb{i}+b\mathbb{j} = \langle a,b\rangle = \binom{a}{b}$$

$a$ is the $\mathbb{i}$ component of the vector and $b$ is the $\mathbb{j}$ component of the vector.

Warning

The $\mathbb{i}$ here is not the imaginary unit $i$, it is marking a component of the vector.

Check out this Geogebra graph visualizing a vector in standard position!

Notice that there is an arrow head on the vector drawn. That is because I specified that vectors have not only a value, but a direction. This has a weird consequence in that we don't care about where vectors are. If two vectors have the same size and direction then they are the same vector. Both $u$ and $v$ in the example above are the same. Vectors have an initial point, the point from which it originates, and a terminal point, the point where it stops.

Definition: Standard Position of a Vector

A vector in standard position, sometimes called the position vector, is one whose initial point is at the origin of the coordinate plane.

If $\vec{u}$ is a vector with the initial point $P=(x_1,y_1)$ and the terminal point $Q=(x_2,y_2)$, then the position vector is

$$\vec{u}=(x_2-x_1,y_2-y_1)$$

The magnitude (length or size) of a vector $\vec{u}=\langle x,y\rangle=x\mathbb{i}+y\mathbb{j}$ in standard position is denoted

$$||\vec{u}||=\sqrt{x^2-y^2}$$

The direction of $\vec{u}$, given as an angle $\theta$ in standard position is

\[ \theta = \begin{cases} \tan^{-1}\left(\frac{y}{x}\right) & \text{if in I or IV} \\ \tan^{-1}\left(\frac{x}{y}\right) + 180^\circ & \text{if in II or III} \\ \end{cases} \]

It follows that the polar form of the vector is

$$\vec{u}=||\vec{u}||(\cos\theta\mathbb{i}+\sin\theta\mathbb{j})$$

Note that the inverse tangent function will give a negative angle if the direction points to quadrant IV. You should add $2\pi$ to truely put it in standard position.

Warning

The direction of the vector is important. You may be used to things like the slope formula for a line $m=\frac{y_2-y_1}{x_2-x_1}$ where the order doesn't matter. But in the case vectors, the order very much matters. Your vector could end up pointing in the opposite direction!

Example: Write vector in standard form

For each of the following, an initial point $P$ and a terminal point $Q$ for a vector is given. Write the vector in standard form $\langle a,b\rangle$.

  1. $P=(3,2)$, $Q=(5,6)$
  2. $P=(-4,2)$, $Q=(-1,5)$
  3. $P=(-2,1)$, $Q=(6,-2)$
  4. $P=(-2,5)$, $Q=(-7,-2)$
Show Solution
  1. From $P=(3,2)$ to $Q=(5,6)$:

    $$ \vec{u}=\langle x_2-x_1,y_2-y_1\rangle=\langle 5-3,6-2\rangle=\langle 2,4\rangle $$

  2. From $P=(-4,2)$ to $Q=(-1,5)$:

    $$ \vec{u}=\langle -1-(-4),5-2\rangle=\langle 3,3\rangle $$

  3. From $P=(-2,1)$ to $Q=(6,-2)$:

    $$ \vec{u}=\langle 6-(-2),-2-1\rangle=\langle 8,-3\rangle $$

  4. From $P=(-2,5)$ to $Q=(-7,-2)$:

    $$ \vec{u}=\langle -7-(-2),-2-5\rangle=\langle -5,-7\rangle $$

MyOpenMath: Find the position vector given initial and terminal points

Example: Deciding if two vectors are equal

Determine if $\vec{u}$ with the initial point $P_1$ and terminal point $Q_1$ is equal to $\vec{v}$ whose initial point is $P_2$ and terminal point $Q_2$.

  1. $P_1=(4,4), Q_1 = (4,-3) \quad P_2=(-1,2), Q_2=(3,-8)$
  2. $P_1=(1,4), Q_1 = (3,-4) \quad P_2=(-3,6), Q_2=(-1,-2)$
Show Solution

We'll convert each one to standard form first. If the components match exactly, the vectors are equal.

  1. For $P_1=(4,4), Q_1=(4,-3)$ and $P_2=(-1,2), Q_2=(3,-8)$:

    $$ \vec{u}=\langle 4-4, -3-4\rangle=\langle 0,-7\rangle $$

    $$ \vec{v}=\langle 3-(-1), -8-2\rangle=\langle 4,-10\rangle $$

    These are not the same, so the vectors are not equal.

  2. For $P_1=(1,4), Q_1=(3,-4)$ and $P_2=(-3,6), Q_2=(-1,-2)$:

    $$ \vec{u}=\langle 3-1, -4-4\rangle=\langle 2,-8\rangle $$

    $$ \vec{v}=\langle -1-(-3), -2-6\rangle=\langle 2,-8\rangle $$

    These match component-by-component, so the vectors are equal.

MyOpenMath: Decide if vectors are equal

Vector Arithmetic

Definition: Operations with vectors

Let $\vec{u} = \langle u_1, u_2 \rangle$ and $\vec{v} = \langle v_1, v_2 \rangle$ be vectors in $\mathbb{R}^2$, and let $c$ be a real number.

The sum of $\vec{u}$ and $\vec{v}$ is defined componentwise by

$$\vec{u} + \vec{v} = \langle u_1 + v_1, u_2 + v_2 \rangle$$

The product of a scalar $c$ and a vector $\vec{u}$ is defined by

$$c\vec{u} = \langle cu_1, cu_2 \rangle$$

Properties: For all vectors $\vec{u}, \vec{v}, \vec{w} \in \mathbb{R}^2$ and scalars $c, d \in \mathbb{R}$:

  1. Commutative (+) $\vec{u} + \vec{v} = \vec{v} + \vec{u}$
  2. Associative (+) $(\vec{u} + \vec{v}) + \vec{w} = \vec{u} + (\vec{v} + \vec{w})$
  3. Identity (+) $\vec{u} + \vec{0} = \vec{u}, \quad \text{where } \vec{0} = \langle 0, 0 \rangle$
  4. Inverse (+) $\vec{u} + (-\vec{u}) = \vec{0}=\langle 0,0 \rangle$
  5. Distributive (+x) $c(\vec{u} + \vec{v}) = c\vec{u} + c\vec{v}, \quad (c + d)\vec{u} = c\vec{u} + d\vec{u}$
  6. Associative (x) $c(d\vec{u}) = (cd)\vec{u}$
  7. Identity (x) $1\vec{u} = \vec{u}$

This is all just a long winded way to say that you can add and subtract vectors. And trivially, I might add. To add vectors is to just add their components together piecewise to get a new vector. And geometrically, this results in adding the two vectors tip to tail.

Check out this Geogebra graph visualizing vector addition!

Multiplying is a little different. Vectors have what we call scalar multiplication. You pick some real number $a$ and you multiply it onto a vector $\langle x,y \rangle$ and the result is $a\langle x, y \rangle = \langle ax, ay \rangle$. Geometrically, this results in scaling the vector by that value. Hence the name scalar multiplication.

Check out this Geogebra graph visualizing vector scaling!

Example: Vector arithmetic

Given $\vec{v}=\langle 3,4 \rangle$ and $\vec{u}=\langle -5,12 \rangle$, evaluate the following.

  1. $\vec{u}+\vec{v}$
  2. $3\vec{u}-\vec{v}$
  3. $-\vec{u}+6\vec{v}$
  4. $\frac{1}{5}\vec{u}$
Show Solution

Add or scale component-by-component.

  1. Compute $\vec{u}+\vec{v}$:

    $$ \vec{u}+\vec{v}=\langle -5,12\rangle+\langle 3,4\rangle=\langle -2,16\rangle $$

  2. Compute $3\vec{u}-\vec{v}$:

    $$ 3\vec{u}-\vec{v}=3\langle -5,12\rangle-\langle 3,4\rangle=\langle -15,36\rangle-\langle 3,4\rangle=\langle -18,32\rangle $$

  3. Compute $-\vec{u}+6\vec{v}$:

    $$ -\vec{u}+6\vec{v}=\langle 5,-12\rangle+\langle 18,24\rangle=\langle 23,12\rangle $$

  4. Compute $\frac{1}{5}\vec{u}$:

    $$ \frac{1}{5}\vec{u}=\frac{1}{5}\langle -5,12\rangle=\left\langle -1,\frac{12}{5}\right\rangle $$

MyOpenMath: Vector arithmetic

It is often useful to find a vector pointing in a particular direction, but has a magnitude of one.

Definition: Unit Vector

A unit vector is a vector whose length is 1. To find the unit vector in the direction of some vector $\vec{v}=\langle x,y\rangle$ we scale it by the multiplicative inverse of its magnitude.

$$\frac{1}{||v||}\langle x,y\rangle=\frac{1}{\sqrt{x^2+y^2}}\langle x,y\rangle=\langle \frac{x}{\sqrt{x^2+y^2}},\frac{y}{\sqrt{x^2+y^2}}\rangle$$

Example: Find a Unit Vector

For each of the following vectors, find the unit vector pointing in the same direction.

  1. $\langle 5,5 \rangle$
  2. $\langle 5,12 \rangle$
  3. $\langle 15,8 \rangle$
Show Solution

Perfect setup for the unit-vector formula: divide by the magnitude.

  1. For $\langle 5,5\rangle$:

    \[ \begin{align*} ||\vec{v}||&=\sqrt{5^2+5^2}=\sqrt{50}=5\sqrt{2} \\ \hat{v}&=\frac{1}{5\sqrt{2}}\langle 5,5\rangle=\left\langle \frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}}\right\rangle \end{align*} \]

    So a unit vector in the same direction is $\left\langle \frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}}\right\rangle$ (equivalently $\left\langle \frac{\sqrt{2}}{2},\frac{\sqrt{2}}{2}\right\rangle$).

  2. For $\langle 5,12\rangle$:

    \[ \begin{align*} ||\vec{v}||&=\sqrt{5^2+12^2}=\sqrt{25+144}=13 \\ \hat{v}&=\frac{1}{13}\langle 5,12\rangle=\left\langle \frac{5}{13},\frac{12}{13}\right\rangle \end{align*} \]

    So the unit vector is $\left\langle \frac{5}{13},\frac{12}{13}\right\rangle$.

  3. For $\langle 15,8\rangle$:

    \[ \begin{align*} ||\vec{v}||&=\sqrt{15^2+8^2}=\sqrt{225+64}=17 \\ \hat{v}&=\frac{1}{17}\langle 15,8\rangle=\left\langle \frac{15}{17},\frac{8}{17}\right\rangle \end{align*} \]

    So the unit vector is $\left\langle \frac{15}{17},\frac{8}{17}\right\rangle$.

MyOpenMath: Find a Unit Vector

Polar Form of Vectors

By now you're starting to see the striking similarities between vectors, complex numbers, and just points in a plane in general. Because each of these things have 2 orthogonal (fancy math word for perpendicular) parts they can be written in polar form. For a vector, this is pretty natural as they're defined by a length and a direction. Recall that the polar form of a vector is $$\vec{v}=||\vec{v}||(\cos\theta\mathbb{i}+\sin\theta\mathbb{j})$$ where $||\vec{v}||=\sqrt{v_x^2+v_y^2}$ is the magnitude of the vector and the angle is given by

\[ \theta = \begin{cases} \tan^{-1}\left(\frac{y}{x}\right) & \text{if in I or IV} \\ \tan^{-1}\left(\frac{x}{y}\right) + 180^\circ & \text{if in II or III} \\ \end{cases} \]

Example: Write a vector in polar form

For each of the following vectors, write them in polar form. $\vec{v}=||\vec{v}||(\cos\theta\mathbb{i}+\sin\theta\mathbb{j})$

  1. $2\mathbb{i}+2\mathbb{j}$
  2. $4\mathbb{i}+4\mathbb{j}$
  3. $-6\mathbb{i}+-6\sqrt{3}\mathbb{j}$
  4. $3\mathbb{j}$

::solution We'll use $||\vec{v}||=\sqrt{a^2+b^2}$ and identify the angle from the components.

  1. $2\mathbb{i}+2\mathbb{j}$

    \[ \begin{align*} ||\vec{v}||&=\sqrt{2^2+2^2}=2\sqrt{2} \\ \theta&=\tan^{-1}\left(\frac{2}{2}\right)=\tan^{-1}(1)=45^\circ \end{align*} \]

    So

    $$ \vec{v}=2\sqrt{2}(\cos45^\circ,\mathbb{i}+\sin45^\circ,\mathbb{j}) $$

  2. $4\mathbb{i}+4\mathbb{j}$

    \[ \begin{align*} ||\vec{v}||&=\sqrt{4^2+4^2}=4\sqrt{2} \\ \theta&=\tan^{-1}\left(\frac{4}{4}\right)=\tan^{-1}(1)=45^\circ \end{align*} \]

    So

    $$ \vec{v}=4\sqrt{2}(\cos45^\circ,\mathbb{i}+\sin45^\circ,\mathbb{j}) $$

  3. $-6\mathbb{i}+(-6\sqrt{3})\mathbb{j}$

    \[ \begin{align*} ||\vec{v}||&=\sqrt{(-6)^2+(-6\sqrt{3})^2}=\sqrt{36+108}=12 \\ \theta_{ref}&=\tan^{-1}\left(\left|\frac{-6\sqrt{3}}{-6}\right|\right)=\tan^{-1}(\sqrt{3})=60^\circ \\ \theta&=180^\circ+\theta_{ref}=240^\circ \quad (\text{quadrant III}) \end{align*} \]

    So

    $$ \vec{v}=12(\cos240^\circ,\mathbb{i}+\sin240^\circ,\mathbb{j}) $$

  4. $3\mathbb{j}$

    \[ \begin{align*} ||\vec{v}||&=\sqrt{0^2+3^2}=3 \\ \theta&=\tan^{-1}\left(\frac{3}{0}\right) \text{is undefined, so we use the axis direction directly: }90^\circ \end{align*} \]

    So

    $$ \vec{v}=3(\cos90^\circ,\mathbb{i}+\sin90^\circ,\mathbb{j}) $$

:::

Example: Write a vector in rectangualr form

For each of the following vectors, write them in rectangular form. $a\mathbb{i}+b\mathbb{j}$

  1. $||\vec{v}||=8$, $\theta = 60^\circ$
  2. $||\vec{v}||=4$, $\theta = 45^\circ$
  3. $||\vec{v}||=6$, $\theta = \frac{5\pi}{6}$
  4. $||\vec{v}||=13$, $\theta = \frac{7\pi}{4}$
Show Solution

Use $a=||\vec{v}||\cos\theta$ and $b=||\vec{v}||\sin\theta$, then write $a\mathbb{i}+b\mathbb{j}$.

  1. $||\vec{v}||=8$, $\theta=60^\circ$

    \[ \begin{align*} a&=8\cos60^\circ=8\cdot\frac{1}{2}=4 \\ b&=8\sin60^\circ=8\cdot\frac{\sqrt{3}}{2}=4\sqrt{3} \end{align*} \]

    So the vector is $4\mathbb{i}+4\sqrt{3}\mathbb{j}$.

  2. $||\vec{v}||=4$, $\theta=45^\circ$

    \[ \begin{align*} a&=4\cos45^\circ=4\cdot\frac{\sqrt{2}}{2}=2\sqrt{2} \\ b&=4\sin45^\circ=4\cdot\frac{\sqrt{2}}{2}=2\sqrt{2} \end{align*} \]

    So the vector is $2\sqrt{2}\mathbb{i}+2\sqrt{2}\mathbb{j}$.

  3. $||\vec{v}||=6$, $\theta=\frac{5\pi}{6}$

    \[ \begin{align*} a&=6\cos\left(\frac{5\pi}{6}\right)=6\left(-\frac{\sqrt{3}}{2}\right)=-3\sqrt{3} \\ b&=6\sin\left(\frac{5\pi}{6}\right)=6\left(\frac{1}{2}\right)=3 \end{align*} \]

    So the vector is $-3\sqrt{3}\mathbb{i}+3\mathbb{j}$.

  4. $||\vec{v}||=13$, $\theta=\frac{7\pi}{4}$

    \[ \begin{align*} a&=13\cos\left(\frac{7\pi}{4}\right)=13\cdot\frac{\sqrt{2}}{2} \\ b&=13\sin\left(\frac{7\pi}{4}\right)=13\left(-\frac{\sqrt{2}}{2}\right) \end{align*} \]

    So the vector is $\frac{13\sqrt{2}}{2}\mathbb{i}-\frac{13\sqrt{2}}{2}\mathbb{j}$.

MyOpenMath: Find magnitude and angle of vector

Word Problems

Most things in nature can be described in vectors. A force acting on an object will have a magnitude, how strong the force is, and a direction in which it is being applied. Whenever a rock is thrown through the air, it will have a horizontal velocity and a vertical one. We can condense and simplify many calculations by thinking with vectors.

Example: Ball in the air

A ball is thrown at an initial speed of 25mph in a direction that makes an angle $30^\circ$ with the positive x axis. Express the velocity of the vector $\vec{v}$ in terms of $\mathbb{i}$ and $\mathbb{j}$.

Show Solution

The direction is already measured from the positive $x$-axis, so we can go straight to components:

\[ \begin{align*} v_x&=25\cos30^\circ=25\cdot\frac{\sqrt{3}}{2}=\frac{25\sqrt{3}}{2} \\ v_y&=25\sin30^\circ=25\cdot\frac{1}{2}=\frac{25}{2} \end{align*} \]

So the velocity vector is

$$ \vec{v}=\frac{25\sqrt{3}}{2}\mathbb{i}+\frac{25}{2}\mathbb{j} $$

In decimal form, that's about $\vec{v}\approx 21.7\mathbb{i}+12.5\mathbb{j}$ mph.

Example: Wind Blowing

The wind is blowing at 20mph in the direction of $N30^\circ W$. Express its velocity as a vector in rectangular form.

Show Solution

The bearing $N30^\circ W$ means 30 degrees west of north. In standard-position angle measure (from the positive $x$-axis), that is

$$ \theta=120^\circ $$

Now break the 20 mph speed into components:

\[ \begin{align*} v_x&=20\cos120^\circ=20\left(-\frac{1}{2}\right)=-10 \\ v_y&=20\sin120^\circ=20\cdot\frac{\sqrt{3}}{2}=10\sqrt{3} \end{align*} \]

So the wind velocity vector is

$$ \vec{v}=-10\mathbb{i}+10\sqrt{3}\mathbb{j} $$

Numerically, $\vec{v}\approx -10\mathbb{i}+17.3\mathbb{j}$ mph.

Example: Plane flying

A plane with an airspeed of 450 mph is flying in the direction of $N35^\circ E$. Express its velocity as a vector in rectangular form.

Show Solution

For a bearing of $N35^\circ E$, start at north and rotate 35 degrees toward east. In standard position that gives

$$ \theta=55^\circ $$

Now use components with magnitude 450 mph:

\[ \begin{align*} v_x&=450\cos55^\circ\approx 258.1 \\ v_y&=450\sin55^\circ\approx 368.6 \end{align*} \]

So the plane's velocity vector is

$$ \vec{v}=450\cos55^\circ,\mathbb{i}+450\sin55^\circ,\mathbb{j}\approx 258.1\mathbb{i}+368.6\mathbb{j} $$

Example: All together now

A small plane is flying at a speed of 200mph on a bearing $N55^\circ E$. The wind is blowing from west to east at 35 miles per hour. Approximate the ground speed of the plane in mph to the nearest tenth.

Show Solution

Let's combine the plane's velocity and the wind velocity as vectors.

Plane: speed 200 mph on bearing $N55^\circ E$. In standard position that is

$$ \theta=35^\circ $$

So the plane's air-velocity is

\[ \vec{v}_{plane}=\langle 200\cos35^\circ, 200\sin35^\circ\rangle\approx\langle 163.8,114.7\rangle \]

Wind: west to east at 35 mph means

$$ \vec{v}_{wind}=\langle 35,0\rangle $$

Ground velocity is the sum:

\[ \begin{align*} \vec{v}_{ground}&=\vec{v}_{plane}+\vec{v}_{wind} \\ &\approx \langle 163.8,114.7\rangle+\langle 35,0\rangle \\ &\approx \langle 198.8,114.7\rangle \end{align*} \]

Ground speed is the magnitude:

\[ \begin{align*} ||\vec{v}_{ground}||&\approx\sqrt{198.8^2+114.7^2}\\ &\approx 229.5 \end{align*} \]

So the plane's ground speed is approximately 229.5 mph.

MyOpenMath: A plane in the wind

Projection and the Dot Product

Imagine taking two vectors, both based at the origin, and casting a light normal (perpendicular) to one of the vectors. One vector would cast a shadow onto the other vector. This is called a projection.

Projection Visualization

Definition: Projection and Dot Product

Projection in $\mathbb{R}^2$ is the operation of taking one vector and extracting the component of it that lies along the direction of another vector. Given vectors $\vec{a}=\langle a_x,a_y\rangle$ and $\vec{b}=\langle b_x,b_y\rangle$, the projection of $\vec{b}$ onto $\vec{a}$ is

$$\text{proj}_ab = \frac{\vec{a}\cdot\vec{b}}{\vec{b}\cdot\vec{b}}\vec{b}$$

where $\vec{a}\cdot\vec{b}$ is the dot product of $\vec{a}$ and $\vec{b}$

$$\vec{a}\cdot\vec{b} = a_xb_x + a_yb_y$$

Vectors don't have a traditional multiplication. We've seen that they have scalar multiplication where you take a real number and scale the vector by multiplying its components, $c\langle b_x,b_y \rangle = \langle cb_x,cb_y \rangle$. The dot product being defined here is a type of inner product, an operation that uses the components of the vectors. A dot product takes two vectors and returns a real number. This real number describes how much of $\vec{b}$ gets projected onto $\vec{a}$

  1. If $\vec{a}\cdot\vec{b}$ is positive, the angles are pointing mostly in the same direction. The angle they make is acute.
  2. If $\vec{a}\cdot\vec{b}$ is negative, the angles are poiting mostly in the opposite direction. The angle the make is obtuse.
  3. If $\vec{a}\cdot\vec{b}=0$, the vectors are orthogonal (perpendicular).
  4. If $\vec{a}\cdot\vec{b}=\pm||\vec{a}||||\vec{b}||$, the vectors are parallel. They point in the same direction if this number is positive, and the opposite if negative.

Example: Using the dot product

Determine if the following vectors are orthogonal, parallel, or neither.

  1. $\vec{u}=(2,3)$ and $\vec{v}=(-3,2)$
  2. $\vec{u}=(2,4)$ and $\vec{v}=(1,2)$
  3. $\vec{u}=(1,2)$ and $\vec{v}=(3,4)$

::solution

  1. With $\vec{u}=(2,3)$ and $\vec{v}=(-3,2)$, we compute the dot product. $$ \vec{u}\cdot\vec{v} = 2(-3) + 3(2) = -6 + 6 = 0 $$ Since $\vec{u}\cdot\vec{v}=0$, the vectors are orthogonal.
  2. With $\vec{u}=(2,4)$ and $\vec{v}=(1,2)$, we can see that these are scalar multiples of one another, $\vec{u}=2\vec{v}$. So it is clear they are parallel, but for the sake of example lets pretend we didn't notice.

    Compute the dot product. $$ \vec{u}\cdot\vec{v} = 2(1) + 4(2) = 2 + 8 = 10 $$

    The magnitude of each vector. $$ |\vec{u}| = \sqrt{2^2 + 4^2} = \sqrt{4 + 16} = \sqrt{20} $$ $$ |\vec{v}| = \sqrt{1^2 + 2^2} = \sqrt{1 + 4} = \sqrt{5} $$

    Then check if the product of the magnitudes is the same as the dot product. $$ |\vec{u}||\vec{v}| = \sqrt{20}\cdot\sqrt{5} = \sqrt{100} = 10 $$

    It is! So these vectors are parallel.

  3. $$ \vec{u}\cdot\vec{v} = 1(3) + 2(4) = 3 + 8 = 11 \neq 0 $$ $$ \vec{u}\cdot\vec{v} = 1(3) + 2(4) = 3 + 8 = 11 $$

    $$ |\vec{u}||\vec{v}| = (\sqrt{1^2 + 2^2})(\sqrt{3^2 + 4^2}) = 5\sqrt{5} $$

    These are not the same, and they are not zero, so these vectors are neither parallel nor orthogonal.

:::

MyOpenMath: Try your own!

We can find the angle between two vectors by moving our projection equation around a bit.

Definition: Angle between vectors

The angle between two vectors is given by

$$\cos\theta=\frac{\vec{a}\cdot \vec{b}}{||\vec{a}||||\vec{b}||}$$

Example: Find the angle between to vectors

For the following paris of vectors, find the angle between them. Round to the nearest tenth of a degree.

  1. $\vec{u}=4\mathbb{i}-3\mathbb{j}$ and $\vec{v}=2\mathbb{i}+5\mathbb{j}$
  2. $\vec{u}=\mathbb{i}-\mathbb{j}$ and $\vec{v}=\mathbb{i}+\mathbb{j}$
  3. $\vec{u}=2\mathbb{i}+\mathbb{j}$ and $\vec{v}=-4\mathbb{i}-2\mathbb{j}$
  4. $\vec{u}=3\mathbb{i}+3\mathbb{j}$ and $\vec{v}=-6\mathbb{i}-8\mathbb{j}$

::solution We'll use

$$ \cos\theta=\frac{\vec{u}\cdot\vec{v}}{|\vec{u}||\vec{v}|} $$

for each pair. The game plan is always the same: compute the dot product, compute both magnitudes, plug in, then take inverse cosine.

  1. $\vec{u}=4\mathbb{i}-3\mathbb{j}=\langle 4,-3\rangle$ and $\vec{v}=2\mathbb{i}+5\mathbb{j}=\langle 2,5\rangle$

    \[ \begin{align*} \vec{u}\cdot\vec{v}&=4(2)+(-3)(5)=8-15=-7 \\ \|\vec{u}\|&=\sqrt{4^2+(-3)^2}=\sqrt{16+9}=5 \\ \|\vec{v}\|&=\sqrt{2^2+5^2}=\sqrt{29} \end{align*} \]
    \[ \begin{align*} \cos\theta&=\frac{-7}{5\sqrt{29}} \\ \theta&=\cos^{-1}\left(\frac{-7}{5\sqrt{29}}\right)\approx 105.1^\circ \end{align*} \]

    So the angle is approximately $105.1^\circ$.

  2. $\vec{u}=\mathbb{i}-\mathbb{j}=\langle 1,-1\rangle$ and $\vec{v}=\mathbb{i}+\mathbb{j}=\langle 1,1\rangle$

    \[ \begin{align*} \vec{u}\cdot\vec{v}&=1(1)+(-1)(1)=0 \\ \|\vec{u}\|&=\sqrt{1^2+(-1)^2}=\sqrt{2} \\ \|\vec{v}\|&=\sqrt{1^2+1^2}=\sqrt{2} \end{align*} \]
    \[ \begin{align*} \cos\theta&=\frac{0}{\sqrt{2}\cdot\sqrt{2}}=0 \\ \theta&=\cos^{-1}(0)=90.0^\circ \end{align*} \]

    So the angle is $90.0^\circ$.

  3. $\vec{u}=2\mathbb{i}+\mathbb{j}=\langle 2,1\rangle$ and $\vec{v}=-4\mathbb{i}-2\mathbb{j}=\langle -4,-2\rangle$

    \[ \begin{align*} \vec{u}\cdot\vec{v}&=2(-4)+1(-2)=-8-2=-10 \\ \|\vec{u}\|&=\sqrt{2^2+1^2}=\sqrt{5} \\ \|\vec{v}\|&=\sqrt{(-4)^2+(-2)^2}=\sqrt{20}=2\sqrt{5} \end{align*} \]
    \[ \begin{align*} \cos\theta&=\frac{-10}{\sqrt{5}\cdot 2\sqrt{5}}=\frac{-10}{10}=-1 \\ \theta&=\cos^{-1}(-1)=180.0^\circ \end{align*} \]

    So the angle is $180.0^\circ$.

  4. $\vec{u}=3\mathbb{i}+3\mathbb{j}=\langle 3,3\rangle$ and $\vec{v}=-6\mathbb{i}-8\mathbb{j}=\langle -6,-8\rangle$

    \[ \begin{align*} \vec{u}\cdot\vec{v}&=3(-6)+3(-8)=-18-24=-42 \\ \|\vec{u}\|&=\sqrt{3^2+3^2}=\sqrt{18}=3\sqrt{2} \\ \|\vec{v}\|&=\sqrt{(-6)^2+(-8)^2}=\sqrt{100}=10 \end{align*} \]
    \[ \begin{align*} \cos\theta&=\frac{-42}{(3\sqrt{2})(10)}=\frac{-7}{5\sqrt{2}} \\ \theta&=\cos^{-1}\left(\frac{-7}{5\sqrt{2}}\right)\approx 171.9^\circ \end{align*} \]

    So the angle is approximately $171.9^\circ$.

:::

MyOpenMath: Try your own!