Skip to content
math

Vector Subtraction Calculator

Subtract two 2D or 3D vectors and find the magnitude of the difference.

Vector a
Vector b
Difference a − b
(2, 2, 0)
Magnitude |a − b|
2.83

How it works

  1. 1Enter the x, y (and optionally z) components for vector a and vector b.
  2. 2Each component of b is subtracted from the matching component of a to form the difference vector a − b.
  3. 3The magnitude |a − b| is computed as √(Σ(aᵢ − bᵢ)²), giving the straight-line distance between the two tip points.

Use cases

  • Finding the displacement vector between two positions in 2D or 3D space.
  • Computing the relative velocity of one object with respect to another in physics simulations.
  • Measuring the Euclidean distance between two data points represented as vectors.

Frequently asked questions

Is vector subtraction commutative?

No. a − b and b − a point in opposite directions; only their magnitudes are equal.

What does the magnitude |a − b| represent?

It equals the Euclidean distance between the tips of the two vectors when both are placed at the same origin.

Can I subtract vectors of different dimensions?

Mathematically, only vectors of the same dimension should be subtracted. This calculator treats any missing component as 0, consistent with standard embedding conventions.

See all →