Tutorials › Calculus III › Scalar Projection as a Signed Component

Dot Products and Projections · Tutorial 58 of 999

Scalar Projection as a Signed Component

Learn to find and interpret the signed length of a vector along a chosen direction using the dot product.

Beginner 10 min read

What You'll Learn

  • Define scalar projection as a signed component along an oriented direction.
  • Calculate a scalar projection using a unit direction vector.
  • Use a nonzero direction vector without first writing its unit vector.
  • Interpret positive, zero, and negative scalar projections.
  • Check results using vector magnitudes, angles, and signs.

Introduction

A vector can point in a direction that is not aligned with any coordinate axis. Even so, we can ask how much of the vector lies along one chosen direction. The answer is a signed number: it records both the length of the component in that direction and whether it points with or against the chosen orientation.

This number is called the scalar projection, or the signed component, of the vector along the direction. It is useful to keep the word “scalar” in mind: the result is a number, not a vector.

Definition: The Signed Component Along a Direction

A direction is oriented: it distinguishes one way along a line from the opposite way. Represent that orientation by a unit vector \(\mathbf{u}\), so that \(\|\mathbf{u}\|=1\). For a vector \(\mathbf{a}\), let \(\theta\) be the angle between \(\mathbf{a}\) and \(\mathbf{u}\), measured from \(0\) to \(\pi\). The scalar projection of \(\mathbf{a}\) onto the direction \(\mathbf{u}\) is defined by

$$ \operatorname{comp}_{\mathbf{u}}\mathbf{a} = \|\mathbf{a}\|\cos\theta. $$

The sign is part of the definition. If \(\mathbf{a}\) points generally with \(\mathbf{u}\), the scalar projection is positive. If it points generally against \(\mathbf{u}\), it is negative. If the vectors are perpendicular, the scalar projection is zero.

Definition: For a unit direction vector \(\mathbf{u}\), the scalar projection \(\operatorname{comp}_{\mathbf{u}}\mathbf{a}\) is the signed length of the component of \(\mathbf{a}\) along the orientation specified by \(\mathbf{u}\). It is measured in the same units as \(\mathbf{a}\).

Reversing the direction reverses the sign. In particular, \(-\mathbf{u}\) specifies the opposite orientation, so the scalar component along \(-\mathbf{u}\) is the negative of the component along \(\mathbf{u}\). This is why an unoriented line alone is not enough to determine a signed scalar projection: one must choose which way along the line counts as positive.

The Dot-Product Formula

The angle formula for the dot product states that, for nonzero vectors \(\mathbf{a}\) and \(\mathbf{u}\), \(\mathbf{a}\cdot\mathbf{u}=\|\mathbf{a}\|\|\mathbf{u}\|\cos\theta\). Since a unit vector has norm \(1\), this gives a direct formula for the scalar projection.

Theorem: If \(\mathbf{u}\) is a unit vector, then
$$ \operatorname{comp}_{\mathbf{u}}\mathbf{a} = \mathbf{a}\cdot\mathbf{u}. $$

If the chosen direction is given by a nonzero vector \(\mathbf{d}\) that is not necessarily a unit vector, its unit vector is \(\mathbf{d}/\|\mathbf{d}\|\). Therefore, the scalar component along the direction of \(\mathbf{d}\) is

$$ \operatorname{comp}_{\mathbf{d}}\mathbf{a} = \mathbf{a}\cdot\frac{\mathbf{d}}{\|\mathbf{d}\|} = \frac{\mathbf{a}\cdot\mathbf{d}}{\|\mathbf{d}\|}, \qquad \mathbf{d}\ne\mathbf{0}. $$

The notation in the left-hand side refers to the direction specified by \(\mathbf{d}\), not to an operation that produces a vector. Dividing by \(\|\mathbf{d}\|\) is essential when \(\mathbf{d}\) is not a unit vector.

Why the Formula Works

Here is the derivation from the geometric meaning of a signed component. Let \(\mathbf{u}\) be a unit vector and let \(\theta\) be the angle between \(\mathbf{a}\) and \(\mathbf{u}\). The length of \(\mathbf{a}\) is \(\|\mathbf{a}\|\). By the definition of cosine, the length along the direction \(\mathbf{u}\) is \(\|\mathbf{a}\|\cos\theta\); when \(\theta\) is obtuse, cosine is negative, recording that the component points against \(\mathbf{u}\). Thus the signed component is \(\|\mathbf{a}\|\cos\theta\).

The dot-product angle formula gives \(\mathbf{a}\cdot\mathbf{u}=\|\mathbf{a}\|\|\mathbf{u}\|\cos\theta\). Using \(\|\mathbf{u}\|=1\), we obtain

$$ \mathbf{a}\cdot\mathbf{u} = \|\mathbf{a}\|\cos\theta = \operatorname{comp}_{\mathbf{u}}\mathbf{a}. $$

So the dot product with a unit direction vector returns exactly the signed component. For a nonunit direction \(\mathbf{d}\), replacing it by \(\mathbf{d}/\|\mathbf{d}\|\) gives the general formula above.

Worked Examples

Worked Example: Component Along the Positive \(y\)-Direction

Find the scalar projection of \(\mathbf{a}=(3,4,0)\) along the direction \(\mathbf{d}=(0,2,0)\).

The direction vector is nonzero, and its magnitude is

$$ \|\mathbf{d}\| = \sqrt{0^2+2^2+0^2} = 2. $$

Its unit direction vector is therefore

$$ \mathbf{u} = \frac{\mathbf{d}}{\|\mathbf{d}\|} = \left(0,1,0\right). $$

Using the unit-vector formula,

$$ \operatorname{comp}_{\mathbf{d}}\mathbf{a} = \mathbf{a}\cdot\mathbf{u} = (3,4,0)\cdot(0,1,0) = 3(0)+4(1)+0(0) = 4. $$

The answer is positive: the vector has a component of length \(4\) in the positive \(y\)-direction. As a check, the \(y\)-coordinate of \(\mathbf{a}\) is \(4\), and the chosen direction is exactly the positive \(y\)-direction, so the signed component must be \(4\).

Worked Example: A Negative Component

Find the scalar projection of \(\mathbf{a}=(2,-3,6)\) along the positive \(y\)-direction, represented by \(\mathbf{d}=(0,5,0)\).

First, calculate the magnitude and unit direction:

$$ \|\mathbf{d}\| = \sqrt{0^2+5^2+0^2} = 5, \qquad \mathbf{u} = \frac{\mathbf{d}}{5} = (0,1,0). $$

Then calculate the dot product:

$$ \operatorname{comp}_{\mathbf{d}}\mathbf{a} = \mathbf{a}\cdot\mathbf{u} = (2,-3,6)\cdot(0,1,0) = 2(0)+(-3)(1)+6(0) = -3. $$

The negative sign indicates that \(\mathbf{a}\)'s component points opposite to the chosen positive \(y\)-direction. A second check uses the angle formula. The magnitudes are \(\|\mathbf{a}\|=\sqrt{2^2+(-3)^2+6^2}=7\) and \(\|\mathbf{u}\|=1\). Thus \(\cos\theta=(\mathbf{a}\cdot\mathbf{u})/(\|\mathbf{a}\|\|\mathbf{u}\|)=-3/7\), and \(\|\mathbf{a}\|\cos\theta=7(-3/7)=-3\), as before.

Worked Example: Using a Nonunit Direction Directly

Find the scalar projection of \(\mathbf{a}=(4,2,0)\) along the direction \(\mathbf{d}=(2,-1,2)\).

Calculate the dot product and the magnitude of the direction vector:

$$ \mathbf{a}\cdot\mathbf{d} = 4(2)+2(-1)+0(2) = 8-2+0 = 6, $$ $$ \|\mathbf{d}\| = \sqrt{2^2+(-1)^2+2^2} = \sqrt{4+1+4} = 3. $$

Since \(\mathbf{d}\) is not a unit vector, divide the dot product by its magnitude:

$$ \operatorname{comp}_{\mathbf{d}}\mathbf{a} = \frac{\mathbf{a}\cdot\mathbf{d}}{\|\mathbf{d}\|} = \frac{6}{3} = 2. $$

For a check, the unit direction is \(\mathbf{u}=(2/3,-1/3,2/3)\). Then

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

Both forms of the formula give the same signed component.

What the Sign and Size Tell You

The angle between a nonzero vector and a chosen unit direction lies between \(0\) and \(\pi\). The cosine is positive for an acute angle, zero for a right angle, and negative for an obtuse angle. Consequently, the scalar projection is positive when the angle is acute, zero when the vectors are orthogonal, and negative when the angle is obtuse. If either vector is zero, its dot product with any vector is zero, so the scalar component is zero as well.

The magnitude of a scalar component cannot exceed the magnitude of the original vector. Indeed, from the definition and the bound \(|\cos\theta|\leq 1\),

$$ \left|\operatorname{comp}_{\mathbf{u}}\mathbf{a}\right| = \left|\|\mathbf{a}\|\cos\theta\right| \leq \|\mathbf{a}\|. $$

Equality occurs when \(|\cos\theta|=1\), meaning that the vectors point along the same line, either in the same direction or in opposite directions. This provides a useful check: a computed scalar component larger in absolute value than \(\|\mathbf{a}\|\) cannot be correct.

Common Mistake: Forgetting to Normalize the Direction

A frequent error is to take a dot product with an arbitrary direction vector and report the result as the scalar projection. For example, in the third worked example, \(\mathbf{a}\cdot\mathbf{d}=6\), but \(\mathbf{d}=(2,-1,2)\) has magnitude \(3\). The value \(6\) is not the signed component along that direction; the calculation has used a direction vector three times the length of a unit vector.

$$ \text{Incorrect: }\operatorname{comp}_{\mathbf{d}}\mathbf{a} = \mathbf{a}\cdot\mathbf{d} = 6. \qquad \text{Correct: }\operatorname{comp}_{\mathbf{d}}\mathbf{a} = \frac{\mathbf{a}\cdot\mathbf{d}}{\|\mathbf{d}\|} = \frac{6}{3} = 2. $$

Another sign-related error is to take an absolute value automatically. In the second example, replacing \(-3\) by \(3\) would report the length without its orientation and would not be the signed component requested. Keep the sign unless the question explicitly asks for an unsigned length.

Choosing the Calculation

If a unit direction vector is already given, take the dot product with it. If the direction is given by a nonzero vector that is not a unit vector, either normalize it first or divide the dot product by its magnitude. The two procedures are equivalent:

Direction informationScalar projection calculation
Unit vector \(\mathbf{u}\)\(\mathbf{a}\cdot\mathbf{u}\)
Nonzero vector \(\mathbf{d}\)\((\mathbf{a}\cdot\mathbf{d})/\|\mathbf{d}\|\)
Angle \(\theta\) and magnitude \(\|\mathbf{a}\|\)\(\|\mathbf{a}\|\cos\theta\)

All three expressions produce a signed scalar. In applications with physical units, the answer carries the units of \(\mathbf{a}\): dividing by the magnitude of a direction vector removes that vector's length scale and leaves a unit direction.

Check Your Understanding

Use the sign and normalization of the direction carefully in each question.

  1. Find the scalar projection of \((5,-2,1)\) along the positive \(x\)-direction.
  2. Find the scalar projection of \((1,3,2)\) along the direction \((0,2,0)\). Why is the result not simply the dot product with \((0,2,0)\)?
  3. What does a scalar projection of zero tell you about the vector and the chosen direction?
  4. If the scalar projection along a unit vector is negative, what does that say about the angle between the vector and that direction?
  5. Can the absolute value of a scalar projection be greater than the magnitude of the original vector? Explain using the angle formula.