# What is the vector’s magnitude?

Finds the magnitude (length) of a vector from its components or from a start and an end point, in 2D, 3D or up to 10 dimensions, with the exact root, the unit vector and the direction angle.

- Page: https://www.acalculator.org/math/magnitude-calculator
- JSON spec: https://www.acalculator.org/math/magnitude-calculator.json
- Version: 512bf0023f81

## Default answer

Example with the default inputs (I know Components, Components of v [3, 4]): The magnitude of ⟨3, 4⟩ is 5.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| mode | I know | The vector’s components, or the point where it starts and the point where it ends. |
| v | Components of v | The vector’s components, such as 3, 4 or −2, 9, 5. |
| p | Start point P | The coordinates of the start (tail) of the vector. |
| q | End point Q | The coordinates of the end (head) of the vector, as many as P. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| magnitude | Magnitude ‖v‖ | The length of the vector: the square root of the sum of its squared components. |
| exact | Exact magnitude | The magnitude as a simplified square root, such as √110 or 3√2, from the components as typed. |
| squared | Magnitude squared ‖v‖² | The sum of the squared components. |
| vector | Vector v | The vector’s components; from two points, Q − P. |
| unit | Unit vector v ÷ ‖v‖ | The vector of length 1 in the same direction: each component divided by the magnitude, to 6 significant digits. |
| angle | Direction angle | For a 2D vector: the angle from the positive x axis, counterclockwise, from 0° up to 360°. |
| dimension | Components | How many components the vector has. |

## Method

‖v‖ = √(v₁² + v₂² + … + vₙ²); from P to Q, v = Q − P. Unit vector v ÷ ‖v‖; in 2D the angle is atan2(y, x).

## Assumptions

- Euclidean length: the square root of the sum of the squared components.
- From two points, v = Q − P (end minus start), coordinate by coordinate.
- Up to 10 components. The exact root form is shown when ‖v‖² = p/q has p × q at most 10¹².

## Worked examples

1. mode = components, v = -2 or 9 gives magnitude = 10.488088, exact = √110, squared = 110, dimension = 3. Source: OpenStax, Calculus Volume 3, §2.2 Vectors in Three Dimensions (‖v‖ = √(x² + y² + z²); Example 2.19: ⟨−2, 9, 5⟩ has magnitude √110 and ⟨1, −1, 0⟩ has magnitude √2), https://openstax.org/books/calculus-volume-3/pages/2-2-vectors-in-three-dimensions (retrieved 2026-10-02).
2. mode = components, v = 1 or 2 gives magnitude = 2.236068, exact = √5, unit = ⟨0.447214, 0.894427⟩, angle = 63.434949. Source: OpenStax, Calculus Volume 3, §2.1 Vectors in the Plane (‖v‖ = √(x² + y²); unit vector v ÷ ‖v‖; Example 2.7: ⟨1, 2⟩ has magnitude √5), https://openstax.org/books/calculus-volume-3/pages/2-1-vectors-in-the-plane (retrieved 2026-10-02).
3. mode = components, v = 3 or 4 gives magnitude = 5, exact = 5, squared = 25, unit = ⟨0.6, 0.8⟩, angle = 53.130102. Source: OpenStax, Calculus Volume 3, §2.1 Vectors in the Plane (‖v‖ = √(x² + y²); unit vector v ÷ ‖v‖; Example 2.7: ⟨1, 2⟩ has magnitude √5), https://openstax.org/books/calculus-volume-3/pages/2-1-vectors-in-the-plane (retrieved 2026-10-02).
4. mode = points, p = 1 or 2, q = 4 or 6 gives magnitude = 5, vector = ⟨3, 4⟩. Source: OpenStax, Calculus Volume 3, §2.1 Vectors in the Plane (‖v‖ = √(x² + y²); unit vector v ÷ ‖v‖; Example 2.7: ⟨1, 2⟩ has magnitude √5), https://openstax.org/books/calculus-volume-3/pages/2-1-vectors-in-the-plane (retrieved 2026-10-02).
5. mode = components, v = 1 or -1 gives magnitude = 1.414214, exact = √2. Source: OpenStax, Calculus Volume 3, §2.2 Vectors in Three Dimensions (‖v‖ = √(x² + y² + z²); Example 2.19: ⟨−2, 9, 5⟩ has magnitude √110 and ⟨1, −1, 0⟩ has magnitude √2), https://openstax.org/books/calculus-volume-3/pages/2-2-vectors-in-three-dimensions (retrieved 2026-10-02).
6. mode = components, v = 0.5 or 0.5 gives exact = (1/2)√2, magnitude = 0.707107. Source: OpenStax, Calculus Volume 3, §2.1 Vectors in the Plane (‖v‖ = √(x² + y²); unit vector v ÷ ‖v‖; Example 2.7: ⟨1, 2⟩ has magnitude √5), https://openstax.org/books/calculus-volume-3/pages/2-1-vectors-in-the-plane (retrieved 2026-10-02).

## FAQ

### How do I find the magnitude of a vector?

Square each component, add the squares, and take the square root: ‖v‖ = √(x² + y²) in 2D and √(x² + y² + z²) in 3D. For ⟨3, 4⟩ that is √(9 + 16) = √25 = 5.

### What is the magnitude of ⟨−2, 9, 5⟩?

√(4 + 81 + 25) = √110, about 10.488. This is Example 2.19 in OpenStax Calculus Volume 3.

### How do I find the magnitude from two points?

Subtract the start point P from the end point Q to get the components, v = Q − P, then use the formula. From P(1, 2) to Q(4, 6): v = ⟨3, 4⟩ and ‖v‖ = 5. This is the distance between the two points.

### What is a unit vector?

A vector of length 1. Divide each component by the magnitude: ⟨1, 2⟩ ÷ √5 = ⟨0.447214, 0.894427⟩. It points the same way as the vector. The zero vector has no unit vector.

### Can a magnitude be negative?

No. It is a square root of a sum of squares, so it is 0 or more. It is 0 only for the zero vector, where every component is 0.

### What is the direction angle?

For a 2D vector ⟨x, y⟩, the angle from the positive x axis turning counterclockwise, from 0° up to 360°. ⟨1, 2⟩ points at 63.4349°; ⟨−1, 0⟩ points at 180°.

### Is this the same as the Richter magnitude of an earthquake?

No. This page measures the length of a vector in maths and physics. An earthquake magnitude is a logarithm of the size of the shaking, a different idea.

## Sources

- OpenStax, Calculus Volume 3, §2.1 Vectors in the Plane (‖v‖ = √(x² + y²); unit vector v ÷ ‖v‖; Example 2.7: ⟨1, 2⟩ has magnitude √5 and unit vector ⟨1/√5, 2/√5⟩). https://openstax.org/books/calculus-volume-3/pages/2-1-vectors-in-the-plane (retrieved 2026-10-02)
- OpenStax, Calculus Volume 3, §2.2 Vectors in Three Dimensions (‖v‖ = √(x² + y² + z²); Example 2.19: ⟨−2, 9, 5⟩ has magnitude √110 and ⟨1, −1, 0⟩ has magnitude √2). https://openstax.org/books/calculus-volume-3/pages/2-2-vectors-in-three-dimensions (retrieved 2026-10-02)
