Vector Calculator — Add, Subtract, Multiply & Project Vectors in 2D and 3D
Welcome to our vector calculator! This tool helps you perform and understand a wide range of vector operations — from simple addition to cross products and vector projections. Whether you work with 2D plane vectors or 3D space vectors, enter Cartesian coordinates or specify magnitude and direction (2D), and get instant results with step-by-step formulas.
Supported operations:
- Vector addition (A + B)
- Vector subtraction (A − B)
- Dot product (scalar product)
- Cross product (vector product, 3D only)
- Vector normalization (unit vector)
- Vector projection (projAB)
- Vector between two points
Cartesian Coordinates
In a rectangular (Cartesian) coordinate system, a 2D vector a is described by two components:
a = [ax, ay]
These components represent horizontal displacement (ax along the x-axis) and vertical displacement (ay along the y-axis). Similarly, a 3D vector uses three components:
a = [ax, ay, az]
Vector Direction and Magnitude
For 2D vectors you can also use polar form — magnitude m (length) and direction angle θ (measured from the positive x-axis):
ax = m × cos(θ) ay = m × sin(θ)
The magnitude (norm) of vector a is: |a| = √(ax² + ay²) in 2D, or √(ax² + ay² + az²) in 3D.
How to Find the Vector Between Two Points
Given an initial point A = [ax, ay, az] and a final point B = [bx, by, bz], the vector from A to B is:
B − A = [bx − ax, by − ay, bz − az]
Example: Initial point [1, 2, 3], final point [1, 1, −1]:
Vector = [1−1, 1−2, −1−3] = [0, −1, −4]
Vector Addition
Add corresponding components:
A + B = [ax + bx, ay + by, az + bz]
Example: A = [2, 3, 4], B = [1, −2, 3]
A + B = [3, 1, 7]
Vector Subtraction
Subtract corresponding components:
A − B = [ax − bx, ay − by, az − bz]
Example: A = [2, 3, 4], B = [1, −2, 3]
A − B = [1, 5, 1]
Dot Product (Scalar Product)
The dot product returns a single number:
A · B = ax×bx + ay×by + az×bz = |A|×|B|×cos(θ)
Where θ is the angle between the vectors. Example: A = [2, 3, 4], B = [1, −2, 3]
A · B = 2 − 6 + 12 = 8
Tip: A · A = |A|² (dot product with itself equals squared magnitude).
Cross Product (Vector Product, 3D Only)
The cross product returns a vector perpendicular to both A and B:
A × B = [ay×bz − az×by, az×bx − ax×bz, ax×by − ay×bx]
Its magnitude equals the area of the parallelogram spanned by A and B. Note: order matters — B × A = −(A × B).
Example: A = [2, 3, 4], B = [1, −2, 3]
A × B = [3×3 − 4×(−2), 4×1 − 2×3, 2×(−2) − 3×1] = [17, −2, −7]
How to Normalize a Vector
Normalization scales a vector to unit length (magnitude = 1) while keeping its direction. First find the norm:
|A| = √(ax² + ay² + az²)
Then divide each component by the norm:
â = A / |A| = [ax/|A|, ay/|A|, az/|A|]
Example: A = [2, 3, 4] → |A| = √29 ≈ 5.385
â = [2/√29, 3/√29, 4/√29] ≈ [0.371, 0.557, 0.743]
Vector Projection
The projection of vector B onto vector A is the component of B that lies along A:
proj_A B = (A·B / |A|²) × A
Example: A = [2, 3, 4], B = [1, −2, 3]
A·B = 8, |A|² = 29 → scaling factor = 8/29
proj_A B = (8/29) × [2, 3, 4] ≈ [0.552, 0.828, 1.103]
Measurement Systems
The vector calculator supports three unit modes:
- Dimensionless — pure mathematical vectors (no units)
- Metric — coordinates in meters (m); magnitudes displayed in meters
- US/Imperial — coordinates in feet (ft); magnitudes displayed in feet
FAQs
- Can I use negative coordinates?
- Yes — all fields accept any real number, positive or negative.
- Why is the cross product only available in 3D?
- The cross product is defined only for 3D vectors. For 2D vectors, use the dot product to find the angle between them.
- What is the norm of a vector?
- The norm (or magnitude) is the length of the vector: |A| = √(ax² + ay² + az²). For a unit vector (normalized), |A| = 1.
- What does a dot product of zero mean?
- A dot product of zero means the two vectors are perpendicular (orthogonal) to each other.