Vector Magnitude CalculatorFormula

## Vector Magnitude

### Formula

**|v| = sqrt(x² + y² + z²)**

For 2D vectors (z = 0): **|v| = sqrt(x² + y²)**

### Unit Vector

A unit vector has magnitude 1 and points in the same direction:

**v_hat = v / |v| = (x/|v|, y/|v|, z/|v|)**

### Direction (2D)

The angle from the positive x-axis: **theta = arctan(y/x)**

Esempio Risolto

Find the magnitude and unit vector of (3, 4, 0).

  1. |v| = √(9 + 16 + 0) = √25 = 5
  2. Unit vector = (3/5, 4/5, 0) = (0.6, 0.8, 0)
  3. Direction = arctan(4/3) ≈ 53.13°