Skip to main content
Mathematics LibreTexts

1.5: The Dot and Cross Product

  • Page ID
    603
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Definition: The Dot Product

    We define the dot product of two vectors \(\textbf{v} = a \hat{\textbf{i}} + b \hat{\textbf{j}} \) and \(\textbf{w}= c \hat{\textbf{i}} + d \hat{\textbf{j}}\) to be

    \[\textbf{v} \cdot \textbf{w} = ac+bd.\nonumber \]

    Notice that the dot product of two vectors is a number and not a vector. For 3 dimensional vectors, we define the dot product similarly:

    Definition: Dot Products in \( \mathbb{R}^3 \)

    If

    \[\textbf{v} = a \hat{\textbf{i}} + b \hat{\textbf{j}}+ c \hat{\textbf{k}} \;\;\; \text{and}\;\;\; \textbf{w}= d \hat{\textbf{i}} + e \hat{\textbf{j}} + f \hat{\textbf{k}} \nonumber \]

    then

    \[ \textbf{v} \cdot \textbf{w} = ad + be + cf. \nonumber \]

    Example \(\PageIndex{1}\)

    If

    \[\textbf{v} = 2\; \hat{\textbf{i}} + 4\; \hat{\textbf{j}} \;\;\; \text{and} \;\;\; \textbf{w} = \hat{\textbf{i}} + 5\; \hat{\textbf{j}} \nonumber \]

    then

    \[ \textbf{v} \cdot \textbf{w} = (2)(1) + (4)(5) = 22. \nonumber \]

    Exercise \(\PageIndex{1}\)

    Find the dot product of \(2 \hat{\textbf{i}}+ \hat{\textbf{j}} - \hat{\textbf{k}} \) and \( \hat{\textbf{i}} + 2 \hat{\textbf{j}} \).

    The Angle Between Two Vectors

    We define the angle \(\theta \) between two vectors v and w by the formula

    \[ \cos q = \dfrac{\textbf{v} \cdot \textbf{w} }{|| \textbf{v} || || \textbf{w}|| }\nonumber \]

    so that

    \[ \textbf{v} \cdot \textbf{w} = ||\textbf{v}|| || \textbf{w} || \cos q. \nonumber \]

    Two vectors are called orthogonal if their angle is a right angle. We see that angles are orthogonal if and only if

    \[ \textbf{v} \cdot \textbf{w} = 0. \nonumber \]

    Example \(\PageIndex{2}\)

    To find the angle between

    \[ \textbf{v} = 2 \hat{\textbf{i}} + 3 \hat{\textbf{j}} + \hat{\textbf{k}} \nonumber \]

    and

    \[\textbf{w} = 4 \hat{\textbf{i}} + \hat{\textbf{j}} + 2 \hat{\textbf{k}} \nonumber \]

    we compute:

    \[||\textbf{v}|| = \sqrt{4 + 9 +1} = \sqrt{14} \nonumber \]

    and

    \[ || \textbf{w} || = \sqrt{16 + 1 +4} = \sqrt{21} \nonumber \]

    and

    \[\textbf{v} \cdot \textbf{w} = 8 + 3 + 2 = 13. \nonumber \]

    Hence

    \[ \theta = \cos^{-1}\left( \dfrac{13}{\sqrt{14} \sqrt{21}} \right). \nonumber \]

    Definition: Directional Cosines

    Let

    \[\textbf{v} = a \hat{\textbf{i}} + b \hat{\textbf{j}} + c \hat{\textbf{k}} \nonumber \]

    be a vector, then we define the direction cosines to be the following:

    1.

    \[ \cos a = \dfrac{a}{||\textbf{v} ||},\nonumber \]

    2.

    \[\cos b = \dfrac{b}{ ||\textbf{v} || }, \nonumber \]

    3.

    \[ \cos c = \dfrac{c}{||\textbf{v}||}. \nonumber \]

    Projections and Components Suppose that a car is stopped on a steep hill, and let g be the force of gravity acting on it. We can split the vector g into the component that is pushing the car down the road and the component that is pushing the car onto the road. We define

    Definition: Projection

    Let u and v be a vectors. Then u can be broken up into two components, r and s such that r is parallel to v and s is perpendicular to v. r is called the projection of u onto v and sis called the component of u perpendicular to v.

    We see that

    \[\begin{align*} \textbf{u} \cdot \textbf{v} = || \textbf{u} || \; || \textbf{v}|| \cos q &= \dfrac{|| \textbf{u} || \; || \textbf{v} || \text{proj}_{\textbf{v}} \textbf{u} }{||\textbf{u}||} \\ &= ||\textbf{v} || \; || \text{proj}_{\textbf{v}} \textbf{u} ||. \end{align*} \nonumber \]

    alt

    hence

    \(\textbf{u} \cdot \textbf{v} = \dfrac{||\text{proj}_{\textbf{v}}\textbf{u} ||}{|| \textbf{v} ||}\)

    We can calculate the projection of u onto v by the formula:

    \(\text{proj}_{\textbf{v}}\textbf{u} = \dfrac{\textbf{u} \cdot \textbf{v} }{|| \textbf{v}||^2 } \textbf{v} \).

    Notice that this works since if we take magnitudes of both sides we get that

    \[|| \text{proj}_{\textbf{v}} \textbf{u} || = \dfrac{ \textbf{u} \cdot \textbf{v} }{ || \textbf{v} ||^2 } || \textbf{v}|| \nonumber \]

    and the right hand side simplifies to the formula above. The direction is correct since the right hand side of the formula is a constant multiple of v so the projection vector is in the direction of v as required.

    To find the vector s, notice from the diagram that

    \[ \text{proj}_{\textbf{v}} \textbf{u} + \textbf{s} = \textbf{u} \nonumber \]

    so that

    \[ \textbf{s} = \textbf{u} - \text{proj}_{ \textbf{v} } \textbf{u}. \nonumber \]

    Work

    The work done by a constant force F along PQ is given by

    \[W=\textbf{F}\cdot PQ. \nonumber \]

    Example \(\PageIndex{3}\)

    Find the work done against gravity to move a 10 kg baby from the point \((2,3)\) to the point \((5,7)\)?

    Solution

    We have that the force vector is

    \[ \textbf{F} = m \textbf{a} = (10 )(-9.8 \hat{\textbf{j}}) = -98 \hat{\textbf{j}}\nonumber \]

    and the displacement vector is

    \[\textbf{v} = (5-2) \hat{\textbf{i}} + (7-3) \hat{\textbf{j}} = 3 \hat{\textbf{i}} + 4 \hat{\textbf{j}}.\nonumber \]

    The work is the dot product

    \[\begin{align*} W = \textbf{F} \cdot \textbf{v} &= (-98 \hat{\textbf{j}} ) \cdot (3 \hat{\textbf{i}} + 4 \hat{\textbf{j}} ) \\ &= (0)(3) + (-98) (4) \\ &= -392. \end{align*} \nonumber \]

    Notice the negative sign verifies that the work is done against gravity. Hence, it takes 392 J of work to move the baby.

    Torque

    Suppose you are skiing and have a terrible fall. Your body spins around and you ski stays in place (do not try this at home). With proper bindings your bindings will release and your ski will come off. The bindings recognize that a force has been applied. This force is called torque. To compute it we use the cross produce of two vectors which not only gives the torque, but also produces the direction that is perpendicular to both the force and the direction of the leg.

    Definition: Cross Product

    Let \(\textbf{u} = a \hat{\textbf{i}} + b \hat{\textbf{j}} + c \hat{\textbf{k}}\) and \(\textbf{v} = d \hat{\textbf{i}} + e \hat{\textbf{j}} + f \hat{\textbf{k}} \) be vectors. Then we define the cross product \(\textbf{v} \times \textbf{w} \) by the determinant of the matrix:

    \[\begin{pmatrix} \hat{\textbf{i}} & \hat{\textbf{j}} &\hat{\textbf{k}} \\ a & b &c \\ d & e & f \end{pmatrix}. \nonumber \]

    We can compute this determinant as

    \[\begin{vmatrix} b & c \\ e & f \end{vmatrix} \hat{\textbf{i}} - \begin{vmatrix} a & c \\ d & f \end{vmatrix} \hat{\textbf{j}} + \begin{vmatrix} a & b \\ d & e \end{vmatrix} \hat{\textbf{k}} \nonumber \]

    \[ =(bf - ce ) \hat{\textbf{i}} + (cd - af ) \hat{\textbf{j}} + (ae - bd)\hat{\textbf{k}}. \nonumber \]

    Example \(\PageIndex{4}\)

    Find the cross product \(\textbf{u} \times \textbf{v} \) if

    \[\textbf{u} = 2 \hat{\textbf{i}} + \hat{\textbf{j}} -3 \hat{\textbf{k}}, \;\;\; \textbf{v} = 4 \hat{\textbf{j}} + 5 \hat{\textbf{k}}.\nonumber \]

    Solution

    We calculate

    \[\begin{align*}\begin{vmatrix} \hat{\textbf{i}} & \hat{\textbf{j}} & \hat{\textbf{k}} \\ 2 & 1 & -3 \\ 0 & 4 & 5 \end{vmatrix} & = \begin{vmatrix} 1 & -3 \\ 4 & 5 \end{vmatrix} \hat{\textbf{i}} - \begin{vmatrix} 2 & -3 \\ 0 & 5 \end{vmatrix} \hat{\textbf{j}} + \begin{vmatrix} 2 & 1 \\ 0 & 4 \end{vmatrix} \hat{\textbf{k}} \\ &= 17 \hat{\textbf{i}} - 10 \hat{\textbf{j}} + 8 \hat{\textbf{k}}. \end{align*} \nonumber \]

    If you need more help see the lecture notes for Math 103 B on matrices.

    Exercises

    Find \(\textbf{u} \times \textbf{v}\) when

    1. \(\textbf{u} = 3 \hat{\textbf{i}} + \hat{\textbf{j}} - 2 \hat{\textbf{k}}\), \( \textbf{v} = \hat{\textbf{i}} - \hat{\textbf{k}} \),
    2. \(\textbf{u} = 2 \hat{\textbf{i}} - 4 \hat{\textbf{j}} - \hat{\textbf{k}} \), \(\textbf{v} = 3 \hat{\textbf{i}} - \hat{\textbf{j}} + 2k \hat{\textbf{k}} \),

    Notice that since switching the order of two rows of a determinant changes the sign of the determinant, we have

    \[ \textbf{u} \times \textbf{v} = - \textbf{v} \times \textbf{u}. \nonumber \]

    Geometry and the Cross Product

    Let u and v be vectors and consider the parallelogram that the two vectors make.

    alt

    Then

    \[||\textbf{u} \times \textbf{v} || = \text{Area of the Parallelogram}\nonumber \]

    and the direction of \(\textbf{u} \times \textbf{v}\) is a right angle to the parallelogram that follows the right hand rule.

    Note: For\( \hat{\textbf{i}} \times \hat{\textbf{j}}\) the magnitude is 1 and the direction is \(\hat{\textbf{k}}\), hence \(\hat{\textbf{i}} \times \hat{\textbf{j}} = \hat{\textbf{k}}\).

    Exercise \(\PageIndex{3}\)

    Find \(\hat{\textbf{j}} \times \hat{\textbf{k}}\) and \(\hat{\textbf{i}} \times \hat{\textbf{k}}\).

    Torque Revisited

    We define the torque (or the moment \(M\) of a force \(F\) about a point \(Q\)) as

    \[M = PQ \times F. \nonumber \]

    Example \(\PageIndex{5}\)

    A 20 inch wrench is at an angle of 30 degrees with the ground. A force of 40 pounds that makes and angle of 45 degrees with the wrench turns the wrench. Find the torque.

    Solution

    We can write the wrench as the vector

    \[ 20 \cos 30\; \hat{\textbf{i}} + 20 \sin 30 \; \hat{\textbf{j}} = 17.3 \hat{\textbf{i}} + 10 \hat{\textbf{j}} \nonumber \]

    and the force as

    \[ -40 \cos 75 \; \hat{\textbf{i}} - 40 \sin 75 \; \hat{\textbf{j}} = -10.3 \hat{\textbf{i}} - 38.6 \hat{\textbf{j}}\nonumber \]

    hence, the torque is the magnitude of their cross product:

    \[\begin{vmatrix} \hat{\textbf{i}} & \hat{\textbf{j}} & \hat{\textbf{k}} \\ 17.3 & 10 & 0 \\ -10.3 & -38.6 & 0 \end{vmatrix}\nonumber \]

    \[= -564 \text{inch pounds}. \nonumber \]

    Parallelepipeds

    To find the volume of the parallelepiped spanned by three vectors u, v, and w, we find the triple product:

    \[\text{Volume}= \textbf{u} \cdot (\textbf{v} \times \textbf{w}). \nonumber \]

    This can be found by computing the determinate of the three vectors:

    \[\begin{vmatrix} u_1 & v_1 & w_1 \\ u_2 & v_2 & w_2 \\ u_3& v_3 & w_3 \end{vmatrix}.\nonumber \]

    Example \(\PageIndex{6}\)

    Find the volume of the parallelepiped spanned by the vectors

    \[\textbf{u} = <1,0,2>, \;\;\; \textbf{v} = <0,2,3>, \;\;\; \textbf{v} = <0,1,3>.\nonumber \]

    alt

    Solution

    We find

    \[\begin{vmatrix} 1 &0 &2 \\ 0 &2 &3 \\ 0 &1 &3 \end{vmatrix} = 3. \nonumber \]

    Contributors and Attributions

    • Integrated by Justin Marshall.


    This page titled 1.5: The Dot and Cross Product is shared under a not declared license and was authored, remixed, and/or curated by Larry Green.

    • Was this article helpful?