The Dot Product
Marcus pulls a sled across a snowy field. He tugs on the rope with 40 pounds of force, but the rope makes a $30^\circ$ angle with the ground. Does all 40 pounds push the sled forward? If not, how much does? You already know how to add vectors and scale them. This page adds one more operation: multiplying two vectors to get a number. With it you can measure angles, test for perpendicularity, and answer questions like Marcus's.
Some practice problems call this operation the scalar product and say modulus instead of magnitude. It is the same dot product and the same magnitude you will see here.
Two Formulas for One Operation
To get a vector from points, subtract: if $A(x_1, y_1)$ and $B(x_2, y_2)$, then $\overrightarrow{AB} = \langle x_2 - x_1,\; y_2 - y_1\rangle$ (end minus start).
Given the vectors $\vec{u} = (3, -2)$ and $\vec{v} = (4, 5)$, calculate their scalar product and determine if they are orthogonal.
Given the vectors $\vec{u} = (3, -2)$ and $\vec{v} = (4, 5)$, calculate their scalar product and determine if they are orthogonal.
Knowing that the moduli of two vectors are $|\vec{a}| = 4$ and $|\vec{b}| = 6$, and that the angle they form is $60^\circ$, calculate the exact value of their scalar…
Knowing that the moduli of two vectors are $|\vec{a}| = 4$ and $|\vec{b}| = 6$, and that the angle they form is $60^\circ$, calculate the exact value of their scalar product $\vec{a} \cdot \vec{b}$.
Given the points in the plane $A(1, 2)$, $B(4, 3)$ and $C(0, 5)$, calculate the value of the scalar product $\vec{AB} \cdot \vec{AC}$.
Given the points in the plane $A(1, 2)$, $B(4, 3)$ and $C(0, 5)$, calculate the value of the scalar product $\vec{AB} \cdot \vec{AC}$.
The Angle Between Two Vectors
Set the two formulas equal and solve for $\cos\theta$. This is how you measure an angle when you only know components.
Drag the point to move a vector from the origin and watch its coordinates and quadrant change. The vectors in the next example are $\langle 1, 2\rangle$ and $\langle 3, 1\rangle$.
Calculate the angle formed by the vectors $\vec{u} = (1, \sqrt{3})$ and $\vec{v} = (-\sqrt{3}, 1)$.
Calculate the angle formed by the vectors $\vec{u} = (1, \sqrt{3})$ and $\vec{v} = (-\sqrt{3}, 1)$.
A flat solar panel is oriented so that its normal vector (perpendicular to the surface) is $\vec{n} = (1, \sqrt{3})$. The sun's rays strike the panel following the…
A flat solar panel is oriented so that its normal vector (perpendicular to the surface) is $\vec{n} = (1, \sqrt{3})$. The sun's rays strike the panel following the direction of the vector $\vec{s} = (2, -1)$. Calculate the angle of incidence of the solar rays, defined as the angle formed by the normal vector $\vec{n}$ with the inverted solar ray vector $-\vec{s}$.
Calculate the value (or values) of the parameter $k$ so that the angle formed by the vectors $\vec{u} = (k, 3)$ and $\vec{v} = (1, -2)$ is exactly $45^\circ$.
Calculate the value (or values) of the parameter $k$ so that the angle formed by the vectors $\vec{u} = (k, 3)$ and $\vec{v} = (1, -2)$ is exactly $45^\circ$.
Orthogonal Vectors
Building a perpendicular vector
To rotate $\vec v = \langle a, b\rangle$ by $90^\circ$, swap the components and change one sign. Both $\langle -b, a\rangle$ and $\langle b, -a\rangle$ are perpendicular to $\vec v$ and have the same magnitude. Check: $a(-b) + b(a) = 0$. To get a different magnitude, multiply by $\dfrac{\text{desired magnitude}}{\text{current magnitude}}$.
Find the value of the parameter $m$ so that the vectors $\vec{p} = (m, -3)$ and $\vec{q} = (6, 2)$ are perpendicular.
Find the value of the parameter $m$ so that the vectors $\vec{p} = (m, -3)$ and $\vec{q} = (6, 2)$ are perpendicular.
Find the coordinates of a vector $\vec{w}$ that is perpendicular to the vector $\vec{v} = (-5, 12)$ and has the same modulus.
Find the coordinates of a vector $\vec{w}$ that is perpendicular to the vector $\vec{v} = (-5, 12)$ and has the same modulus.
Determine the coordinates of a vector $\vec{v}$ that is orthogonal to the vector $\vec{u} = (3, -4)$ and whose modulus is exactly $10$. Bear in mind that there are two…
Determine the coordinates of a vector $\vec{v}$ that is orthogonal to the vector $\vec{u} = (3, -4)$ and whose modulus is exactly $10$. Bear in mind that there are two possible solutions; indicate both of them.
Properties of the Dot Product
Why do these hold? Commutativity comes from the component formula: $u_1v_1 + u_2v_2 = v_1u_1 + v_2u_2$. And $\vec u \cdot \vec u = \|\vec u\|\|\vec u\|\cos 0^\circ = \|\vec u\|^2$, because a vector makes a $0^\circ$ angle with itself.
When a vector is given by components, you can also find its magnitude directly. Do the vector arithmetic first, then take the magnitude.
Using the properties of the scalar product, expand and calculate the value of the expression $(\vec{u} - \vec{v}) \cdot (\vec{u} + \vec{v})$ knowing that $|\vec{u}| = 5$…
Using the properties of the scalar product, expand and calculate the value of the expression $(\vec{u} - \vec{v}) \cdot (\vec{u} + \vec{v})$ knowing that $|\vec{u}| = 5$ and $|\vec{v}| = 3$.
Calculate the modulus of the vector $\vec{w} = 3\vec{u} - 2\vec{v}$ knowing the components of the vectors $\vec{u} = (1, -1)$ and $\vec{v} = (0, 4)$.
Calculate the modulus of the vector $\vec{w} = 3\vec{u} - 2\vec{v}$ knowing the components of the vectors $\vec{u} = (1, -1)$ and $\vec{v} = (0, 4)$.
Knowing that the moduli of two vectors are $|\vec{a}| = 3$ and $|\vec{b}| = 5$, and that their scalar product is $\vec{a} \cdot \vec{b} = -2$, calculate the exact value…
Knowing that the moduli of two vectors are $|\vec{a}| = 3$ and $|\vec{b}| = 5$, and that their scalar product is $\vec{a} \cdot \vec{b} = -2$, calculate the exact value of the expression $(2\vec{a} + \vec{b}) \cdot (\vec{a} - 3\vec{b})$.
Proofs with Vectors
The properties above are a toolkit for proving geometry facts. The recipe:
-
Name the sides or segments with vectors, and write the given facts (equal lengths, parallel sides) as equations.
-
Write the thing you want to prove as a dot product (a perpendicularity claim becomes "dot product $= 0$").
-
Expand with the properties, replace each $\vec x \cdot \vec x$ by $\|\vec x\|^2$, and justify every step.
Prove, using exclusively the algebraic properties of the scalar product, that the diagonals of any rhombus are perpendicular to each other. Note: You can model the sides…
Prove, using exclusively the algebraic properties of the scalar product, that the diagonals of any rhombus are perpendicular to each other.
Note: You can model the sides of the rhombus using two vectors $\vec{u}$ and $\vec{v}$ with the same origin and the same modulus ($|\vec{u}| = |\vec{v}|$). Express the diagonals in terms of $\vec{u}$ and $\vec{v}$.
Prove the "Parallelogram Law" analytically using the properties of the scalar product. That is, prove that for any two vectors $\vec{u}$ and $\vec{v}$, the following…
Prove the "Parallelogram Law" analytically using the properties of the scalar product. That is, prove that for any two vectors $\vec{u}$ and $\vec{v}$, the following identity holds:
$|\vec{u} + \vec{v}|^2 + |\vec{u} - \vec{v}|^2 = 2|\vec{u}|^2 + 2|\vec{v}|^2$
Explain each algebraic step based on the definition of the squared modulus as the scalar product of a vector with itself.
It is known that $\vec{u}$ and $\vec{v}$ are two unit vectors. If the vectors constructed as $\vec{a} = \vec{u} + 2\vec{v}$ and $\vec{b} = 5\vec{u} - 4\vec{v}$ turn out…
It is known that $\vec{u}$ and $\vec{v}$ are two unit vectors. If the vectors constructed as $\vec{a} = \vec{u} + 2\vec{v}$ and $\vec{b} = 5\vec{u} - 4\vec{v}$ turn out to be orthogonal to each other, determine the exact angle formed by the original vectors $\vec{u}$ and $\vec{v}$.
Projections and Work
Back to Marcus's sled. Only the part of the pull that points in the direction of motion does useful work. That part is the projection: the "shadow" of one vector on the line of another.
Now we can answer the hook. Marcus pulls with $\|\vec F\| = 40$ lb along a rope at $30^\circ$, over $\|\vec d\| = 50$ ft. The dot product gives $W = 40 \cdot 50 \cdot \cos 30^\circ = 2000 \cdot \tfrac{\sqrt3}{2} = 1000\sqrt3 \approx 1{,}732$ ft·lb. The forward part of his pull is the scalar projection $40\cos 30^\circ = 20\sqrt3 \approx 34.6$ lb. Not the full 40.
The same idea powers computer graphics. In diffuse (Lambert) lighting, the brightness of a surface is $I_0 \max(0, \hat n \cdot \hat l)$. Here $\hat n$ is the unit normal and $\hat l$ is the unit vector toward the light, so $\hat n \cdot \hat l = \cos\theta$. If the dot product is negative, the light hits the back of the surface, so the $\max$ makes the intensity $0$.
On a construction site, a crane drags a concrete block by applying a constant force represented by the vector $\vec{F} = (450, 600)$ expressed in Newtons. The block…
On a construction site, a crane drags a concrete block by applying a constant force represented by the vector $\vec{F} = (450, 600)$ expressed in Newtons. The block undergoes a rectilinear displacement given by the vector $\vec{d} = (12, 5)$ in feet. Knowing that mechanical work is defined as $W = \vec{F} \cdot \vec{d}$, calculate the work done by the crane and the angle formed by the applied force and the displacement.
In the development of a physics engine for a video game, a character moves following the direction and sense of the vector $\vec{d} = (8, 4)$. Gravity in this virtual…
In the development of a physics engine for a video game, a character moves following the direction and sense of the vector $\vec{d} = (8, 4)$. Gravity in this virtual environment is defined by the vector $\vec{g} = (0, -9.8)$. Calculate the orthogonal projection of the gravity vector onto the direction of the character's movement.
In computer graphics, the diffuse light intensity on a surface is calculated using Lambert's law: $I = I_0 \max(0, \vec{n} \cdot \vec{l})$, where $\vec{n}$ is the unit…
In computer graphics, the diffuse light intensity on a surface is calculated using Lambert's law: $I = I_0 \max(0, \vec{n} \cdot \vec{l})$, where $\vec{n}$ is the unit normal vector to the surface and $\vec{l}$ is the unit vector pointing toward the light source. If a surface has a normal vector with the same direction and sense as $\vec{v} = (-\sqrt{3}, 1)$ and the light source lies in the direction and sense of the vector $\vec{w} = (1, 1)$, calculate the exact light intensity $I$ as a fraction of $I_0$.
Right Angles in Triangles
The dot product turns "is this angle right, acute, or obtuse?" into a sign check. To find the angle at vertex $A$ of $\triangle ABC$, dot the two vectors that start at $A$: $\overrightarrow{AB} \cdot \overrightarrow{AC}$.
Right angle at an unknown point
If the right angle must be at a point $C$ with unknown coordinates, write $\overrightarrow{CA} \cdot \overrightarrow{CB} = 0$. You get an equation, often a quadratic.
The orthocenter
An altitude from a vertex is perpendicular to the opposite side. So a point $H$ is on the altitude from $A$ exactly when $\overrightarrow{AH} \cdot \overrightarrow{BC} = 0$. Two of these equations pin down the orthocenter, where all three altitudes meet.
Check, using exclusively the scalar product, whether the triangle with vertices $A(-2, 1)$, $B(4, 3)$ and $C(1, 12)$ is right, acute, or obtuse. Identify at which vertex…
Check, using exclusively the scalar product, whether the triangle with vertices $A(-2, 1)$, $B(4, 3)$ and $C(1, 12)$ is right, acute, or obtuse. Identify at which vertex the right angle is located, if it is one.
Consider the fixed points $A(0, 3)$ and $B(5, 2)$. Find all the points $C$ located on the x-axis such that the triangle $ABC$ is a right triangle with the right angle…
Consider the fixed points $A(0, 3)$ and $B(5, 2)$. Find all the points $C$ located on the x-axis such that the triangle $ABC$ is a right triangle with the right angle located at the vertex $C$.
In a triangle whose vertices are the points $P(-3, -1)$, $Q(5, -1)$ and $R(1, 6)$, use the concept of the scalar product and orthogonality of vectors to determine the…
In a triangle whose vertices are the points $P(-3, -1)$, $Q(5, -1)$ and $R(1, 6)$, use the concept of the scalar product and orthogonality of vectors to determine the exact coordinates of its orthocenter (the point where the three altitudes of the triangle intersect).
Solving for Unknowns
Many problems hide an unknown in a vector or a parameter. The dot product turns each condition into an equation:
-
"Angle of $\theta$" becomes $\dfrac{\vec u \cdot \vec v}{\|\vec u\|\|\vec v\|} = \cos\theta$.
-
"Dot product equals $c$" becomes a linear equation in the components.
-
"Make the dot product as small as possible" becomes a quadratic whose vertex you find.
Here is the parabola $y = x^2 + 3x$ from the last example. Look for its lowest point.
Find the value of $x$ so that the vector $\vec{u} = (x, 2)$ forms an angle of $30^\circ$ with the positive x-axis. Use the scalar product with the unit vector…
Find the value of $x$ so that the vector $\vec{u} = (x, 2)$ forms an angle of $30^\circ$ with the positive x-axis. Use the scalar product with the unit vector $\vec{i} = (1, 0)$ to set up the equation.
Find the coordinates of a vector $\vec{w} = (x, y)$ knowing that its scalar product with the vector $\vec{u} = (2, -1)$ is equal to $4$, and that its scalar product with…
Find the coordinates of a vector $\vec{w} = (x, y)$ knowing that its scalar product with the vector $\vec{u} = (2, -1)$ is equal to $4$, and that its scalar product with the vector $\vec{v} = (1, 3)$ is equal to $-5$.
Given the vectors dependent on the parameter $t$, $\vec{a} = (t, 2)$ and $\vec{b} = (t-1, t)$, determine the value of $t$ that makes the scalar product…
Given the vectors dependent on the parameter $t$, $\vec{a} = (t, 2)$ and $\vec{b} = (t-1, t)$, determine the value of $t$ that makes the scalar product $\vec{a} \cdot \vec{b}$ reach its minimum value. Also calculate the angle formed by the vectors $\vec{a}$ and $\vec{b}$ for that specific value of $t$.