Quick answer
The vector calculator adds, subtracts and multiplies vectors. For a = (1, 2, 3) and b = (4, 5, 6): a + b = (5, 7, 9), a − b = (−3, −3, −3), a · b = 32, a × b = (−3, 6, −3) and |a| = 3.7417.
Enter two vectors with 2 or 3 components. The calculator returns sum, difference, dot and cross products, magnitudes and the angle.
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 Calculator
- Type vector a (2 or 3 components), for example 1, 2, 3.
- Type vector b (2 or 3 components), for example 4, 5, 6.
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| Vector a (2 or 3 components) | Text, such as 1, 2, 3 | — |
| Vector b (2 or 3 components) | Text, such as 4, 5, 6 | — |
Formula and method
Formula
a + b; a − b; a·b = Σ aᵢbᵢ; a × b; θ = arccos(a·b ÷ |a||b|)
IEEE-754 double precision; shown to at most 6 decimal places.
Two-component vectors are treated as lying in the xy-plane.
Worked examples
These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: Vector a (2 or 3 components) = 1, 2, 3; Vector b (2 or 3 components) = 4, 5, 6.
| Result | Value |
|---|---|
| Sum (a + b) | (5, 7, 9) |
| Difference (a − b) | (-3, -3, -3) |
| Dot product | 32 |
| Cross product | (-3, 6, -3) |
| Magnitude of a | 3.741657 |
| Magnitude of b | 8.774964 |
| Angle between | 12.9332° |
Example 2
Inputs: Vector a (2 or 3 components) = 3, 4; Vector b (2 or 3 components) = -4, 3.
| Result | Value |
|---|---|
| Sum (a + b) | (-1, 7, 0) |
| Difference (a − b) | (7, 1, 0) |
| Dot product | 0 |
| Cross product | (0, 0, 25) |
| Magnitude of a | 5 |
| Magnitude of b | 5 |
| Angle between | 90° |
Example 3
Inputs: Vector a (2 or 3 components) = 1, 0, 0; Vector b (2 or 3 components) = 0, 1, 0.
| Result | Value |
|---|---|
| Sum (a + b) | (1, 1, 0) |
| Difference (a − b) | (1, -1, 0) |
| Dot product | 0 |
| Cross product | (0, 0, 1) |
| Magnitude of a | 1 |
| Magnitude of b | 1 |
| Angle between | 90° |
The first line is the headline result (sum (a + b)). Below it the vector Calculator lists difference (a − b), dot product, cross product, magnitude of a, magnitude of b and angle between, which describe the same case from other angles. IEEE-754 double precision; shown to at most 6 decimal places.
All operations at once
Sum and difference work component by component. The dot product is 4 + 10 + 18 = 32. The cross product exists only for 3D vectors. The angle between them is arccos(32 ÷ (3.7417 × 8.775)) = 12.93°.
Single-purpose pages
For one operation at a time, see the Dot Product, Cross Product, Vector Magnitude, Vector Projection, Vector Subtraction and Angle Between Two Vectors calculators. The angle needs non-zero vectors.
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- Vector a (2 or 3 components): entering "1" shows "Enter 2 or 3 components." beside that field and no result.
Choosing between the Vector 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 Subtraction Calculator](/math/vector-subtraction-calculator/) | vector A and vector B | a − b |
| [Fraction Calculator](/math/fraction-calculator/) | numerator 1, denominator 1 and operation | Result |
Background: calculus, vectors and matrices
A derivative measures how fast a function's output changes with its input, and an integral accumulates a quantity such as area. The determinant of a 2×2 matrix [[a, b], [c, d]] is ad − bc, so [[3, 8], [4, 6]] has determinant 3×6 − 8×4 = −14.
The dot product of two vectors is the sum of the products of matching components and is a single number; a positive value means the vectors point in broadly the same direction.
Assumptions and limitations
- Angle needs non-zero vectors
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 a (2 or 3 components) to confirm this.
Frequently asked questions
What is a vector?
A quantity with magnitude and direction.
Can I use 2D vectors?
Yes, with two components.
What is the difference between dot and cross products?
The dot gives a number, the cross a vector.
What does the Vector Calculator calculate?
Sum, difference, dot product, cross product and angle of two vectors. It returns Sum (a + b), Difference (a − b), Dot product, Cross product and Magnitude of a.
What formula does the Vector Calculator use?
a + b; a − b; a·b = Σ aᵢbᵢ; a × b; θ = arccos(a·b ÷ |a||b|). Two-component vectors are treated as lying in the xy-plane.
What do I need to enter in the vector Calculator?
You enter Vector a (2 or 3 components) and Vector b (2 or 3 components).
How is the result rounded or limited?
IEEE-754 double precision; shown to at most 6 decimal places. Angle needs non-zero vectors.
What is an example of a vector result?
With vector a (2 or 3 components) 1, 2, 3 and vector b (2 or 3 components) 4, 5, 6, the sum (a + b) is (5, 7, 9).
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 Subtraction Calculator — Subtract one vector from another.
- Fraction Calculator — Add, subtract, multiply and divide fractions with simplified and mixed-number results.
- Ratio Calculator — Simplify a ratio of two whole 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.