Vectors, Dot Products, and Cross Products

When studying the flight of an airplane, a rocket firing, or countless other applications, we can use vectors to mathematically describe what's going on. A vector has two components: magnitude and direction. This is similar to the use of polar coordinates, where we describe a point by its distance from the origin (like the magnitude of a vector) and the angle formed by the line from the origin to the point (like the direction of a vector).

Since all that distinguishes a vector from other vectors is its magnitude and direction, we can move it around at will. Therefore, for the sake of convenience, we often place the tail of the vector at the origin and describe the vector by the location of the head. This way of describing a vector looks just like describing a point, so to be clear that we're talking about a vector (that when the tail is placed at the origin has its head at this location), we use angled brackets, like so: v=1,3,5\vec{v} = \langle 1,3,5 \rangle This vector is shown below.

Vector 1,3,5

Magnitude

The magnitude of this vector is given by v=x2+y2+z2=12+32+52=35\begin{aligned} |\vec{v}| &= \sqrt{x^2 + y^2 + z^2}\ &= \sqrt{1^2 + 3^2 + 5^2}\ &= \sqrt{35} \end{aligned}

Standard Unit Vectors

A unit vector is a vector with magnitude 11. The standard unit vectors point in the direction of the xx axis, yy axis, and zz axis. Note that the hat on these vectors denotes that they are unit vectors; whenever we write a vector with a hat like this, we'll mean a unit vector.

i^=1,0,0j^=0,1,0k^=0,0,1\begin{aligned} \hat{i} &= \langle 1,0,0 \rangle\ \hat{j} &= \langle 0,1,0 \rangle\ \hat{k} &= \langle 0,0,1 \rangle \end{aligned}

In R2\mathbb{R}^2, we only need two standard unit vectors: i^=1,0 and j^=0,1.\hat{i} = \langle 1,0 \rangle \text{ and } \hat{j} = \langle 0,1 \rangle.

In Rn\mathbb{R}^n, we need nn unit vectors, usually written e1^,e2^,e3^,,en^\hat{e_1}, \hat{e_2}, \hat{e_3}, \ldots, \hat{e_n} where en^\hat{e_n} has a 11 in the nth position and 00's elsewhere.

Vectors in rectangular coordinates can be expressed in terms of these standard unit vectors.

Write v=2,6,17\vec{v} = \langle −2,6,17 \rangle in terms of the standard unit vectors.

Solution

v=2,6,17=2i^+6j^+17k^\vec{v} = \langle −2,6,17 \rangle = \ans{−2\hat{i}+6\hat{j}+17\hat{k}}

If v=5,2,3=5i^+2j^3k^\vec{v} = \langle 5,2,−3 \rangle = 5\hat{i} + 2\hat{j} − 3\hat{k}, find 2v2\vec{v}.

Solution

2v=10,4,6=10i^+4j^6k^2\vec{v} = \langle 10,4,−6 \rangle = \ans{10\hat{i}+4\hat{j}−6\hat{k}}

Adding / Subtracting Vectors

Visually, to add two vectors, place the tail of one at the head of the other and find the resulting vector. Numerically, simply add/subtract the components.

If u=3i^2j^+5k^u⃗ =3\hat{i}−2\hat{j}+5\hat{k} and v=4i^+6k^v⃗ =4\hat{i}+6\hat{k}, find 3u+v3u⃗ +v⃗.

Solution

3u+v=9i^6j^+15k^+4i^+6k^=13i^6j^+21k^\begin{aligned} 3u⃗ +v⃗ &= 9\hat{i}−6\hat{j}+15\hat{k}+4\hat{i}+6\hat{k}\ &= \ans{13\hat{i}−6\hat{j}+21\hat{k}} \end{aligned}

Unit Vectors

If uu⃗ is any vector, u^\hat{u} is a unit vector in the direction of uu⃗. To find this unit vector, divide (u⃗) by its magnitude:

u^=uu\ans{\hat{u} = \dfrac{u⃗}{|u⃗|}}

If u=3,2,2u⃗ =⟨3,2,−2⟩, find u^\hat{u}.

Solution

The magnitude of uu⃗ is

u=32+22+(2)2=17,|u⃗|= \sqrt{3^2+2^2+(−2)^2} = \sqrt{17}, so the unit vector is u^=1173,2,2=31717,21717,21717\hat{u}=\dfrac{1}{\sqrt{17}} ⟨3,2,−2⟩ = \ans{\left⟨ \dfrac{3\sqrt{17}}{17}, \dfrac{2\sqrt{17}}{17}, −\dfrac{2\sqrt{17}}{17} \right⟩}

Find a vector in the same direction as v=8i^j^+4k^v⃗ =8\hat{i}−\hat{j}+4\hat{k} that is 44 units long.

Solution

To find this, first find a unit vector in the same direction as vv⃗ and then multiply it by 44.

v=82+(1)2+42=81=9,|v⃗| = \sqrt{8^2+(−1)^2+4^2} = \sqrt{81} = 9, so the unit vector is v^=198,1,4.\hat{v} = \dfrac{1}{9} ⟨8,−1,4⟩. Therefore, 4v^=498,1,44\hat{v} = \ans{\dfrac{4}{9} ⟨8,-1,4⟩}

Application: Statics

Find T1T_1 and T2T_2, the tension in the two cables below.

400 pound weight hanging from two cables at 30 and 60 degrees

Start by representing the forces with vectors: Three vectors -- 400 pounds downward, two upward at 30 and 60 degrees from the horizontal with unknown tensions

If this system is in static equilibrium (nothing is moving), it means that the three forces must cancel each other, meaning that if we add the three vectors, the result must be 00: T1+T2400j^=0T1+T2=400j^T1ii^+T1jj^+T2ii^+T2jj^=400j^    T1i+T2i=0T1j+T2j=400    T1cos60+T2cos30=0T1sin60+T2sin30=400    12T1+32T2=032T1+12T2=400    T1=346.41 lb and T2=200 lb\begin{aligned} &\vec{T_1} + \vec{T_2} - 400\hat{j} = 0 \longrightarrow \vec{T_1}+\vec{T_2} = 400\hat{j}\ &T_{1i}\hat{i}+T_{1j}\hat{j}+T_{2i}\hat{i}+T_{2j}\hat{j} = 400\hat{j}\ \ \implies &T_{1i}+T_{2i}=0\ &T_{1j}+T_{2j}=400\ \ \implies &-|T_1| \cos 60^{\circ} + |T_2|\cos 30^{\circ} = 0\ &|T_1|\sin 60^{\circ}+|T_2|\sin 30^{\circ} = 400\ \ \implies &-\dfrac{1}{2}|T_1|+\dfrac{\sqrt{3}}{2}|T_2| = 0\ &\dfrac{\sqrt{3}}{2}|T_1| + \dfrac{1}{2}|T_2| = 400\ \ \implies &\ans{T_1 = 346.41 \textrm{ lb and } T_2 = 200 \textrm{ lb}} \end{aligned}

Dot Product (Scalar Product)

The dot product, one of two ways to multiply a vector, is defined as follows: if u=u1,u2,u3u⃗ = ⟨u_1,u_2,u_3⟩ and v=v1,v2,v3v⃗ = ⟨v_1,v_2,v_3⟩, then uv=u1v1+u2v2+u3v3=uvcosθ\ans{\begin{aligned} \vec{u} \cdot \vec{v} &= u_1v_1 + u_2v_2 + u_3v_3\ &= |\vec{u}| |\vec{v}| \cos \theta \end{aligned}}

where θ\theta is the angle between the two vectors. Note that the result is a scalar, which is why this is called the scalar product.

Also note that uu=u2\vec{u} \cdot \vec{u} = |\vec{u}|^2

Let u=2,3,4u⃗ = ⟨2,−3,4⟩, v=4,3,5v⃗ = ⟨4,−3,5⟩, and w=1,1,3w⃗ =⟨1,1,−3⟩. Find uvu⃗ ⋅ v⃗ , 2vw2v⃗ ⋅ w⃗, and the angle between uu⃗ and vv⃗.

Solution

  1. uv\vec{u} \cdot \vec{v}: uv=(2)(4)+(3)(3)+(4)(5)=37\vec{u} \cdot \vec{v} = (2)(4)+(-3)(-3)+(4)(5) = \ans{37}

  2. 2vw2v⃗ ⋅ w⃗: 2vw=(8)(1)+(6)(1)+(10)(3)=282\vec{v} \cdot \vec{w} = (8)(1)+(-6)(1)+(10)(-3) = \ans{-28} [note that (2v)w=2(vw)(2\vec{v})\cdot \vec{w} = 2(\vec{v} \cdot \vec{w})]

  3. The angle between u\vec{u} and v\vec{v}: uv=37=uvcosθ=(4+9+16)(16+9+25)cosθcosθ=3729 50=13.7\begin{aligned} \vec{u} \cdot \vec{v} = 37 &= |\vec{u}| |\vec{v}| \cos \theta\ &= (\sqrt{4+9+16}) (\sqrt{16+9+25}) \cos \theta\ \longrightarrow \cos \theta &= \dfrac{37}{\sqrt{29}\ \sqrt{50}} = \ans{13.7^{\circ}} \end{aligned}

Orthogonal (or Perpendicular) Vectors

Two vectors are orthogonal if the angle between them is θ=π2θ=\dfrac{\pi}{2}. In terms of the dot product, this means that two vectors uu⃗ and vv⃗ are orthogonal iff (if and only if) uv=0u⃗ ⋅ v⃗ = 0.

Let u=3i^=3,0,0u⃗ = 3\hat{i} = ⟨3,0,0⟩ and v=2j^=0,2,0v⃗ = −2\hat{j} = ⟨0,−2,0⟩. Show that uu⃗ and vv⃗ are orthogonal.

Solution

uv=0, so the vectors are orthogonal.\vec{u} \cdot \vec{v} = 0 \text{, so the vectors are orthogonal.}

Projection of uu⃗ onto vv⃗ (or vice versa)

The projection of one vector onto another can be thought of as the shadow that one vector casts onto the other, as shown below.

Vector projection

To find the projection of uu⃗ onto vv⃗, find the magnitude of the projection and multiply it by v^=vv.\hat{v} = \dfrac{v⃗}{|v⃗|}. The magnitude of the projection is projv u=ucosθ,|proj_v\ u⃗| = |u⃗| \cos \theta, and since uv=uvcosθ,u⃗ ⋅ v⃗ = |u⃗||v⃗| \cos \theta, projv u=uvv.|proj_v\ u⃗| = \dfrac{u⃗ ⋅ v⃗}{|v⃗|}. Therefore, projv u=uvv vv=(uvvv)v.\ans{proj_v\ \vec{u} = \dfrac{\vec{u} \cdot \vec{v}}{|\vec{v}|} \ \dfrac{\vec{v}}{|\vec{v}|} = \left(\dfrac{\vec{u} \cdot \vec{v}}{\vec{v} \cdot \vec{v}}\right) \vec{v}.}

Find the projection of u=3,3,4\vec{u} = \langle 3,3,4 \rangle onto v=3,2,0\vec{v} = \langle 3,2,0 \rangle.

Solution

projv u=(uvvv)v=(9+6+09+4+0)3,2,0=15133,2,0=4513,3013,0\begin{aligned} proj_v\ \vec{u} &= \left(\dfrac{\vec{u} \cdot \vec{v}}{\vec{v} \cdot \vec{v}}\right) \vec{v}\ &= \left(\dfrac{9+6+0}{9+4+0}\right) \langle 3,2,0 \rangle = \dfrac{15}{13} \langle 3,2,0 \rangle\ &= \ans{\left\langle \dfrac{45}{13},\dfrac{30}{13},0 \right\rangle} \end{aligned}

For the next example, note that the work done by a force F\vec{F} acting to move an object along a vector d\vec{d} is given by W=Fd.W = \vec{F} \cdot \vec{d}.

Work Calculation

Find the work done in the figure below (think of pulling a cart with a rope).

Force of 15 pounds at 50 degrees left of the vertical acting over a distance of 4 feet to the left

Solution

W=Fd=(15 lb)(4 ft)cos40=45.96 ftlb\begin{aligned} W = \vec{F} \cdot \vec{d} &= (15 \ lb)(4\ ft) \cos 40^{\circ}\ &= \ans{45.96 \ ft-lb} \end{aligned}

Cross Product (Vector Product)

Application: Torque (Moments)

Force acting on a wrench to create torque

Let's say you want to tighten a nut as shown above. To tighten it as much as possible, you have two options: you can push harder on the wrench, or you can get a longer wrench. Think about pushing a door open; pushing closer to the hinges is harder, but if you push at the end away from the hinges, it's much easier. When you apply a force to turn something like the nut or the door, you are creating a moment or torque around the point of rotation. This torque depends on the force you apply and how far from the rotation point you apply that force; the magnitude of the torque is the product of these two.

M=rF|\vec{M}| = |\vec{r}| |\vec{F}| where M\vec{M} is the moment, rr⃗ is the moment arm, and F\vec{F} is the force that is applied perpendicular to the moment arm.

What if the force is applied at an angle, though? Without going into all the details, it turns out that only the perpendicular part of the force contributes to the moment, and the moment can be calculated using the cross product of rr⃗ and F\vec{F}: M=r×F\vec{M} = r⃗ × \vec{F}

Finding the Cross Product

The cross product u×vu⃗ × v⃗ yields a third vector that is perpendicular to both uu⃗ and vv⃗. The direction is specified by the right hand rule (RHR): if you start by pointing the fingers of your right hand along the first vector, then curl them in the direction of the second vector, your thumb will point in the direction of the cross product.

Right hand curling around arrow

Curve curling around z axis according to the right hand rule

Cross product

The magnitude of the cross product is u×v=uvsinθ|u⃗ × v⃗| = |u⃗| |v⃗| \sin \theta where θθ is the angle between uu⃗ and vv⃗. For instance, i^×j^=k^.\hat{i} × \hat{j} = \hat{k}.

We rarely use that formula to find the cross product; instead, we find the determinant of a specific matrix. We'll leave most of the discussion of determinants for Linear Algebra; for now, we'll just cover what we need.

If u=u1,u2,u3\vec{u} = ⟨u_1,u_2,u_3⟩ and v=v1,v2,v3\vec{v} = ⟨v_1,v_2,v_3⟩, then u×vu⃗ × v⃗ is given by the following determinant:

u×v=i^j^k^u1u2u3v1v2v3\vec{u} \times \vec{v} = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k}\ u_1 & u_2 & u_3\ v_1 & v_2 & v_3 \end{vmatrix}

To evaluate this determinant, cross out the row and column that intersect at i^\hat{i}, then the ones that intersect at j^\hat{j}, and finally the ones that intersect at k^\hat{k}. Find the determinants of these smaller matrices (called minors) by multiplying along the diagonals and subtracting, as shown:

2 by 2 discriminant

This probably all looks very confusing right now, but you end up with this:

3 by 3 discriminant

Be sure to note the minus sign on the j^\hat{j} minor. The first and third terms are positive, but this second term is negative. Also note that u×v = v×u\vec{u} \times \vec{v}\ \cancel{=}\ \vec{v} \times \vec{u}

More specifically, if you switch the order in the cross product, the result will have the same magnitude, but it will point in the opposite direction.

If u=2i^3j^+k^u⃗ = 2\hat{i}−3\hat{j}+\hat{k} and v=3i^+2j^+2k^v⃗ = 3\hat{i}+2\hat{j}+2\hat{k}, find u×vu⃗ × v⃗.

Solution

u×v=i^j^k^231322=(62)i^(43)j^+(4+9)k^=8i^j^+13k^\begin{aligned}\vec{u} \times \vec{v} &= \begin{vmatrix} \hat{i} & \hat{j} & \hat{k}\ 2 & -3 & 1\ 3 & 2 & 2 \end{vmatrix}\ &= (-6-2)\hat{i} - (4-3)\hat{j} + (4+9)\hat{k}\ &= -8\hat{i} - \hat{j} + 13\hat{k} \end{aligned}

If u=2i^3j^+k^u⃗ = 2\hat{i}−3\hat{j}+\hat{k} and v=3i^+2j^+2k^v⃗ = 3\hat{i}+2\hat{j}+2\hat{k}, find a vector that is orthogonal to both uu⃗ and vv⃗.

Solution

Remember that the cross product of two vectors is orthogonal to both, and we already found u×vu⃗ × v⃗. Therefore, w=8,1,13w⃗ = ⟨−8,−1,13⟩ or any multiple of ww⃗ will be orthogonal to both uu⃗ and vv⃗.