---
title: "Vector Projection Calculator — Project A onto B with Step-by-Step"
description: "Calculate the vector projection of A onto B, perpendicular component, and scalar projection. Step-by-step working for 2D, 3D, and 4D vectors. Used in Gram-Schmidt, least squares, and PCA."
url: "https://worldcalculators.org/calculators/vector-projection/"
canonical: "https://worldcalculators.org/calculators/vector-projection/"
---

# Vector Projection Calculator

Calculate the vector projection of A onto B, perpendicular component, and scalar projection. Step-by-step working for 2D, 3D, and 4D vectors. Used in Gram-Schmidt, least squares, and PCA.

## Quick answer

Projecting vector A onto vector B

## How Vector Projection Works

Think of shining a light straight down onto vector B — the shadow of A on B is the projection. It's the "shadow" or "component" of A in the direction of B.
The key identity: A = proj_B(A) + perp where proj_B(A) is parallel to B and perp is perpendicular to B. These two components are orthogonal (perpendicular) to each other.

## Frequently Asked Questions

No — they are different in general. proj_B(A) projects A onto the direction of B, giving a result parallel to B. proj_A(B) projects B onto the direction of A, giving a result parallel to A. They have the same scalar magnitude (A·B/|B| = A·B/|A| only when |A|=|B|=1), but different directions.
When A ⊥ B, the dot product A·B = 0, so proj_B(A) = (0/|B|²)×B = 0. The projection is the zero vector — meaning A has no component along B. The entire A vector is the perpendicular component. This is used to verify orthogonality: if the projection is zero, the vectors are perpendicular.

Source: https://worldcalculators.org/calculators/vector-projection/
Markdown mirror of the HTML page. Prefer this URL for RAG; the interactive calculator still lives on the HTML page.
