Quick answer
Vector subtraction is a − b = (aᵢ − bᵢ). (5, 7) − (2, 3) = (3, 4), which has a magnitude of 5.
Enter two vectors of the same dimension. The calculator returns the difference and its magnitude.
Related tools: Vector Magnitude Calculator: Length (Euclidean norm) of a vector. Vector Projection Calculator: Projection of vector a onto vector b. Unit Vector Calculator: Unit vector in the direction of a vector.
How to use the Vector Subtraction Calculator
- Type vector A, for example 1, 2, 3.
- Type vector B, for example 1, 2, 3.
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| Vector A | Text, such as 1, 2, 3 | — |
| Vector B | Text, such as 1, 2, 3 | — |
Formula and method
Formula
a − b = (aᵢ − bᵢ)
IEEE-754 double precision; shown to at most 6 decimal places.
Component-wise subtraction.
Worked examples
This example is verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: Vector A = 5, 7; Vector B = 2, 3.
| Result | Value |
|---|---|
| a − b | (3, 4) |
| Magnitude | 5 |
The first line is the headline result (a − b). Below it the vector Subtraction Calculator lists magnitude, which describe the same case from other angles. IEEE-754 double precision; shown to at most 6 decimal places.
Geometric meaning
a − b is the vector from the tip of b to the tip of a, so its length is the distance between the points (5, 7) and (2, 3): 5.
Direction
The order matters: b − a = (−3, −4), the opposite direction. Relative velocity is a typical use: a car at (5, 7) m/s relative to another at (2, 3) m/s moves at (3, 4) m/s relative to it.
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- Vector B: entering "1" shows "Enter at least 2 numbers." beside that field and no result.
Choosing between the Vector Subtraction Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Vector Magnitude Calculator](/math/vector-magnitude/) | components | Magnitude |
| [Vector Projection Calculator](/math/vector-projection-calculator/) | vector A and vector B | Projection |
| [Unit Vector Calculator](/math/unit-vector-calculator/) | vector | Unit vector |
| [Vector Calculator](/math/vector/) | vector a and vector b | Sum (a + b) |
| [Slope Calculator](/math/slope-calculator/) | x₁, y₁ and x₂ | Slope |
Background: algebra
Many algebra calculators rest on the same ideas: write the problem in a standard form, identify the coefficients, apply the formula and check the answer by substituting it back. For a quadratic ax² + bx + c = 0 the roots are (−b ± √(b² − 4ac)) ÷ 2a, and the discriminant b² − 4ac decides the kind of roots: positive gives two real roots, zero gives one repeated root and negative gives two complex conjugate roots.
If a = 0 the equation is linear, not quadratic. A sign slip on the −b term shifts both roots by the same amount, so substitute your roots back to check.
Assumptions and limitations
- Same dimension
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for vector B to confirm this.
Frequently asked questions
What is (1, 1) − (1, 1)?
(1, 1) − (1, 1) = (0, 0), the zero vector, with magnitude 0.
Is subtraction commutative?
No. a − b = −(b − a): (5, 7) − (2, 3) = (3, 4) but (2, 3) − (5, 7) = (−3, −4).
Do vectors need equal length?
They need the same dimension.
What does the Vector Subtraction Calculator calculate?
Subtract one vector from another. It returns a − b and Magnitude.
What formula does the Vector Subtraction Calculator use?
a − b = (aᵢ − bᵢ). Component-wise subtraction.
What do I need to enter in the vector Subtraction Calculator?
You enter Vector A and Vector B.
How is the result rounded or limited?
IEEE-754 double precision; shown to at most 6 decimal places. Same dimension.
What is an example of a vector Subtraction result?
With vector A 5, 7 and vector B 2, 3, the a − b is (3, 4).
Related calculators
- Vector Magnitude Calculator — Length (Euclidean norm) of a vector.
- Vector Projection Calculator — Projection of vector a onto vector b.
- Unit Vector Calculator — Unit vector in the direction of a vector.
- Vector Calculator — Sum, difference, dot product, cross product and angle of two vectors.
- Slope Calculator — Slope, angle, distance and line equation through two points.
- LCM Calculator — Least common multiple of two or more numbers.
Sources
- OpenStax, Precalculus 2e (Rice University): vectors, polar coordinates and trigonometry
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.