← M408M Week 7(1): The Cross Product
M408M · Week 7(1) Stewart §12.4

The Cross Product

Outline

  1. 1Definition
  2. 2Direction and length
  3. 3Properties
  4. 4Normal vectors and angles
  5. 5Group Work: shading
Review · Definition

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.

$$\begin{aligned}\mathbf a\times\mathbf b&=\begin{vmatrix}\mathbf i&\mathbf j&\mathbf k\\a_1&a_2&a_3\\b_1&b_2&b_3\end{vmatrix}\\&=\begin{vmatrix}a_2&a_3\\b_2&b_3\end{vmatrix}\mathbf i-\begin{vmatrix}a_1&a_3\\b_1&b_3\end{vmatrix}\mathbf j+\begin{vmatrix}a_1&a_2\\b_1&b_2\end{vmatrix}\mathbf k\end{aligned}$$
$$\mathbf a\times\mathbf b=\langle a_2b_3-a_3b_2,\ a_3b_1-a_1b_3,\ a_1b_2-a_2b_1\rangle$$

Example

$\mathbf a=\langle1,3,4\rangle$, $\mathbf b=\langle2,7,-5\rangle$:

$$\begin{aligned}\mathbf a\times\mathbf b&=\langle 3(-5)-4(7),\ 4(2)-1(-5),\ 1(7)-3(2)\rangle\\&=\langle-43,13,1\rangle\end{aligned}$$

The cross product is defined only for vectors in $\mathbb R^3$. Watch the minus sign on the $\mathbf j$ term.

xyz a b

Sliders set the components · drag to rotate

Review · Geometry

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$.
$$\|\mathbf a\times\mathbf b\|=\text{area of the parallelogram spanned by }\mathbf a\text{ and }\mathbf b$$
$$\text{area of the triangle with sides }\mathbf a,\mathbf b=\tfrac12\|\mathbf a\times\mathbf b\|$$

Two nonzero vectors are parallel if and only if $\mathbf a\times\mathbf b=\mathbf 0$.

Review · Properties

Properties of the cross product

For vectors $\mathbf a,\mathbf b,\mathbf c$ and a scalar $c$:

  1. $\mathbf a\times\mathbf b=-\,\mathbf b\times\mathbf a$
  2. $(c\mathbf a)\times\mathbf b=c(\mathbf a\times\mathbf b)=\mathbf a\times(c\mathbf b)$
  3. $\mathbf a\times(\mathbf b+\mathbf c)=\mathbf a\times\mathbf b+\mathbf a\times\mathbf c$
  4. $(\mathbf a+\mathbf b)\times\mathbf c=\mathbf a\times\mathbf c+\mathbf b\times\mathbf c$
  5. $\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.

  6. $\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$.

    1. First component of $\mathbf a\times\mathbf w$: $$a_2w_3-a_3w_2$$
    2. Substitute and expand: $$a_2b_1c_2-a_2b_2c_1-a_3b_3c_1+a_3b_1c_3$$
    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)$$
    4. 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}$$
    5. This is the first component of $(\mathbf a\cdot\mathbf c)\mathbf b-(\mathbf a\cdot\mathbf b)\mathbf c$

Standard basis vectors

$$\mathbf i\times\mathbf j=\mathbf k,\qquad \mathbf j\times\mathbf k=\mathbf i,\qquad \mathbf k\times\mathbf i=\mathbf j$$
$$\mathbf j\times\mathbf i=-\mathbf k,\qquad \mathbf a\times\mathbf a=\mathbf 0$$

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)$.

Review · Normal vectors and angles

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

$$\mathbf n=\overrightarrow{PQ}\times\overrightarrow{PR}$$

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

$$\cos\theta=\frac{\mathbf u\cdot\mathbf v}{\|\mathbf u\|\,\|\mathbf v\|},\qquad 0\le\theta\le\pi$$

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

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.
normal light normal light bright dimmer
Straight-on light makes an angle of $180^\circ$ with the normal; slanted light makes a smaller angle.
Group Work · Problems

Group Work: Problems

The light source is directly above the $xy$-plane, so the light rays travel in the direction $\langle0,0,-1\rangle$.

  1. 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.

  2. Repeat Problem 1 for the triangle with vertices $(3,5,2)$, $(3,3,1)$, $(1,3,1)$.
  3. We stand above the light source and look down at the $xy$-plane. Which of the two triangles looks brighter?
Triangle 1 and Triangle 2, with light rays coming straight down.

Drag to rotate · double-click to reset

Group Work · Solutions

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$.

  1. Edge vectors:
    $$\overrightarrow{PQ}=\langle-1,3,-1\rangle,\qquad \overrightarrow{PR}=\langle-2,0,2\rangle$$
  2. Normal vector:
    $$\mathbf n=\overrightarrow{PQ}\times\overrightarrow{PR}=\langle6,4,6\rangle$$

    It points up ($n_3>0$), so we keep it.

  3. 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$$
$\mathbf n$ and $\mathbf d$ are drawn from the same point of the triangle.

Drag to rotate · double-click to reset

Group Work · Solutions

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$.

  1. Edge vectors:
    $$\overrightarrow{PQ}=\langle0,-2,-1\rangle,\qquad \overrightarrow{PR}=\langle-2,-2,-1\rangle$$
  2. Normal vector:
    $$\overrightarrow{PQ}\times\overrightarrow{PR}=\langle0,2,-4\rangle$$

    It points down, so use $\mathbf n=\langle0,-2,4\rangle$.

  3. 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$$
$\mathbf n$ and $\mathbf d$ are drawn from the same point of the triangle.

Drag to rotate · double-click to reset

Group Work · Solutions

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.

The triangle from Problem 2 looks brighter, since $153.43^\circ$ is closer to $180^\circ$.
Problem 1
$|\cos\theta|=0.640$
Problem 2
$|\cos\theta|=0.894$
Each triangle is shaded by $|\cos\theta|$: the lighter color is the brighter triangle.

Drag to rotate · double-click to reset