Vector Calculator
Work with 2D and 3D vectors: add, subtract, dot product, cross product, angle between vectors, projection, magnitude, and normalization.
Enter the Details
Perform an operation on one or more vectors using our vector calculator below.
Vector a
Vector b:
Result will appear here...
What this calculator does
A vector is a quantity that has both a size and a direction, an arrow rather than a plain number. This is the all-in-one tool for working with them. Add two vectors, subtract them, multiply them in the two different ways vectors can be multiplied, find the angle between them, project one onto another, measure a length, or strip a vector down to pure direction.
It works in two dimensions or three, and it runs right here in the browser.
Using the calculator
- Choose 2D or 3D.
- Pick the operation you want from the dropdown.
- Enter the components of the vector or vectors, then press Calculate.
Some operations use two vectors (like addition or the dot product) and some use just one (like magnitude or normalize), so the input boxes adjust to match. Reset clears everything.
What a vector is
The clearest way to picture a vector is as an arrow. It has a length, which is its size or magnitude, and it points somewhere, which is its direction. We write it as a list of components, one per axis: a 2D vector like (3, 4) means "3 across and 4 up", and a 3D vector adds a third number for depth.
This is what sets a vector apart from a plain number, called a scalar. Temperature is a scalar, just a value. Velocity is a vector, because it has a speed and a heading. Force, displacement and acceleration are all vectors too, which is why so much of physics is written in the language of them.
The operations it can do
Here is what each choice in the dropdown does, and where to go for the full story on it:
- Addition and subtraction: combine two vectors by adding or subtracting their components, which lines the arrows up tip to tail. Adding a walk east to a walk north gives your overall displacement.
- Magnitude: the length of the arrow. Covered in depth by the vector magnitude calculator.
- Normalize: shrink or stretch a vector to length 1 while keeping its direction, giving a unit vector.
- Dot product: multiply two vectors to get a single number that measures how much they point the same way. See the dot product calculator.
- Cross product: multiply two 3D vectors to get a new vector at right angles to both. See the cross product calculator.
- Angle between a and b: the angle separating the two arrows, worked out from the dot product.
- Projection of a onto b: the shadow that vector a casts along the line of vector b, how much of a points in b's direction.
A worked example
Add the vectors (2, 3) and (1, 4). Adding vectors just means adding matching components: the x parts, 2 and 1, give 3, and the y parts, 3 and 4, give 7. So the sum is (3, 7). Picture it as walking (2, 3), then continuing (1, 4) from where you stopped: you end up at (3, 7) from where you began.
2D or 3D
Use 2D for anything that lives on a flat plane, like a map or a screen, where two numbers fix a direction. Use 3D when depth matters, in real space. Most operations work in either, with one exception worth remembering: the cross product only exists in 3D, because its whole job is to produce a vector perpendicular to a plane, and that idea needs the third dimension to point into.
Questions people ask
What is a vector?
A quantity with both size and direction, written as a list of components like (3, 4). Think of it as an arrow of a certain length pointing a certain way.
What is the difference between a vector and a scalar?
A scalar is just a number, like temperature or mass. A vector also has a direction, like velocity or force.
What can you do with vectors?
Add and subtract them, find their length, normalize them to length 1, multiply them with the dot or cross product, and find the angle or projection between them.
How do you add two vectors?
Add their matching components: the x parts together, the y parts together, and the z parts if in 3D. So (2, 3) + (1, 4) = (3, 7).
Do all operations work in both 2D and 3D?
Almost all do. The cross product is the exception, as it is only defined in three dimensions.
References
A note on where this comes from. The modern vector algebra used here, with its dot and cross products, was developed in the 1880s by Josiah Willard Gibbs and Oliver Heaviside, drawing on the earlier quaternions of William Rowan Hamilton. Heaviside famously used it to reduce Maxwell's twenty equations of electromagnetism to the four seen today. For further reading, see Euclidean vector.
- J. Willard Gibbs, Elements of Vector Analysis (1881), which set out the modern notation for vectors and their products.
- William Rowan Hamilton's quaternions (1843), the earlier system from which the dot and cross products descend.
Okan Atalay is a results driven senior operations manager and a graduate of Industrial Engineering from Bilkent University. With over 22 years of experience in textile manufacturing and integrated operations, he has led large scale business process improvements and strategic planning initiatives. Currently, he serves as a top mathematics expert for a global ed tech platform, where he applies his analytical expertise to solve complex mathematical problems. At Eon Tools, he reviews converter and maths tools.
Other Tools
- Average Rate Of Change Calculator
- Cross Product Calculator
- Distance Calculator
- Dot Product Calculator
- End Point Calculator
- Equation Of A Line Calculator
- Gradient Calculator
- Linear Interpolation Calculator
- Midpoint Calculator
- Parabola Calculator
- Perpendicular Line Calculator
- Point Slope Form Calculator
- Slope Calculator
- Slope Intercept Form Calculator
- Unit Vector Calculator
- Vector Magnitude Calculator
- Vertex Form Calculator
- X And Y Intercept Calculator