Vector Component Resolver — 2D & 3D

Resolve vectors into components, get magnitude and unit vectors, and decompose relative to a reference vector. Private by design—everything runs locally in your browser.

Inputs & Actions

Reference vector b (optional, for projection a‖b and rejection a⊥b)

Enter values to see components…

Projection: proj_b(a) = (a·b / |b|²) b. Rejection (perpendicular to b): rej_b(a) = a − proj_b(a). Angle between vectors: ∠(a,b) = arccos((a·b)/(|a||b|)).

Preview (2D only)

In 3D mode, results are shown numerically; the preview is disabled. In 2D, the canvas shows a, its x/y components, and projb(a) if b is provided.

Resolving Vectors: Components, Projection, and Rejection

Resolving a vector means expressing it in simpler, more useful parts. In a standard Cartesian basis, a 2D vector is a = ⟨aₓ, aᵧ⟩ and a 3D vector is a = ⟨aₓ, aᵧ, a_z⟩. The magnitude is |a| = √(aₓ² + aᵧ²) in 2D and |a| = √(aₓ² + aᵧ² + a_z²) in 3D. The unit vector is â = a / |a| when |a| ≠ 0.

Many problems ask for components relative to another direction, not just the x/y/z axes. If you supply a reference vector b, you can split a into a part parallel to b and a part perpendicular to b: proj_b(a) = (a·b / |b|²) b and rej_b(a) = a − proj_b(a). This decomposition is fundamental in physics (forces along a ramp), computer graphics (lighting and normals), and engineering (signal components along a basis).

When you don’t have components but instead know the magnitude and direction, this tool converts angles to components for you. In 2D, if the direction is an angle θ measured counter-clockwise from the positive x-axis, then a = |a|⟨cos θ, sin θ⟩. In 3D, we use azimuth φ in the x–y plane (from +x toward +y) and elevation θ above the x–y plane: a = |a|⟨cos θ cos φ, cos θ sin φ, sin θ⟩.

The angle between two non-zero vectors follows from the dot product: a·b = |a||b| cos α, so α = arccos((a·b)/(|a||b|)). If either vector is zero, the direction is undefined; the calculator warns you when this occurs. All computations run locally in your browser to keep your data private, and the Share/LaTeX buttons make it easy to reuse results in reports or notes.

5 Fun Facts about Vector Components

Projection is a shadow

projb(a) is literally the shadow of a on b—it keeps b’s direction and scales by alignment. The leftover rejection is the sideways “miss.”

Shadow math

Unit vectors hide the speed

Normalize any vector and you keep only its heading; multiply that unit vector by any magnitude and you instantly “dial in” a new speed.

Direction-only mode

Rotation reshuffles components

Rotate your axes by θ and the same vector gets new numbers—components are basis-dependent. Robots and drones constantly swap bases as they turn.

Moving frames

Dot signs tell the angle

A positive dot means the angle is under 90°, negative means over 90°, and zero nails a perfect right angle—fast alignment check without measuring θ directly.

Quick angle test

Rejection measures distance to a line

The length of rejb(a) is the shortest distance from the tip of a to the infinite line in the direction of b. Engineers use this to find “off-axis” error.

Off-axis check

Explore more tools