Vector Magnitude and Direction Calculator

Find a vector’s length, unit vector and direction.

Write 2 or 3 numbers, like (1, 2, 3).

Try

Result

You entered∣(1,2,2)∣\left|\left(1, 2, 2\right)\right|

3\displaystyle 3

Decimal

3\displaystyle 3

Unit vector

(13,23,23)\displaystyle \left(\frac{1}{3}, \frac{2}{3}, \frac{2}{3}\right)

Direction angles

α=70.528779∘, β=48.189685∘, γ=48.189685∘\displaystyle \alpha = 70.528779^\circ,\ \beta = 48.189685^\circ,\ \gamma = 48.189685^\circ
Show the work
  1. Magnitude of a vector

    Here u=(1,2,2)\mathbf{u} = \left(1, 2, 2\right). Square each component, add the squares, then take the square root: this is the length of the arrow from the origin to the point.

    ∣u∣=u12+u22+u32=12+22+22=1+4+4=9=3\begin{aligned} \left|\mathbf{u}\right| &= \sqrt{u_1^2 + u_2^2 + u_3^2} \\ &= \sqrt{1^2 + 2^2 + 2^2} \\ &= \sqrt{1 + 4 + 4} \\ &= \sqrt{9} \\ &= 3 \end{aligned}
  2. Unit vector

    Dividing a vector by its own length gives a vector of length 1 that points the same way. Here u^\hat{\mathbf{u}} is that unit vector.

    u^=u∣u∣=13(1,2,2)=(13,23,23)\begin{aligned} \hat{\mathbf{u}} &= \frac{\mathbf{u}}{\left|\mathbf{u}\right|} \\ &= \frac{1}{3}\left(1, 2, 2\right) \\ &= \left(\frac{1}{3}, \frac{2}{3}, \frac{2}{3}\right) \end{aligned}
  3. Direction angle with the x-axis

    The angle α\alpha between u\mathbf{u} and the positive x-axis has cosine equal to the x-component divided by the length. The inverse cosine returns an angle from 0∘0^\circ to 180∘180^\circ, which is the range an angle between two directions can take.

    Using cos⁡α=u1∣u∣\cos \alpha = \frac{u_1}{\left|\mathbf{u}\right|}

    α=cos⁡−1(13)≈70.528779∘\alpha = \cos^{-1}\left(\frac{1}{3}\right) \approx 70.528779^\circ
  4. Direction angle with the y-axis

    The angle β\beta between u\mathbf{u} and the positive y-axis has cosine equal to the y-component divided by the length. The inverse cosine returns an angle from 0∘0^\circ to 180∘180^\circ, which is the range an angle between two directions can take.

    Using cos⁡β=u2∣u∣\cos \beta = \frac{u_2}{\left|\mathbf{u}\right|}

    β=cos⁡−1(23)≈48.189685∘\beta = \cos^{-1}\left(\frac{2}{3}\right) \approx 48.189685^\circ
  5. Direction angle with the z-axis

    The angle γ\gamma between u\mathbf{u} and the positive z-axis has cosine equal to the z-component divided by the length. The inverse cosine returns an angle from 0∘0^\circ to 180∘180^\circ, which is the range an angle between two directions can take.

    Using cos⁡γ=u3∣u∣\cos \gamma = \frac{u_3}{\left|\mathbf{u}\right|}

    γ=cos⁡−1(23)≈48.189685∘\gamma = \cos^{-1}\left(\frac{2}{3}\right) \approx 48.189685^\circ
  6. Result

    So the magnitude is 33.

Worked examples