What Is a Projection Vector? Scalar vs. Vector Explained

A projection vector is the result of “projecting” one vector onto another, producing a new vector that lies entirely along the direction of the second vector. Think of it as the shadow one vector casts onto another when light shines straight down at a right angle. This concept is fundamental in linear algebra, physics, and computer science, and it relies on a straightforward formula built from the dot product.

The Shadow Analogy

Imagine you have two vectors, u and v, both starting from the same point. Now picture a light bulb above u, shining perpendicular onto v. The shadow that u casts onto v is the projection vector. It tells you how much of u points in the direction of v, and it gives you that answer as a vector, not just a number.

What makes this “shadow” special is the right angle it creates. If you draw a line from the tip of u down to where the shadow ends on v, that line is perfectly perpendicular to v. This perpendicularity is not a coincidence. It’s the defining geometric property of a projection.

The Formula

The vector projection of u onto v is written as projvu and calculated as:

projvu = (u · v / v · v) v

Here, u · v is the dot product of the two vectors, and v · v is the dot product of v with itself (which equals the square of its length, |v|²). The result is a scalar (a single number) that multiplies v, stretching or shrinking it to the correct length.

You can also write this formula in a way that reveals the logic more clearly:

projvu = (u · v / |v|) × (v / |v|)

The first part, (u · v / |v|), gives you the length of the shadow. The second part, (v / |v|), is the unit vector in the direction of v. Multiplying a length by a direction gives you a vector, and that vector is the projection.

Scalar Projection vs. Vector Projection

These two terms come up together and are easy to confuse. The scalar projection is just the length of the shadow: a single number equal to |u| cos θ, where θ is the angle between the two vectors. Using the dot product, this simplifies to u · v / |v|. It can be positive or negative. A positive value means the two vectors point in roughly the same direction (the angle between them is less than 90°). A negative value means they point in roughly opposite directions.

The vector projection takes that length and attaches it to the direction of v. So the vector projection has both magnitude and direction, while the scalar projection has only magnitude (with a sign). If the scalar projection is negative, the vector projection points in the opposite direction from v.

Orthogonal Decomposition

One of the most useful properties of a projection is that it splits any vector into two perpendicular pieces. If you project u onto v, you get a component parallel to v (the projection itself) and a component perpendicular to v (the leftover). Together, they add back up to the original vector u:

u = projvu + u

The perpendicular piece, u, is simply u minus the projection. This decomposition is unique: there is exactly one way to split u into a parallel part and a perpendicular part relative to v. The perpendicular piece represents how far u strays from the direction of v, while the projection captures how much u aligns with it.

This idea extends beyond single vectors. You can project a vector onto a subspace (a plane, for example, instead of just a line), and the same principle holds. The projection is the closest point on that subspace to the original vector, and the difference between them is perpendicular to the entire subspace. Georgia Tech’s Interactive Linear Algebra textbook calls this the orthogonal decomposition theorem, and it underpins much of applied linear algebra.

A Step-by-Step Example

Suppose u = (3, 4) and v = (1, 0). To find the projection of u onto v:

  • Dot product u · v: (3)(1) + (4)(0) = 3
  • Dot product v · v: (1)(1) + (0)(0) = 1
  • Scalar multiplier: 3 / 1 = 3
  • Projection vector: 3 × (1, 0) = (3, 0)

The projection is (3, 0), which sits entirely along the x-axis (the direction of v). The perpendicular leftover is (3, 4) minus (3, 0) = (0, 4), pointing straight up. Those two pieces, (3, 0) and (0, 4), are perpendicular and sum back to the original (3, 4).

Now try it with vectors that aren’t axis-aligned. Let u = (2, 3) and v = (4, 1). The dot product u · v is (2)(4) + (3)(1) = 11. The dot product v · v is 16 + 1 = 17. The scalar multiplier is 11/17. So the projection is (11/17)(4, 1) = (44/17, 11/17), roughly (2.59, 0.65). This vector lies along the direction of v and represents the portion of u that “aligns” with v.

Why Projections Matter in Physics

In physics, work is defined as force applied along the direction of motion. If you push a box at an angle, only the component of your force that points in the direction the box moves actually does work. That component is exactly the projection of the force vector onto the displacement vector. The scalar projection gives the effective force, and multiplying it by the distance gives the work done.

Resolving forces into components works the same way. When an object sits on a ramp, gravity pulls straight down, but you often need to know how much of that pull acts along the ramp’s surface versus into the surface. Projecting the gravity vector onto the ramp direction gives the sliding force, and projecting it onto the surface normal gives the force pressing the object into the ramp.

Applications in Computer Graphics and Data Science

In computer graphics, projections are everywhere. Rendering a 3D scene onto a 2D screen is fundamentally a projection: collapsing one dimension to create an image. Shadow mapping, a common technique for rendering realistic shadows, works by projecting the scene from a light source’s point of view and checking which surfaces are visible versus hidden. The math behind these operations relies on projection matrices built from the same core idea of casting one vector’s information onto another direction.

In data science, projection vectors are central to Principal Component Analysis (PCA), one of the most widely used dimensionality reduction techniques. High-dimensional data (datasets with hundreds or thousands of features) is often difficult to visualize or process. PCA finds the directions along which the data varies the most, then projects all the data points onto those directions. This is like finding the angle that casts the most informative shadow of a 3D object onto a 2D surface. The projection that preserves the most variance (the widest spread of data) is the best lower-dimensional representation. The technique works by finding the orthogonal projection that minimizes the total distance between each data point and its projected version, which is exactly the same “closest point” property from the orthogonal decomposition theorem.

Projecting to a lower dimension always loses some information, just as a shadow of a 3D object can’t capture every detail. But by choosing the right direction to project onto, PCA keeps as much of the meaningful structure as possible.