notesonly.in

One notebook for every subject — open it anywhere.

Log in

Orthogonal Projections: Formula and Examples Guide

The orthogonal projection of a vector v onto a nonzero vector u is the shadow of v cast along the direction of u. It is the vector parallel to u that lies closest to v, so the leftover part of v is perfectly perpendicular to u.

Projections matter because they give the best possible approximation of one vector by another. Whenever you fit a straight line through scattered data points, strip noise from a signal, or draw a 3D shadow on a 2D screen, you are computing a projection. It is also the engine of the Gram–Schmidt process, which builds orthonormal bases.

Key Concepts

  • Dot product. For v = (v1, v2, …, vn) and u = (u1, u2, …, un), v · u = v1u1 + v2u2 + … + vnun.
  • Norm squared. ‖u‖² = u · u, the squared length of u.
  • Scalar projection. comp_u v = (v · u) / ‖u‖, the signed length of the shadow of v on u.
  • Vector projection. proj_u v, the full vector along u.
  • Residual. w = v − proj_u v, orthogonal to u, so w · u = 0.

Formulas

  • Master formula: proj_u v = ((v · u) / (u · u)) u.
  • Unit-vector shortcut: if ‖u‖ = 1, proj_u v = (v · u) u.
  • Residual check: w = v − proj_u v must satisfy w · u = 0; otherwise the arithmetic went wrong.
  • Assumptions and limits: u must be nonzero. The formula uses the standard dot product; with another inner product, use that product instead.

Worked Example

Project v = (3, 4) onto u = (1, 2), step by step.

  1. Dot product: v · u = 3 × 1 + 4 × 2 = 3 + 8 = 11.
  2. Norm squared: u · u = 1² + 2² = 1 + 4 = 5.
  3. Scalar factor: (v · u) / (u · u) = 11 / 5 = 2.2.
  4. Scale u: proj_u v = 2.2 × (1, 2) = (2.2, 4.4).
  5. Residual: w = (3, 4) − (2.2, 4.4) = (0.8, −0.4).
  6. Verify: w · u = 0.8 × 1 + (−0.4) × 2 = 0.8 − 0.8 = 0. The check passes, so (2.2, 4.4) is the correct projection.

Common Misconceptions

  • Forgetting the division. Writing (v · u) u without dividing by ‖u‖² is valid only when u has length 1.
  • Thinking projection is symmetric. In general proj_u v ≠ proj_v u; each projection points along a different vector.
  • Assuming the scalar projection is always positive. It is negative whenever v points mostly opposite to u.

Real-World Applications

  • Least-squares regression: the best-fit line is the projection of the data vector onto the column space of the design matrix.
  • Computer graphics: shadows and camera views are projections of 3D geometry onto planes.
  • Signal processing: frequency decomposition projects a signal onto sine and cosine basis vectors.

Orthogonal projection splits any vector into a part along u and a part perpendicular to u, using the single formula ((v · u)/(u · u)) u. Master this one computation and you hold the key to least squares, Gram–Schmidt orthogonalization, and a large part of applied linear algebra.