Vector Calculator
2D and 3D vector operations with steps and a visualization.
Vector u
Vector v
Free Vector Calculator
Perform any common vector operation with our free vector calculator. Enter two 2D or 3D vectors and instantly get their sum, difference, dot product, cross product (3D), magnitudes, unit vectors, and the angle between them — all with step-by-step working shown.
A live 2D visualization plots your vectors as arrows from the origin, with the result vector overlaid for addition and subtraction, so you can see the geometry, not just the numbers. The angle between vectors is computed via the dot-product formula and shown in both degrees and radians, with the zero-vector edge case handled explicitly rather than crashing.
Whether you're studying physics, engineering, or linear algebra, get accurate vector arithmetic with the reasoning shown. No sign-up, no downloads required.
About the Vector Calculator
How It Works & Methodology
The Vector Calculator performs addition, subtraction, dot product, cross product (3D), magnitude, unit vector, and angle-between calculations on two input vectors, in either 2D or 3D. A 2D visualization plots both vectors and their sum as arrows from the origin.
Features
2D and 3D modes
Toggle dimensions; cross product available only in 3D.
Full operation set
Sum, difference, dot and cross product, magnitude, and unit vectors.
Angle between vectors
Computed via the dot-product formula, with the zero-vector case handled explicitly.
2D visualization
Vectors and their sum plotted as arrows from the origin.
Mathematical Basis & Practical Verification
The Vector Calculator is built on Euclidean and analytic geometry formulas, maintaining exact symbolic multiples of π and radical expressions alongside 6-significant-digit floating-point approximations. Performs 2D and 3D vector operations - addition, subtraction, scalar multiplication, dot product, cross product, magnitude, unit vector, and angle between vectors. Key capabilities built into this tool include 2d and 3d vectors, dot and cross product, magnitude and unit vector, angle between vectors, and 2d visualization.
All computations for the Vector Calculator follow the definitions established in NIST Digital Library of Mathematical Functions — Trigonometric & Geometric Identities (National Institute of Standards and Technology (NIST)) and ISO 80000-3: Quantities and Units — Space and Time (International Organization for Standardization (ISO)). Because the solver evaluates inputs locally in IEEE 754 double-precision arithmetic (53-bit significand, ~15–17 significant decimal digits) and is regression-tested against deterministic reference fixtures in tests/vector-calculator.spec.ts, you can inspect boundary conditions, verify dimensional consistency across geometry units, and cross-check each intermediate step against textbook solutions.
Related Calculators & Tools
Calculate the volume of spheres, cylinders, cones, cubes and pyramids.
Find interior and exterior angles for any regular polygon.
Calculate surface areas of all common 3D shapes with formulas.
Find distance, slope, midpoint and line equations in one tool.
Authoritative Sources & Standards
- NIST Digital Library of Mathematical Functions — Trigonometric & Geometric Identities — National Institute of Standards and Technology (NIST)
- ISO 80000-3: Quantities and Units — Space and Time — International Organization for Standardization (ISO)
Frequently Asked Questions
What operations are supported?
Addition, subtraction, scalar multiplication, dot product, cross product (3D), magnitude, unit vector, and angle between vectors.
Does it support 2D and 3D vectors?
Yes, toggle between them; cross product is only available in 3D since it's undefined in 2D.
How is the angle between vectors calculated?
Using cos θ = (u·v)/(|u||v|), then taking the inverse cosine — shown in both degrees and radians.
What if one vector is the zero vector?
The angle is undefined in that case, and the tool flags this clearly rather than dividing by zero.
Does it show a visualization?
Yes, a 2D plot shows both vectors as arrows from the origin, plus the sum vector.
Does it show the steps?
Yes, component-wise arithmetic and the cross-product determinant expansion are shown.
What is a unit vector?
A vector with the same direction but magnitude 1, computed as v / |v| — shown for both input vectors.
Are results shown as fractions or decimals?
Decimal values rounded to a sensible precision.