Steps for a vector calculation
Start with the operation that matches the result you need. The Vector Calculator then shows the result, its formula, and the calculation steps. Exact fraction output is kept for the operations that use component-wise arithmetic.
- Select Magnitude & Unit Vector, Add / Subtract, Scalar Multiply, Dot Product, Cross Product, Angle Between, or Projection.
- Select 2D ⟨x, y⟩ or 3D ⟨x, y, z⟩.
- Enter the x and y values for Vector A, then Vector B or
kwhen the selected operation shows those fields. - For Add / Subtract, select A + B or A − B.
- Click Calculate.
- Use Copy result or Download result (.txt) after the result appears.
What each vector operation returns
Magnitude & Unit Vector reports the magnitude, a decimal unit-vector approximation, and the direction cosine and angle for each axis. A zero Vector A is rejected because it has no direction for a unit vector. Scalar Multiply applies k to Vector A and reports the magnitude of the result.
Dot Product returns one number and calculates an angle when both vectors are nonzero. Cross Product returns a vector in 3D. In 2D, it returns the signed scalar ax*by − ay*bx; the absolute value is the parallelogram area, and the sign indicates orientation. Projection returns the vector projection of Vector A onto Vector B, the scalar projection, and the component perpendicular to Vector B.
Vector A = (1, 2)
Vector B = (4, 5)
Add / Subtract = A + B
Result = (5, 7)
Entering 2D and 3D vectors
Select 2D ⟨x, y⟩ or 3D ⟨x, y, z⟩. That choice controls every vector field, so Vector A and Vector B always have matching dimensions. Enter plain numbers or fractions such as -3, 2.5, and 3/4. The parser rejects an empty field, a zero denominator, or text that is not a number or fraction.
In 2D, Cross Product returns the signed scalar z-component of the equivalent 3D cross product. The calculator has no option beyond 3D and does not perform symbolic algebra or a physics simulation.
Exact results and zero-vector checks
Fractions, addition, subtraction, scalar multiples, dot products, and cross products stay exact. Magnitudes, unit-vector values, direction-cosine values, and angles use decimal displays because they involve square roots or arccosine. After you click Calculate, the formulas and intermediate steps appear in Result under Formulas & steps.
Magnitude & Unit Vector rejects zero Vector A. Angle Between rejects either zero vector, and Projection rejects a zero Vector B. Dot Product returns zero for a zero input, while Cross Product returns the zero result. Reset clears the vector and scalar fields, hides errors, and hides the result.
Checking a sum or projection
For a component check, enter the two vectors and choose Add / Subtract. With (1, 2) and (4, 5), the A + B result is (5, 7).
For a projection, choose Projection and enter Vector A and Vector B. The result separates the part of Vector A along Vector B from the perpendicular component.
When another calculator fits better
Use Math Calculators for an equation, fraction, sequence, matrix, geometry, or scientific calculation. Choose Vector Magnitude Calculator for the length of a 2D, 3D, or higher-dimensional vector. Choose Distance Formula Calculator for the straight-line distance between two coordinate points. Use Matrix Calculator for matrix operations or solving Ax = b.
The page parses and calculates entered vector values in the browser. The calculator script does not submit those values.
Frequently asked questions
What can a vector calculator calculate?
This Vector Calculator calculates magnitude, unit vector, addition, subtraction, scalar multiplication, dot product, cross product, angle between vectors, and projection for 2D or 3D input.
How do I enter 2D or 3D vectors?
Select 2D ⟨x, y⟩ or 3D ⟨x, y, z⟩, then fill every visible x, y, and z field for Vector A and Vector B. Both vectors use the same dimension selection.
How does a 2D cross product work?
In 2D, Cross Product returns the signed scalar z-component ax*by − ay*bx of the equivalent 3D cross product. The absolute value gives the parallelogram area, and the sign indicates orientation.
Why does the vector calculator reject a zero vector?
A zero vector has no direction. Magnitude & Unit Vector cannot form a unit vector, Angle Between cannot find an angle, and Projection cannot use a zero Vector B. Dot Product and Cross Product still return zero results for a zero input.
Does the Vector Calculator keep fractions exact?
Yes. Component-wise arithmetic, scalar multiples, dot products, and cross products keep parsed fractions exact. Magnitude, unit-vector, direction-cosine, and angle values are displayed as decimals.