Math calculators

Vector Calculator

Updated Jul 12, 2026 By Jehan Wadia
Rate Formulas
Input Mode:
Choose an Operation
Mode: Dot Product
Enter Your Vectors
Dimension
Vector u
Vector v
Try an Example
Display Options
Your Input
Step-by-Step Solution
Answer
Interpretation
Component Breakdown
Vector Visual Diagram

Check My Answer

Introduction

This free vector calculator lets you solve vector math problems step by step. You can add, subtract, find the dot product, cross product, magnitude, unit vector, angle between vectors, and more — all in 2D or 3D. Just pick an operation, type in your numbers, and hit Calculate. The tool shows you every step so you can learn how the math works, not just get the answer.

Whether you are studying linear algebra, physics, or precalculus, this calculator helps you check your work and build your skills. You can also enter a full expression like dot (1,2,3) (4,-5,6) for a quick solve. A built-in "Check My Answer" feature lets you test your own result against the correct one. Try one of the ready-made examples below to get started right away.

How to Use Our Vector Calculator

Enter your vectors and pick an operation. The calculator will give you the answer, a step-by-step solution, a visual diagram, and a plain-English explanation of what the result means.

Pick an operation. Click one of the 12 operation cards, like Dot Product, Cross Product, Magnitude, or Add. The formula bar below the cards will update to show you the math formula being used.

Choose your input mode. Use Structured mode to type each vector component into its own box. Use Expression mode to type a full math expression, like dot (1,2,3) (4,-5,6), into a single text field.

Set the dimension. Click 2D if your vectors only have x and y parts. Click 3D if they also have a z part. Some operations, like Cross Product, only work in 3D and will lock this setting for you.

Enter Vector u. Type a number into each component box (x, y, and z) for your first vector. This vector is used in every operation.

Enter Vector v. For operations that need two vectors, like Dot Product or Angle Between, type the x, y, and z values for your second vector.

Enter Vector w. This third vector only appears for the Scalar Triple Product, which finds the volume formed by three vectors.

Enter Scalar k. This number field only appears for Scalar Multiplication. Type the number you want to scale your vector by.

Enter Magnitude and Angle. These fields only appear when you convert from polar or spherical form back to components. Type the length and angle(s) in degrees.

Click Calculate. Press the blue Calculate button to see your results. You can also just press Enter on your keyboard from any input box.

Read your results. The output includes your formatted input, each solution step, the final answer, an interpretation in plain words, a component breakdown, and a vector diagram. Use the Display Options checkboxes to show or hide any of these sections.

Check your own work. Scroll to the Check My Answer section at the bottom. Type in what you think the answer is, then click Check to see if it matches the computed result.

What Are Vectors?

A vector is a math object that has both a size (called magnitude) and a direction. Think of it like an arrow. The arrow's length tells you how big it is, and the way it points tells you its direction. Vectors are written as a list of numbers inside angle brackets, like ⟨3, 4⟩ in 2D or ⟨1, 2, 5⟩ in 3D. Each number is called a component. The components tell you how far the vector reaches along each axis: x, y, and sometimes z.

Why Do Vectors Matter?

Vectors show up everywhere in science and everyday life. When you push a box across the floor, the force you use has a strength and a direction — that's a vector. Wind speed, the path a car drives, and even the pull of gravity are all described using vectors. In math, vectors are a key part of linear algebra, a subject used in physics, engineering, computer graphics, and data science. Related tools like our matrix calculator and determinant calculator let you tackle other linear algebra problems such as solving systems of equations.

Common Vector Operations

Vector addition combines two vectors into one resultant vector by adding their matching components. Subtraction finds the difference between two vectors. The dot product multiplies two vectors together and returns a single number (a scalar). It tells you how much two vectors point in the same direction. The cross product takes two 3D vectors and gives back a new vector that is perpendicular to both of them.

The magnitude of a vector is its length, found using the Pythagorean theorem. A unit vector keeps the same direction but shrinks the length to exactly 1. Scalar multiplication stretches or shrinks a vector by a number. Vector projection finds the part of one vector that falls along another, like a shadow. The scalar triple product uses three vectors to find the volume of a 3D box shape called a parallelepiped. If you need to work with the angle between vectors, the formula relies on the inverse cosine — similar to the approach used in the law of cosines calculator.

2D vs. 3D Vectors

A 2D vector lives on a flat plane and has two components: x and y. A 3D vector adds a third component, z, and works in space. Most operations work in both 2D and 3D. The cross product and scalar triple product only work with 3D vectors because they rely on a third dimension to define a perpendicular direction or a volume. To visualize 3D results, try our 3D graphing calculator. For related coordinate geometry tasks such as finding the distance or midpoint between two points, or calculating the slope of a line, check out our dedicated tools. Vectors also play a central role in physics problems involving torque, momentum, projectile motion, and displacement.


Formulas used

Vector Addition
\vec{u}+\vec{v}=\langle u_x+v_x,\; u_y+v_y,\; u_z+v_z\rangle
Dot Product
\vec{u}\cdot\vec{v}=u_x v_x+u_y v_y+u_z v_z
Cross Product
\vec{u}\times\vec{v}=\langle u_y v_z-u_z v_y,\; u_z v_x-u_x v_z,\; u_x v_y-u_y v_x\rangle
Magnitude
|\vec{u}|=\sqrt{u_x^2+u_y^2+u_z^2}
Angle Between Vectors
\theta=\cos^{-1}\!\left(\frac{\vec{u}\cdot\vec{v}}{|\vec{u}|\,|\vec{v}|}\right)
Unit Vector
\hat{u}=\frac{\vec{u}}{|\vec{u}|}
Vector Projection
\operatorname{proj}_{\vec{v}}\vec{u}=\frac{\vec{u}\cdot\vec{v}}{|\vec{v}|^2}\,\vec{v}
Scalar Triple Product
\vec{u}\cdot(\vec{v}\times\vec{w})

Frequently asked questions

What vector operations does this calculator support?

This calculator supports 12 operations: addition, subtraction, dot product, cross product, magnitude, angle between vectors, unit vector, vector projection, scalar projection, scalar multiplication, scalar triple product, and component-to-magnitude/angle conversion. All operations work in both 2D and 3D except the cross product and scalar triple product, which require 3D vectors.

How do I enter a vector in expression mode?

Switch to Expression mode using the toggle at the top. Then type your operation keyword followed by vectors in parentheses. For example: cross (1,2,3) (1,5,7) or |(2,4,-2)| for magnitude. You can also use shortcuts like (1,2,3) + (4,5,6) for addition or 3 * (1,5,0) for scalar multiplication.

Why is the dimension locked to 3D for some operations?

The cross product and scalar triple product only exist in three dimensions. The cross product needs a third axis to point perpendicular to both input vectors. The scalar triple product measures 3D volume. When you pick either operation, the calculator locks the dimension to 3D automatically and shows a note telling you why.

What is the difference between vector projection and scalar projection?

Vector projection gives you a vector — the part of u that lies along v. Think of it as u's shadow cast onto v. Scalar projection gives you a single number — the signed length of that shadow. If the number is positive, u leans toward v. If negative, u leans away from v.

Can I use negative numbers or decimals in the vector components?

Yes. Every input box accepts negative numbers, decimals, and zero. For example, you can enter ⟨-3.5, 0, 2.1⟩ as a valid vector. Just type the values directly into the component fields or use the on-screen keypad.

How does the Check My Answer feature work?

After you run a calculation, scroll to the Check My Answer section. Type in your own answer — a single number for scalar results, or a vector like ⟨5, 4, 2⟩ for vector results. Click Check, and the tool compares your answer to the computed result. It allows a small rounding tolerance so you don't need to match every decimal place exactly.

What does a dot product of zero mean?

A dot product of zero means the two vectors are perpendicular (also called orthogonal). They meet at a perfect 90° angle. A positive dot product means they point in a similar direction, and a negative dot product means they point in mostly opposite directions.

How does the on-screen keypad work?

Click Show Keypad below the input fields. A grid of number and symbol buttons will appear. Click any input box first to select it, then tap keypad buttons to insert digits, operators, parentheses, or a vector template. The ± button toggles the sign, CLR clears the field, and the backspace button deletes the last character.

What does the Smart rounding option do?

The Smart / Friendly rounding mode rounds results to 4 decimal places so they are easy to read. The More Digits mode shows up to 8 significant figures for higher precision. You can switch between them in the Display Options section, and the results update right away.

How do I convert between component form and magnitude/angle form?

Select the Component ↔ Mag/Angle operation. Choose Components → Magnitude + Angle to turn a vector like ⟨3, 4⟩ into its length and direction angle. Choose Magnitude + Angle → Components to go the other way. In 3D, the tool uses spherical coordinates with azimuth θ and polar angle φ.

What is the scalar triple product used for?

The scalar triple product takes three 3D vectors and returns a single number. That number equals the volume of the parallelepiped (a slanted 3D box) formed by the three vectors. If the result is zero, all three vectors lie in the same flat plane — they are coplanar.

Can I hide parts of the results I don't need?

Yes. In the Display Options section, uncheck any box to hide that part of the output. You can toggle the step-by-step solution, interpretation, vector diagram, component breakdown, and physics meaning on or off. Your choice takes effect instantly without recalculating.

How do I read the vector diagram?

The diagram draws each vector as an arrow starting from the origin. Colors and a legend label each vector. For 2D, it's a standard x-y plot. For 3D, the tool uses an isometric projection to show all three axes on a flat screen. Dashed lines represent result vectors like sums, cross products, or projections.

Why does my cross product result look different when I swap the two vectors?

The cross product is anti-commutative. That means u × v = −(v × u). Swapping the two vectors flips the direction of the result. The magnitude stays the same, but every component changes sign. Order matters for cross products.

What happens if I enter a zero vector?

A zero vector like ⟨0, 0, 0⟩ has no direction. Operations like unit vector and angle between vectors will show an error because they require dividing by the vector's length, which is zero. Other operations like addition, dot product, and scalar multiplication will still work — they just give results involving zeros.

How do I copy the result to use somewhere else?

Click the Copy Result button in the top-right corner of the Answer card. The plain-text answer is copied to your clipboard. You can then paste it into a document, spreadsheet, or homework assignment.

Is there a quick way to calculate without clicking the button?

Yes. Press the Enter key on your keyboard while your cursor is in any input box. The calculator will run immediately. In Expression mode, pressing Enter in the text field also triggers the calculation.