# Vector Calculator

Calculate vector magnitude, addition, subtraction, and scalar multiplication for 2D and 3D vectors. Find direction angles and results instantly.

## What this calculates

Perform vector operations for 2D and 3D vectors. Calculate magnitude, add or subtract vectors component-wise, or multiply by a scalar. Get the result vector, its magnitude, and direction angles.

## Inputs

- **Operation** — options: Magnitude, Add (V1 + V2), Subtract (V1 - V2), Scalar Multiply — Select the vector operation to perform.
- **V1 x** — X component of vector 1.
- **V1 y** — Y component of vector 1.
- **V1 z** — Z component of vector 1 (set to 0 for 2D).
- **V2 x** — X component of vector 2 (for add/subtract).
- **V2 y** — Y component of vector 2 (for add/subtract).
- **V2 z** — Z component of vector 2 (for add/subtract, 3D).
- **Scalar** — Scalar multiplier (for scalar multiply operation).

## Outputs

- **Result Vector** — formatted as text — The resulting vector from the operation.
- **Magnitude** — The magnitude (length) of the result vector.
- **Direction Angles** — formatted as text — The direction angles of the result vector in degrees.

## Details

Vectors are mathematical objects with both magnitude and direction. They are fundamental in physics, engineering, and computer graphics. A vector in 2D is defined by two components (x, y), and in 3D by three components (x, y, z).

The magnitude (or length) of a vector v = (x, y, z) is calculated as |v| = sqrt(x² + y² + z²). Vector addition and subtraction are performed component-wise: (a, b, c) + (d, e, f) = (a+d, b+e, c+f). Scalar multiplication scales every component: k(a, b, c) = (ka, kb, kc).

Direction angles are the angles that a vector makes with the positive coordinate axes. For a 3D vector, these are alpha (angle with x-axis), beta (angle with y-axis), and gamma (angle with z-axis), computed as cos(alpha) = x/|v|, cos(beta) = y/|v|, cos(gamma) = z/|v|.

## Frequently Asked Questions

**Q: How do you calculate the magnitude of a vector?**

A: The magnitude of a vector (x, y, z) is sqrt(x² + y² + z²). For a 2D vector (x, y), it is sqrt(x² + y²). This gives the length or size of the vector regardless of its direction.

**Q: What is the difference between a scalar and a vector?**

A: A scalar is a single number representing magnitude only (like temperature or mass). A vector has both magnitude and direction, represented by components (x, y) in 2D or (x, y, z) in 3D.

**Q: What are direction angles?**

A: Direction angles are the angles that a vector makes with each coordinate axis. In 3D, alpha is the angle with the x-axis, beta with the y-axis, and gamma with the z-axis. They satisfy cos²(alpha) + cos²(beta) + cos²(gamma) = 1.

---

Source: https://vastcalc.com/calculators/math/vector-calculator
Category: Math
Last updated: 2026-04-21
