Dot product and cross product (HL)

Contents

Angle between vectors

The angle θ\theta between vectors is the angle formed when their tails coincide.

Dot product

ab=abcosθ\bm a \cdot \bm b = \lvert \bm a\rvert\lvert \bm b\rvert \cos\theta

cosθ\cos\theta is also known as the direction cosine.

(x1,y1,z1)(x2,y2,z2)=x1x2+y1y2+z1z2(x_1, y_1, z_1)\cdot(x_2, y_2, z_2) = x_1x_2 + y_1y_2 + z_1z_2

The Cauchy-Schwartz inequality  is equivalent to

abab\lvert\bm a \cdot \bm b\rvert \leq \lvert\bm a\rvert\lvert\bm b\rvert

as cosθ1\lvert \cos \theta \rvert \leq 1.

Example: Find the angle between p=(4,2,5)\bm p = (4, -2, -5) and q=(2,0,1)\bm q = (-2, 0, -1).


Rearranging the dot product formula, we have

cosθ=pqpq=4(2)+(2)(0)+(5)(1)16+4+254+0+1=3455=3955=15θ=cos1(15)1.77  rad\begin{align*} \cos \theta &= \frac{\bm p \cdot \bm q}{\lvert\bm p\rvert\lvert\bm q\rvert} \\ &= \frac{4(-2)+(-2)(0)+(-5)(-1)}{\sqrt{16+4+25}\sqrt{4+0+1}} \\ &= \frac{-3}{\sqrt{45}\sqrt{5}} \\ &= \frac{-3}{\sqrt9 \sqrt5\sqrt5} \\ &= -\frac{1}{5} \\ \theta &= \cos^{-1}\left(-\frac15\right) \approx 1.77\;\text{rad} \qed \end{align*}

Cross product

The cross product a×b\bm a \times \bm b is perpendicular to both a\bm a and b\bm b

a×b=absinθn^\bm a \times \bm b = \lvert \bm a\rvert\lvert \bm b\rvert \sin\theta \,\bm{\hat n}

with n^\bm{\hat n} is some unit vector found by applying right hand rule.

The standard basis consisting of unit vectors i\bm i, j\bm j, k\bm k (ie. unit vectors in the positive xx, positive yy and positive zz directions) satisfies

i×j=k\bm i \times \bm j = \bm k
j×k=i\bm j \times \bm k = \bm i
k×i=j\bm k \times \bm i = \bm j

but also

j×i=k\bm j \times \bm i = \bm {-k}
k×j=i\bm k \times \bm j = \bm {-i}
i×k=j\bm i \times \bm k = \bm {-j}

By using these formulas on individual components, the cross product in components form is

a×b=+(y1z2y2z1)i+(z1x2z2x1)j+(x1y2x2y1)k\begin{align*} \bm a \times \bm b = &+ (y_1z_2 - y_2z_1)\bm i \\ &+ (z_1x_2 - z_2x_1)\bm j \\ &+ (x_1y_2 - x_2y_1)\bm k \end{align*}

There are various ways to make sense of the formula. One way to remember is to first write each vectors twice

x1y1z1x1y1z1x2y2z2x2y2z2\begin{matrix} \sout{\color{grey}x_1} & y_1 & z_1 & x_1 & y_1 & \sout{\color{grey}z_1} \\ \sout{\color{grey}x_2} & y_2 & z_2 & x_2 & y_2 & \sout{\color{grey}z_2} \end{matrix}

The components of the cross product, after ignoring first and last columns, are “diagonal down minus diagonal up”.

Alternatively, using the determinant of a 33 by 33 matrix

a×b=ijkx1y1z1x2y2z2\bm a \times \bm b = \begin{vmatrix} \bm i & \bm j & \bm k \\ x_1 & y_1 & z_1 \\ x_2 & y_2 & z_2 \end{vmatrix}

You are not required to interpret or simplify a determinant.

Example: Find a vector perpendicular to both v=(1,2,3)\bm v = (1, -2, -3) and w=(4,5,6)\bm w = (4, -5, 6).


v×w=+((2)(6)(3)(5))i+((3)(4)(6)(1))j+((1)(5)(2)(4))k=(27,18,3)\begin{align*} \bm v \times \bm w = &+\left((-2)(6)-(-3)(-5)\right) \bm i \\ &+\left((-3)(4) - (6)(1)\right) \bm j \\ &+\left((1)(-5)-(-2)(4)\right) \bm k \\ = &\,(-27, -18, 3) \qed \end{align*}

Note that this vector can be scaled by any non-zero constant, so the answer is far from unique. One such scalar multiple is (9,6,1){(9, 6, -1)}, which is the above vector multiplied by 13{-\frac13}.

Properties

For the following properties, terms other than parallel and perpendicular are not used on exams, but nevertheless be able to apply these properties.

propertiesdot productcross product
parallel vectorsab=abaa=a2\bm a \cdot \bm b = \lvert\bm a\rvert\lvert\bm b\rvert \\ \bm a \cdot \bm a = \lvert\bm a\rvert^2a×b=0\bm a \times \bm b = \bm 0
perpendicular vectorsab=0\bm a \cdot \bm b = 0a×b=abn^\bm a \times \bm b = \lvert\bm a\rvert\lvert\bm b\rvert \bm{\hat n}
commutativeab=ba\bm a \cdot \bm b = \bm b \cdot \bm aN/A
anticommutativeN/Aa×b=b×a\bm a \times \bm b = -\bm b \times \bm a
distributivek(ab)=(ka)b=a(kb)a(b+c)=ab+ack(\bm a \cdot \bm b) = (k\bm a) \cdot \bm b = \bm a \cdot (k\bm b) \\ \bm a \cdot (\bm b + \bm c) = \bm a \cdot \bm b + \bm a \cdot \bm ck(a×b)=(ka)×b=a×(kb)a×(b+c)=a×b+a×ck(\bm a \times \bm b) = (k\bm a) \times \bm b = \bm a \times (k\bm b) \\ \bm a\times(\bm b + \bm c) = \bm a \times \bm b + \bm a \times \bm c

Example: Given a=3\lvert\bm a\rvert = 3 and b=4\lvert\bm b\rvert = 4 and that a+2b\bm a + 2\bm b is perpendicular to 3ab3\bm a - \bm b, find the angle between a\bm a and b\bm b


(a+2b)(3ab)=03a2+5(ab)2b2=03(3)2+5abcosθ2(4)2=027+5(3)(4)cosθ32=060cosθ=5 cos1112=θ\begin{align*} (\bm a + 2\bm b) \cdot (3\bm a - \bm b) &= 0 \\ 3\lvert\bm a\rvert^2 + 5(\bm a \cdot \bm b) - 2\lvert\bm b\rvert^2 &= 0 \\ 3(3)^2 + 5\lvert\bm a\rvert\lvert\bm b\rvert \cos\theta - 2(4)^2 &= 0 \\ 27 + 5(3)(4) \cos\theta - 32 &= 0 \\ 60 \cos \theta &= 5\ \\ \cos^{-1} \frac{1}{12} &= \theta \qed \end{align*}

πcos1112\pi - \cos^{-1} \frac{1}{12} is accepted as well. The π\pi - angle is typically accepted for lines, and here when directions are unknown, but not for segments.