The Cross Product
Outline
- 1Definition
- 2Direction and length
- 3Properties
- 4Normal vectors and angles
- 5Group Work: shading
The cross product
For $\mathbf a=\langle a_1,a_2,a_3\rangle$ and $\mathbf b=\langle b_1,b_2,b_3\rangle$ in $\mathbb R^3$, the cross product $\mathbf a\times\mathbf b$ is a vector.
Example
$\mathbf a=\langle1,3,4\rangle$, $\mathbf b=\langle2,7,-5\rangle$:
The cross product is defined only for vectors in $\mathbb R^3$. Watch the minus sign on the $\mathbf j$ term.
Sliders set the components · drag to rotate
Direction and length of a × b
Let $\theta$ be the angle between $\mathbf a$ and $\mathbf b$, with $0\le\theta\le\pi$.
- Direction
- $\mathbf a\times\mathbf b$ is orthogonal to both $\mathbf a$ and $\mathbf b$. Its direction is given by the right-hand rule: curl the fingers from $\mathbf a$ toward $\mathbf b$, and the thumb points along $\mathbf a\times\mathbf b$.
- Length
- $\|\mathbf a\times\mathbf b\|=\|\mathbf a\|\,\|\mathbf b\|\sin\theta$.
Two nonzero vectors are parallel if and only if $\mathbf a\times\mathbf b=\mathbf 0$.
Properties of the cross product
For vectors $\mathbf a,\mathbf b,\mathbf c$ and a scalar $c$:
- $\mathbf a\times\mathbf b=-\,\mathbf b\times\mathbf a$
- $(c\mathbf a)\times\mathbf b=c(\mathbf a\times\mathbf b)=\mathbf a\times(c\mathbf b)$
- $\mathbf a\times(\mathbf b+\mathbf c)=\mathbf a\times\mathbf b+\mathbf a\times\mathbf c$
- $(\mathbf a+\mathbf b)\times\mathbf c=\mathbf a\times\mathbf c+\mathbf b\times\mathbf c$
- $\mathbf a\cdot(\mathbf b\times\mathbf c)=(\mathbf a\times\mathbf b)\cdot\mathbf c$
Why?
Expanding $\mathbf a\cdot(\mathbf b\times\mathbf c)$ along the first row gives a determinant:
$$\mathbf a\cdot(\mathbf b\times\mathbf c)=\begin{vmatrix}a_1&a_2&a_3\\b_1&b_2&b_3\\c_1&c_2&c_3\end{vmatrix}$$In the same way, $(\mathbf a\times\mathbf b)\cdot\mathbf c=\mathbf c\cdot(\mathbf a\times\mathbf b)$ is the determinant with rows $\mathbf c,\mathbf a,\mathbf b$. Moving row $\mathbf c$ from the top to the bottom takes two row swaps, and each swap changes the sign, so the two determinants are equal.
- $\mathbf a\times(\mathbf b\times\mathbf c)=(\mathbf a\cdot\mathbf c)\mathbf b-(\mathbf a\cdot\mathbf b)\mathbf c$
Why?
Idea. $\mathbf b\times\mathbf c$ is perpendicular to the plane of $\mathbf b$ and $\mathbf c$. Crossing it with $\mathbf a$ gives a vector perpendicular to $\mathbf b\times\mathbf c$, so the result lies back in that plane: it equals $s\,\mathbf b+t\,\mathbf c$ for some numbers $s,t$. The formula says $s=\mathbf a\cdot\mathbf c$ and $t=-\,\mathbf a\cdot\mathbf b$.
Quick check with $\mathbf a=\mathbf i$, $\mathbf b=\mathbf i$, $\mathbf c=\mathbf j$:
$$\begin{aligned}\text{left side: }&\ \mathbf i\times(\mathbf i\times\mathbf j)=\mathbf i\times\mathbf k=-\mathbf j\\ \text{right side: }&\ (\mathbf i\cdot\mathbf j)\,\mathbf i-(\mathbf i\cdot\mathbf i)\,\mathbf j=0-\mathbf j=-\mathbf j\end{aligned}$$Proof (first component; the other two are the same). Let $\mathbf w=\mathbf b\times\mathbf c$, so $w_2=b_3c_1-b_1c_3$ and $w_3=b_1c_2-b_2c_1$.
- First component of $\mathbf a\times\mathbf w$: $$a_2w_3-a_3w_2$$
- Substitute and expand: $$a_2b_1c_2-a_2b_2c_1-a_3b_3c_1+a_3b_1c_3$$
- Group the $b_1$ terms and the $c_1$ terms: $$b_1(a_2c_2+a_3c_3)-c_1(a_2b_2+a_3b_3)$$
- Add and subtract $a_1b_1c_1$ to complete both dot products: $$\begin{aligned}&b_1(a_1c_1+a_2c_2+a_3c_3)-c_1(a_1b_1+a_2b_2+a_3b_3)\\&=b_1(\mathbf a\cdot\mathbf c)-c_1(\mathbf a\cdot\mathbf b)\end{aligned}$$
- This is the first component of $(\mathbf a\cdot\mathbf c)\mathbf b-(\mathbf a\cdot\mathbf b)\mathbf c$
Standard basis vectors
The cross product is not commutative and not associative: in general $(\mathbf a\times\mathbf b)\times\mathbf c\neq\mathbf a\times(\mathbf b\times\mathbf c)$.
A normal vector to a triangle
Two tools for the group work: a cross product gives a normal vector, and a dot product gives an angle.
Normal vector
For a triangle with vertices $P$, $Q$, $R$, the vector
is orthogonal to the plane of the triangle. The vector $-\mathbf n$ is also a normal vector, so choose the sign that points the way you need.
Angle between two vectors
Example
$P=(1,0,0)$, $Q=(0,2,0)$, $R=(0,0,3)$: $\overrightarrow{PQ}=\langle-1,2,0\rangle$, $\overrightarrow{PR}=\langle-1,0,3\rangle$, so $\mathbf n=\langle6,3,2\rangle$ and the area is $\tfrac12\|\mathbf n\|=\tfrac72$.
Drag to rotate · double-click to reset
Group Work: Shading a surface
How bright should a piece of a surface look on screen?
To shade a small flat piece of a surface, a computer compares two vectors:
- the direction of the light rays, and
- a normal vector to the piece.
The angle between them is found with the dot product. Both vectors are drawn from the same point, so when the light falls on the side the normal points to, the angle is obtuse.
- Angle $180^\circ$
- The light hits the piece straight on. It looks bright.
- Angle below $180^\circ$
- The light hits at a slant. It looks dimmer.
Group Work: Problems
The light source is directly above the $xy$-plane, so the light rays travel in the direction $\langle0,0,-1\rangle$.
- Find the angle between the light rays and a normal vector of the triangle with vertices $(3,2,4)$, $(2,5,3)$, $(1,2,6)$.
Draw both vectors from the same point. Your answer should be an obtuse angle.
- Repeat Problem 1 for the triangle with vertices $(3,5,2)$, $(3,3,1)$, $(1,3,1)$.
- We stand above the light source and look down at the $xy$-plane. Which of the two triangles looks brighter?
Drag to rotate · double-click to reset
Solution to Problem 1
$P=(3,2,4)$, $Q=(2,5,3)$, $R=(1,2,6)$. The light direction is $\mathbf d=\langle0,0,-1\rangle$.
- Edge vectors:
$$\overrightarrow{PQ}=\langle-1,3,-1\rangle,\qquad \overrightarrow{PR}=\langle-2,0,2\rangle$$
- Normal vector:
$$\mathbf n=\overrightarrow{PQ}\times\overrightarrow{PR}=\langle6,4,6\rangle$$
It points up ($n_3>0$), so we keep it.
- Angle with the light direction:
$$\cos\theta=\frac{\mathbf n\cdot\mathbf d}{\|\mathbf n\|\,\|\mathbf d\|}=\frac{-6}{\sqrt{88}}\approx-0.640$$$$\theta\approx129.76^\circ$$
Drag to rotate · double-click to reset
Solution to Problem 2
$P=(3,5,2)$, $Q=(3,3,1)$, $R=(1,3,1)$. The light direction is $\mathbf d=\langle0,0,-1\rangle$.
- Edge vectors:
$$\overrightarrow{PQ}=\langle0,-2,-1\rangle,\qquad \overrightarrow{PR}=\langle-2,-2,-1\rangle$$
- Normal vector:
$$\overrightarrow{PQ}\times\overrightarrow{PR}=\langle0,2,-4\rangle$$
It points down, so use $\mathbf n=\langle0,-2,4\rangle$.
- Angle with the light direction:
$$\cos\theta=\frac{\mathbf n\cdot\mathbf d}{\|\mathbf n\|\,\|\mathbf d\|}=\frac{-4}{\sqrt{20}}\approx-0.894$$$$\theta\approx153.43^\circ$$
Drag to rotate · double-click to reset
Solution to Problem 3
Both normals point up, toward us and toward the light, so we see the lit side of both triangles.
| Triangle | $\theta$ | $|\cos\theta|$ |
|---|---|---|
| Problem 1 | $129.76^\circ$ | $0.640$ |
| Problem 2 | $153.43^\circ$ | $0.894$ |
The closer the angle is to $180^\circ$, the more directly the light hits the triangle.
$|\cos\theta|=0.640$
$|\cos\theta|=0.894$
Drag to rotate · double-click to reset