Linear Algebra & Matrices

Vector Projection Calculator

Project one vector onto a nonzero direction vector exactly.

Linear Algebra & Matrices

Enter vector components

Exact rational arithmetic
Vector a to project
Direction vector b

Use ordinary signed decimals. Fractions, commas, and scientific notation are not accepted in this first batch.

Exact result

Enter valid values to see the result.

Your entries are calculated in this browser and are not submitted to 365CALCS.COM.

Quick guide

How to use this calculator

  1. Enter vector a to project.
  2. Enter a nonzero direction vector b with the same dimension.
  3. Read the exact vector projection, its coefficient, and the scalar projection.

Calculation method

Scale the direction vector

The vector projection of a onto b is ((a·b)/(b·b))b. The scalar projection is (a·b)/‖b‖ and may require a labelled square-root approximation. Projection onto the zero vector is undefined.

Worked example

Project onto the x-axis

Project a = ⟨3,4⟩ onto b = ⟨1,0⟩.

proj_b(a) = 3⟨1,0⟩ = ⟨3,0⟩

Supported inputs

Precision and limits

Vector size

General vectors may contain 2–8 components; three-dimensional products require exactly three.

Entry precision

Each signed decimal may contain up to 30 digits and 15 decimal places.

Square roots

Squared magnitudes remain exact. Irrational roots and normalized components are explicitly labelled approximations.