Tutorials › Calculus III › Vector Projection Onto a Unit Direction

Dot Products and Projections · Tutorial 59 of 999

Vector Projection Onto a Unit Direction

Learn to turn a signed scalar component along a unit vector into the vector projection, and check that the result has the correct direction and component.

Beginner 9 min read

What You'll Learn

  • State the vector projection formula when the direction vector has unit length
  • Derive the formula from the signed scalar component
  • Distinguish the signed scalar projection from the vector projection
  • Compute projections with positive, negative, and zero directional components
  • Normalize a given direction before applying the unit-direction formula
  • Check a projection by taking its dot product with the unit direction

From a Signed Component to a Vector

A scalar projection tells us how much of a vector lies along a chosen direction, including whether that component points with or against the chosen direction. But a scalar is not itself a vector. To describe the actual vector in the chosen direction, we also need to specify its direction.

A unit vector provides that direction with length one. Multiplying it by the signed scalar component gives a vector that points along that direction when the component is positive, points against it when the component is negative, and is zero when the component is zero. This vector is the vector projection.

Definition: Let \(\mathbf{v}\) be a vector and let \(\mathbf{u}\) be a unit vector, so that \(\|\mathbf{u}\|=1\). The vector projection of \(\mathbf{v}\) onto the direction \(\mathbf{u}\) is \(\operatorname{proj}_{\mathbf{u}}\mathbf{v}=(\mathbf{v}\cdot\mathbf{u})\mathbf{u}\).

The dot product \(\mathbf{v}\cdot\mathbf{u}\) is a scalar. Multiplying that scalar by \(\mathbf{u}\) produces a vector. Keeping these two outputs distinct is essential: the scalar projection is the signed number \(\mathbf{v}\cdot\mathbf{u}\), while the vector projection is \((\mathbf{v}\cdot\mathbf{u})\mathbf{u}\).

Why the Formula Works

Because \(\mathbf{u}\) is a unit vector, the signed scalar component of \(\mathbf{v}\) along \(\mathbf{u}\) is \(\mathbf{v}\cdot\mathbf{u}\). To construct a vector in the chosen direction with exactly that signed component, scale \(\mathbf{u}\) by this number. The result is parallel to \(\mathbf{u}\), and its signed component along \(\mathbf{u}\) is the desired one.

$$ \mathbf{p}=(\mathbf{v}\cdot\mathbf{u})\mathbf{u} $$

Here is a direct verification of those two properties. First, \(\mathbf{p}\) is a scalar multiple of \(\mathbf{u}\), so it lies along the chosen direction (or is the zero vector). Next, since \(\|\mathbf{u}\|=1\), its dot product with \(\mathbf{u}\) is

$$ \mathbf{p}\cdot\mathbf{u} = \big((\mathbf{v}\cdot\mathbf{u})\mathbf{u}\big)\cdot\mathbf{u} = (\mathbf{v}\cdot\mathbf{u})(\mathbf{u}\cdot\mathbf{u}) = (\mathbf{v}\cdot\mathbf{u})(1) = \mathbf{v}\cdot\mathbf{u}. $$

Thus the constructed vector is parallel to the chosen unit direction and has the same signed component along that direction as \(\mathbf{v}\). These properties explain the formula.

Key distinction: The scalar projection is \(\mathbf{v}\cdot\mathbf{u}\). The vector projection is that scalar multiplied by the unit direction \(\mathbf{u}\). The scalar gives the signed amount; the vector gives both the amount and the direction.

Worked Examples

Worked Example: A Positive Projection

Find the projection of \(\mathbf{v}=(4,1,-2)\) onto the unit vector \(\mathbf{u}=(\frac{2}{3},-\frac{1}{3},\frac{2}{3})\).

First check that \(\mathbf{u}\) is a unit vector:

$$ \|\mathbf{u}\|^2 = \left(\frac{2}{3}\right)^2+ \left(-\frac{1}{3}\right)^2+ \left(\frac{2}{3}\right)^2 = \frac{4}{9}+\frac{1}{9}+\frac{4}{9} = 1. $$

Compute the signed scalar component using the dot product:

$$ \mathbf{v}\cdot\mathbf{u} = 4\left(\frac{2}{3}\right) + 1\left(-\frac{1}{3}\right) + (-2)\left(\frac{2}{3}\right) = \frac{8}{3}-\frac{1}{3}-\frac{4}{3} = 1. $$

Multiply this scalar by the unit direction:

$$ \operatorname{proj}_{\mathbf{u}}\mathbf{v} = 1\left(\frac{2}{3},-\frac{1}{3},\frac{2}{3}\right) = \left(\frac{2}{3},-\frac{1}{3},\frac{2}{3}\right). $$

Check the result by taking its dot product with \(\mathbf{u}\):

$$ \left(\frac{2}{3},-\frac{1}{3},\frac{2}{3}\right) \cdot \left(\frac{2}{3},-\frac{1}{3},\frac{2}{3}\right) = \frac{4}{9}+\frac{1}{9}+\frac{4}{9} = 1 = \mathbf{v}\cdot\mathbf{u}. $$

The projection is a vector along \(\mathbf{u}\), and its signed component agrees with the component of \(\mathbf{v}\) in that direction.

Worked Example: A Negative Projection

Find the projection of \(\mathbf{v}=(1,0,0)\) onto \(\mathbf{u}=(-\frac{3}{5},\frac{4}{5},0)\).

Confirm that the direction vector has unit length:

$$ \|\mathbf{u}\|^2 = \left(-\frac{3}{5}\right)^2+ \left(\frac{4}{5}\right)^2+0^2 = \frac{9}{25}+\frac{16}{25} = 1. $$

Find the signed scalar component:

$$ \mathbf{v}\cdot\mathbf{u} = 1\left(-\frac{3}{5}\right)+0\left(\frac{4}{5}\right)+0(0) = -\frac{3}{5}. $$

Apply the formula. The negative scalar reverses the direction of \(\mathbf{u}\):

$$ \operatorname{proj}_{\mathbf{u}}\mathbf{v} = -\frac{3}{5}\left(-\frac{3}{5},\frac{4}{5},0\right) = \left(\frac{9}{25},-\frac{12}{25},0\right). $$

Check the signed component of the answer:

$$ \left(\frac{9}{25},-\frac{12}{25},0\right) \cdot \left(-\frac{3}{5},\frac{4}{5},0\right) = -\frac{27}{125}-\frac{48}{125} = -\frac{75}{125} = -\frac{3}{5}. $$

This matches \(\mathbf{v}\cdot\mathbf{u}=-\frac{3}{5}\). The negative sign is meaningful: the component of \(\mathbf{v}\) points against the chosen direction \(\mathbf{u}\).

Worked Example: A Direction That Must Be Normalized

The projection formula in this tutorial requires a unit direction. Find the projection of \(\mathbf{v}=(3,1,2)\) onto the direction of \(\mathbf{w}=(2,-1,2)\) by first converting \(\mathbf{w}\) to a unit vector.

Compute the length of \(\mathbf{w}\):

$$ \|\mathbf{w}\| = \sqrt{2^2+(-1)^2+2^2} = \sqrt{4+1+4} = 3. $$

Therefore, the unit vector in the direction of \(\mathbf{w}\) is

$$ \mathbf{u} = \frac{\mathbf{w}}{\|\mathbf{w}\|} = \left(\frac{2}{3},-\frac{1}{3},\frac{2}{3}\right). $$

Now find the signed scalar component:

$$ \mathbf{v}\cdot\mathbf{u} = 3\left(\frac{2}{3}\right) + 1\left(-\frac{1}{3}\right) + 2\left(\frac{2}{3}\right) = 2-\frac{1}{3}+\frac{4}{3} = 3. $$

Multiply by the unit vector to obtain the projection:

$$ \operatorname{proj}_{\mathbf{u}}\mathbf{v} = 3\left(\frac{2}{3},-\frac{1}{3},\frac{2}{3}\right) = (2,-1,2). $$

Check both the unit-direction requirement and the component of the result:

$$ \|\mathbf{u}\|^2 = \frac{4}{9}+\frac{1}{9}+\frac{4}{9} = 1, \qquad (2,-1,2)\cdot\mathbf{u} = \frac{4}{3}+\frac{1}{3}+\frac{4}{3} = 3. $$

The final dot product equals \(\mathbf{v}\cdot\mathbf{u}=3\), as required.

Magnitude and Direction

For a unit direction, the magnitude of the vector projection is the absolute value of the signed scalar projection:

$$ \left\|\operatorname{proj}_{\mathbf{u}}\mathbf{v}\right\| = \left\|(\mathbf{v}\cdot\mathbf{u})\mathbf{u}\right\| = |\mathbf{v}\cdot\mathbf{u}|\,\|\mathbf{u}\| = |\mathbf{v}\cdot\mathbf{u}|. $$

The absolute value appears because magnitude cannot be negative, whereas the scalar projection records orientation. If \(\mathbf{v}\cdot\mathbf{u}>0\), the projection points in the direction of \(\mathbf{u}\). If \(\mathbf{v}\cdot\mathbf{u}<0\), it points in the opposite direction. If \(\mathbf{v}\cdot\mathbf{u}=0\), the projection is the zero vector.

These statements concern the projection onto the chosen direction. They do not say that the original vector has no other components. The formula identifies just the vector along \(\mathbf{u}\) that carries the same signed directional component as \(\mathbf{v}\).

A Common Mistake: Forgetting the Unit-Length Condition

A frequent error is to use \((\mathbf{v}\cdot\mathbf{w})\mathbf{w}\) when \(\mathbf{w}\) is not a unit vector. For example, take \(\mathbf{v}=(3,1,2)\) and \(\mathbf{w}=(2,-1,2)\). The incorrect calculation would give

$$ (\mathbf{v}\cdot\mathbf{w})\mathbf{w} = (6-1+4)(2,-1,2) = 9(2,-1,2) = (18,-9,18). $$

This result is not the projection. Its dot product with the unit direction \(\mathbf{u}=\mathbf{w}/3\) is

$$ (18,-9,18)\cdot \left(\frac{2}{3},-\frac{1}{3},\frac{2}{3}\right) = 12+3+12 = 27, $$

but the signed component of \(\mathbf{v}\) along \(\mathbf{u}\) is \(3\), not \(27\). The correction is to normalize \(\mathbf{w}\) first, then use \((\mathbf{v}\cdot\mathbf{u})\mathbf{u}\). As the worked example showed, that gives \((2,-1,2)\), whose dot product with \(\mathbf{u}\) is exactly \(3\).

Another related error is to replace the signed scalar projection with its absolute value before multiplying by the direction. That would erase whether the original vector points with or against the chosen direction. Keep the signed dot product in the formula; use an absolute value only when finding the projection's magnitude.

When the Formula Is Useful

Vector projection is useful whenever a vector must be represented by its contribution along a specified direction. The direction could describe an axis, a heading, or a unit vector selected for a geometric calculation. The result is always a vector parallel to that direction, scaled to preserve the original vector's signed component there.

Before applying the formula, check that the direction vector has length one. Then compute the dot product, multiply the resulting signed scalar by the unit vector, and check that the projection's dot product with the unit direction matches the original dot product. These checks catch both sign errors and mistakes caused by using an unnormalized direction.

Takeaway: For a unit vector \(\mathbf{u}\), the projection of \(\mathbf{v}\) onto its direction is \((\mathbf{v}\cdot\mathbf{u})\mathbf{u}\). The dot product supplies the signed amount, and \(\mathbf{u}\) supplies the direction.

Check Your Understanding

Use the unit-direction formula, and distinguish the signed scalar component from the vector projection.

  1. What condition must \(\mathbf{u}\) satisfy for \(\operatorname{proj}_{\mathbf{u}}\mathbf{v}=(\mathbf{v}\cdot\mathbf{u})\mathbf{u}\) to apply in this form?
  2. If \(\mathbf{v}\cdot\mathbf{u}<0\), which way does the vector projection point relative to \(\mathbf{u}\)?
  3. Find the projection of \(\mathbf{v}=(2,3,0)\) onto \(\mathbf{u}=(1,0,0)\), and check it using a dot product.
  4. Explain why \(\mathbf{v}\cdot\mathbf{u}\) and \((\mathbf{v}\cdot\mathbf{u})\mathbf{u}\) are different kinds of quantities.
  5. If a given direction vector has length \(4\), what must you do before using the unit-direction projection formula?