Loading calculator…

Vector Calculator - 2D & 3D Vector Operations Online

Calculate vector operations including addition, subtraction, dot product, cross product, magnitude, angle between vectors, and projection. Math calculator for physics, engineering, computer graphics, and linear algebra students. Supports 2D and 3D vectors.

Vector Formulas

|v| = √(x² + y² + z²)

Variables:

  • |v|Magnitude (vector length)
    Magnitude (vector length)(e.g.: 5)
  • x, y, zVector components on each axis
    Vector components on each axis(e.g.: 3, 4, 0)
  • a · bDot product = a₁b₁ + a₂b₂ + a₃b₃
    Dot product = a₁b₁ + a₂b₂ + a₃b₃(e.g.: 14)
  • a × bCross product (3D only)
    Cross product (3D only)(e.g.: (i, j, k))

How to Use the Vector Calculator

  1. 1

    Select Dimension

    Choose whether you want to calculate 2D vectors (x, y) or 3D vectors (x, y, z).

  2. 2

    Enter Components

    Input the component values for vector A and vector B (if the operation involves two vectors).

  3. 3

    Select Operation

    Choose the operation: addition, subtraction, dot product, cross product, or magnitude.

  4. 4

    View Result

    The result will display the new vector or scalar value along with step-by-step calculations.

Examples

Magnitude of a 2D Vector

Problem:

Calculate the length of vector v = (3, 4)

Solution:
  1. 1.|v| = √(x² + y²)
  2. 2.|v| = √(3² + 4²)
  3. 3.|v| = √(9 + 16)
  4. 4.|v| = √25
Result:5

The length of vector (3, 4) is 5 units. This is a classic Pythagorean triple.

Dot Product of Two Vectors

Problem:

Calculate a · b where a = (1, 2, 3) and b = (4, 5, 6)

Solution:
  1. 1.a · b = a₁b₁ + a₂b₂ + a₃b₃
  2. 2.a · b = (1×4) + (2×5) + (3×6)
  3. 3.a · b = 4 + 10 + 18
Result:32

The dot product produces a scalar value of 32. A positive value indicates both vectors point in a similar direction.

Frequently Asked Questions

What is a Dot Product?
A dot product is an operation between two vectors that produces a scalar value (single number). The formula is a · b = |a||b|cos(θ) = a₁b₁ + a₂b₂ + a₃b₃. The result can be used to find the angle between two vectors or vector projection.
What is the difference between Dot Product and Cross Product?
The dot product produces a scalar and works in 2D/3D. The cross product is only for 3D and produces a new vector perpendicular to both input vectors. The cross product is used for finding surface normals and torque.
How do you find the angle between two vectors?
Use the formula cos(θ) = (a · b) / (|a| × |b|). Calculate the dot product, divide by the product of both magnitudes, then use arccos to get the angle in degrees or radians.
What is a Unit Vector?
A unit vector is a vector with length 1 that preserves the direction of the original vector. It is calculated by dividing each component by the magnitude: û = v/|v|. Often used for normalization in games and computer graphics.
When are vectors used in real life?
Vectors are used in physics (force, velocity, acceleration), game development (character movement), 3D graphics (lighting, camera), machine learning (embeddings), navigation (GPS), and engineering (structural analysis).

Related Calculators

References