# What is the unit vector?

Finds the unit vector in the direction 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 form and the magnitude.

- Page: https://www.acalculator.org/math/unit-vector-calculator
- JSON spec: https://www.acalculator.org/math/unit-vector-calculator.json
- Version: c9635cbdfc0f

## Default answer

Example with the default inputs (I know Components, Components of v [3, 4]): The unit vector of ⟨3, 4⟩ is ⟨0.6, 0.8⟩.

## 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, −1, 2. |
| 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 |
| --- | --- | --- |
| unit | Unit vector û = v ÷ ‖v‖ | The vector of length 1 in the same direction, each component to 6 significant digits. |
| exact | Exact unit vector | The unit vector with exact fractions and square roots, such as ⟨√5/5, 2√5/5⟩. |
| magnitude | Magnitude ‖v‖ | The length of v: the square root of the sum of its squared components. |
| vector | Vector v | The vector’s components; from two points, Q − P. |
| angle | Direction angle | For a 2D vector: the angle from the positive x axis, counterclockwise, from 0° up to 360°. |

## Method

û = v ÷ ‖v‖ with ‖v‖ = √(v₁² + … + vₙ²); from P to Q, v = Q − P.

## Assumptions

- Euclidean length; from two points, v = Q − P (end minus start), coordinate by coordinate.
- 1 to 10 components. The zero vector has no unit vector.
- The exact form is shown when the squared length, after dividing by the largest component, is p/q with p × q at most 10¹².

## Worked examples

1. mode = components, v = 1 or 2 gives unit = ⟨0.447214, 0.894427⟩, exact = ⟨√5/5, 2√5/5⟩, magnitude = 2.236068. Source: OpenStax, Calculus Volume 3, §2.1 Vectors in the Plane (unit vector v ÷ ‖v‖; Example 2.7: v = ⟨1, 2⟩ has unit vector ⟨1/√5, 2/√5⟩). https://openstax.org/books/calculus-volume-3/pages/2-1-vectors-in-the-plane.
2. mode = components, v = 3 or 4 gives unit = ⟨0.6, 0.8⟩, exact = ⟨3/5, 4/5⟩, magnitude = 5, angle = 53.130102. Source: OpenStax, Calculus Volume 3, §2.1 Vectors in the Plane (unit vector v ÷ ‖v‖; Example 2.7: v = ⟨1, 2⟩ has unit vector ⟨1/√5, 2/√5⟩). https://openstax.org/books/calculus-volume-3/pages/2-1-vectors-in-the-plane.
3. mode = components, v = 2 or -1 gives unit = ⟨0.666667, −0.333333, 0.666667⟩, exact = ⟨2/3, −1/3, 2/3⟩, magnitude = 3. Source: OpenStax, Calculus Volume 3, §2.2 Vectors in Three Dimensions (‖v‖ = √(x² + y² + z²)). https://openstax.org/books/calculus-volume-3/pages/2-2-vectors-in-three-dimensions.
4. mode = points, p = 1 or 2, q = 4 or 6 gives vector = ⟨3, 4⟩, unit = ⟨0.6, 0.8⟩, magnitude = 5. Source: OpenStax, Calculus Volume 3, §2.1 Vectors in the Plane (unit vector v ÷ ‖v‖; Example 2.7: v = ⟨1, 2⟩ has unit vector ⟨1/√5, 2/√5⟩). https://openstax.org/books/calculus-volume-3/pages/2-1-vectors-in-the-plane.

## FAQ

### How do I find a unit vector?

Divide each component by the vector’s magnitude: û = v ÷ ‖v‖. For v = ⟨3, 4⟩, ‖v‖ = 5, so û = ⟨3/5, 4/5⟩ = ⟨0.6, 0.8⟩.

### What is the unit vector of ⟨1, 2⟩?

‖v‖ = √5, so û = ⟨1/√5, 2/√5⟩. With the root moved to the top that is ⟨√5/5, 2√5/5⟩, about ⟨0.447214, 0.894427⟩. This is Example 2.7 in OpenStax Calculus Volume 3.

### How do I find the unit vector between two points?

Subtract the start point from the end point, v = Q − P, then divide by its length. From P(1, 2) to Q(4, 6): v = ⟨3, 4⟩ and û = ⟨0.6, 0.8⟩.

### Does the zero vector have a unit vector?

No. Its length is 0, so there is nothing to divide by, and it points in no direction.

### Why is the length of the unit vector 1?

Dividing every component by ‖v‖ divides the length by ‖v‖ too, so the new length is ‖v‖ ÷ ‖v‖ = 1. The direction stays the same.

### Do ⟨3, 4⟩ and ⟨30, 40⟩ have the same unit vector?

Yes. A positive multiple of a vector points the same way, so both give ⟨0.6, 0.8⟩. A negative multiple gives the opposite unit vector.

## Sources

- OpenStax, Calculus Volume 3, §2.1 Vectors in the Plane (‖v‖ = √(x² + y²); a unit vector is v ÷ ‖v‖; Example 2.7: v = ⟨1, 2⟩ has 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²)). https://openstax.org/books/calculus-volume-3/pages/2-2-vectors-in-three-dimensions (retrieved 2026-10-02)
