Tutorials › Calculus III › A Geometric Projection Problem-Solving Workshop

Dot Products and Projections · Tutorial 74 of 999

A Geometric Projection Problem-Solving Workshop

Learn to choose a direction vector that turns a geometric question into a dot-product calculation, then verify the result using membership, perpendicularity, and length checks.

Beginner 10 min read

What You'll Learn

  • Choose a line’s direction vector from two points on the line.
  • Calculate a perpendicular foot and the distance from a point to a line.
  • Check a foot by confirming it lies on the line and the error vector is perpendicular to the line.
  • Represent rectangular-box diagonals with coordinate vectors and interpret their angles.
  • Decompose a vector into components parallel and perpendicular to a chosen direction.
  • Verify a decomposition using vector addition, dot products, and squared lengths.

Choosing the Vector That Matches the Geometry

A projection problem is often less about complicated arithmetic than about choosing the right direction vector. For a line, use a vector running along the line. For a rectangular box, represent each diagonal by its coordinate changes along the edges. For a parallel-perpendicular decomposition, use the direction to which the vector is being compared.

Once the direction is chosen, the dot product identifies how much of a vector points along it. The remaining part is perpendicular. This tutorial uses that idea to solve several geometric problems and to check each answer in more than one way.

Core strategy: Identify the relevant direction, form the vector whose component you need, and use a dot product to extract its parallel part. Then check the result against the original geometric conditions.

Projection Formulas for Geometric Problems

Suppose a line passes through a point \(A\) and has nonzero direction vector \(\mathbf{d}\). A point \(X\) on that line can be written as \(X=A+t\mathbf{d}\), where \(t\) is a real number. Given a point \(P\), the vector from \(A\) to \(P\) is \(\mathbf{w}=P-A\).

The component of \(\mathbf{w}\) parallel to \(\mathbf{d}\) is its vector projection onto \(\mathbf{d}\). The formula applies when \(\mathbf{d}\ne\mathbf{0}\), so that \(\mathbf{d}\cdot\mathbf{d}\ne0\):

$$ \operatorname{proj}_{\mathbf{d}}\mathbf{w} = \frac{\mathbf{w}\cdot\mathbf{d}}{\mathbf{d}\cdot\mathbf{d}}\mathbf{d}. $$

Consequently, the foot \(H\) of the perpendicular from \(P\) to the line, and the distance from \(P\) to that line, are

$$ H=A+\frac{(P-A)\cdot\mathbf{d}}{\mathbf{d}\cdot\mathbf{d}}\mathbf{d}, \qquad \operatorname{dist}(P,L)=\|P-H\|. $$

The same formula gives a parallel-perpendicular decomposition of any vector \(\mathbf{v}\): choose a nonzero direction vector \(\mathbf{d}\), set \(\mathbf{v}_{\parallel}=\operatorname{proj}_{\mathbf{d}}\mathbf{v}\), and set \(\mathbf{v}_{\perp}=\mathbf{v}-\mathbf{v}_{\parallel}\). The choice of \(\mathbf{d}\) determines what “parallel” means in the problem.

Why the Perpendicular-Foot Formula Works

Any candidate point on the line has the form \(A+t\mathbf{d}\). The vector from that candidate to \(P\) is \(\mathbf{w}-t\mathbf{d}\). At a perpendicular foot, this error vector must have zero dot product with the line direction. Thus \(t\) must satisfy

$$ (\mathbf{w}-t\mathbf{d})\cdot\mathbf{d}=0. $$

Expanding the dot product gives \(\mathbf{w}\cdot\mathbf{d}-t(\mathbf{d}\cdot\mathbf{d})=0\). Since \(\mathbf{d}\ne\mathbf{0}\), divide by \(\mathbf{d}\cdot\mathbf{d}\) to obtain \(t=(\mathbf{w}\cdot\mathbf{d})/(\mathbf{d}\cdot\mathbf{d})\). Substitution into \(A+t\mathbf{d}\) gives the stated foot formula. The value of \(t\) is unique, so there is exactly one such foot on the line.

Useful checks: A proposed foot must lie on the line, and the vector from the foot to the given point must be perpendicular to the line’s direction. Both conditions can be checked directly.

Worked Example: Foot and Distance to a Line

Worked Example: Foot and Distance to a Line

Find the perpendicular foot and the distance from \(P=(2,1,3)\) to the line through \(A=(1,-2,0)\) and \(B=(4,2,0)\).

First choose the line direction by subtracting the endpoint coordinates:

$$ \mathbf{d}=B-A=(4-1,\;2-(-2),\;0-0)=(3,4,0). $$

The vector from \(A\) to \(P\) is

$$ \mathbf{w}=P-A=(2-1,\;1-(-2),\;3-0)=(1,3,3). $$

Compute both dot products needed for the projection coefficient:

$$ \mathbf{w}\cdot\mathbf{d} =(1)(3)+(3)(4)+(3)(0)=3+12+0=15, \qquad \mathbf{d}\cdot\mathbf{d}=3^2+4^2+0^2=9+16=25. $$

Therefore \(t=15/25=3/5\), and the foot is

$$ H=A+\frac35\mathbf{d} =(1,-2,0)+\left(\frac95,\frac{12}5,0\right) =\left(\frac{14}5,\frac25,0\right). $$

The error vector from the foot to \(P\) is

$$ P-H =\left(2-\frac{14}5,\;1-\frac25,\;3-0\right) =\left(-\frac45,\frac35,3\right). $$

Its squared length is \(16/25+9/25+9=1+9=10\), so the distance is \(\sqrt{10}\). To check perpendicularity, calculate \((P-H)\cdot\mathbf{d}=(-4/5)(3)+(3/5)(4)+(3)(0)=-12/5+12/5=0\). Also, \(H=A+(3/5)\mathbf{d}\), so \(H\) lies on the line. Both required conditions hold.

Box Diagonals: Let the Edges Set the Coordinates

For a rectangular box, the three edge directions meeting at a vertex are mutually perpendicular. If their lengths are \(a\), \(b\), and \(c\), coordinates aligned with those edges represent a body diagonal by a vector with components \((a,b,c)\). Another body diagonal may have one or more signs reversed, depending on its direction.

To find an angle, compute the dot product of direction vectors and divide by the product of their lengths. For directed vectors \(\mathbf{u}\) and \(\mathbf{v}\), the angle \(\theta\) between them satisfies \(\cos\theta=(\mathbf{u}\cdot\mathbf{v})/(\|\mathbf{u}\|\|\mathbf{v}\|)\). Reversing a direction changes the sign of the dot product. Thus the angle between two chosen directed vectors may be obtuse even though the smaller angle between the geometric lines is acute.

Worked Example: Angle Between Body Diagonals

A rectangular box has edge lengths \(2\), \(3\), and \(6\). Find the directed angle between body-diagonal vectors \(\mathbf{u}=(2,3,6)\) and \(\mathbf{v}=(2,3,-6)\), and the smaller angle between their lines.

The dot product is

$$ \mathbf{u}\cdot\mathbf{v} =(2)(2)+(3)(3)+(6)(-6)=4+9-36=-23. $$

The squared length of each vector is \(2^2+3^2+6^2=4+9+36=49\), so \(\|\mathbf{u}\|=\|\mathbf{v}\|=7\). Therefore the cosine of the directed angle is \(-23/(7\cdot7)=-23/49\), and that angle is \(\arccos(-23/49)\). For the smaller angle between the lines, reverse one direction if needed; its cosine is \(23/49\), so the smaller angle is \(\arccos(23/49)\).

As a check, the two cosine values are negatives, so their angles are supplementary. This matches the fact that reversing one diagonal’s direction changes an obtuse directed angle to its acute supplement without changing either geometric line.

Choosing a Direction for a Parallel-Perpendicular Split

For a vector \(\mathbf{v}\) and nonzero direction vector \(\mathbf{d}\), the projection gives the part parallel to \(\mathbf{d}\); subtracting it from \(\mathbf{v}\) gives the perpendicular part. These components must add to the original vector. The perpendicular component must also have dot product zero with \(\mathbf{d}\).

Because the components are perpendicular, their squared lengths add. This provides an additional independent check: \(\|\mathbf{v}\|^2=\|\mathbf{v}_{\parallel}\|^2+\|\mathbf{v}_{\perp}\|^2\).

Worked Example: Splitting a Vector Along a Chosen Direction

Resolve \(\mathbf{v}=(3,4,0)\) into a component parallel to \(\mathbf{d}=(1,2,2)\) and a component perpendicular to it.

First calculate \(\mathbf{v}\cdot\mathbf{d}=3+8+0=11\) and \(\mathbf{d}\cdot\mathbf{d}=1+4+4=9\). The parallel component is therefore

$$ \mathbf{v}_{\parallel} =\frac{11}{9}(1,2,2) =\left(\frac{11}9,\frac{22}9,\frac{22}9\right). $$

Subtract it from \(\mathbf{v}\) to obtain the perpendicular component:

$$ \mathbf{v}_{\perp} =(3,4,0)-\left(\frac{11}9,\frac{22}9,\frac{22}9\right) =\left(\frac{16}9,\frac{14}9,-\frac{22}9\right). $$

The components add back to \((27/9,36/9,0)=(3,4,0)\). For the perpendicularity check, \(\mathbf{v}_{\perp}\cdot\mathbf{d}=(16+28-44)/9=0\). Finally, \(\|\mathbf{v}\|^2=3^2+4^2=25\), while \(\|\mathbf{v}_{\parallel}\|^2=121/9\) and \(\|\mathbf{v}_{\perp}\|^2=(256+196+484)/81=936/81=104/9\). Their sum is \(225/9=25\), as required.

A Common Mistake: Forgetting the Denominator

A frequent error is to treat \((\mathbf{w}\cdot\mathbf{d})\mathbf{d}\) as the projection onto a direction vector that is not a unit vector. The formula without a denominator works only when the direction vector has length \(1\).

For example, in the preceding decomposition, an incorrect calculation would give \(\mathbf{v}_{\parallel}=11(1,2,2)=(11,22,22)\). Its dot product with \(\mathbf{d}\) is \(11+44+44=99\), but the component along \(\mathbf{d}\) should have coefficient \(11/9\), since \(\mathbf{d}\cdot\mathbf{d}=9\). The wrong vector is not even a component of \((3,4,0)\) that could be completed by subtracting a perpendicular remainder: the remainder would be \((-8,-18,-22)\), whose dot product with \(\mathbf{d}\) is \(-8-36-44=-88\ne0\). Including the denominator produces the correct projection and makes the remainder perpendicular.

A Reliable Problem-Solving Routine

Before calculating, state what the chosen direction represents. Then use the formula that fits the question and verify the defining geometric conditions. This prevents a correct dot product from being attached to the wrong vector or interpreted as the wrong quantity.

1
Identify the direction.
For a line through two points, subtract their coordinates. For a box diagonal, use its signed changes along the edges. For a decomposition, use the direction specified in the question.
2
Form the vector being projected.
For a point-to-line problem, use the vector from a known point on the line to the given point.
3
Compute the projection carefully.
Use the dot product divided by the squared length of the direction vector, unless it is explicitly a unit vector.
4
Check the geometry.
Confirm line membership and perpendicularity for a foot, or vector addition and perpendicularity for a decomposition. Use squared lengths as an additional check when appropriate.

Check Your Understanding

For each question, identify the direction vector that matches the geometric condition before beginning the calculation.

  1. What two checks show that a calculated point is the perpendicular foot from a point to a line?
  2. Why does the projection formula require division by \(\mathbf{d}\cdot\mathbf{d}\) when \(\mathbf{d}\) is not a unit vector?
  3. For box diagonals \((a,b,c)\) and \((a,b,-c)\), what dot product determines the directed angle?
  4. If \(\mathbf{v}_{\parallel}\) is the projection of \(\mathbf{v}\) onto a nonzero \(\mathbf{d}\), how can you check that \(\mathbf{v}-\mathbf{v}_{\parallel}\) is perpendicular to \(\mathbf{d}\)?
  5. Why can the directed angle between two chosen diagonal vectors be obtuse while the smaller angle between their lines is acute?