Skip to main content
CalcChef

Vector Magnitude 3D

Vector magnitude calculator for x, y and z: the length √(x² + y² + z²), the unit vector and the angle to each axis. (3, 4, 0) has magnitude 5. How it works

Use the Vector Magnitude 3D

Magnitude
5.0000

This page takes one vector. For the dot product of two vectors, use the Cross Product Calculator.

√(3² + 4² + 0²)

Unit vector (normalized)

(0.6000, 0.8000, 0.0000)

(3/5.0000, 4/5.0000, 0/5.0000)

Direction angles

Angle α (x-axis)53.13°
Angle β (y-axis)36.87°
Angle γ (z-axis)90.00°

cos²α + cos²β + cos²γ = 1.0000 ≈ 1

About the Vector Magnitude 3D

The vector (3, 4, 0) has a magnitude of 5, a unit vector of (0.6000, 0.8000, 0.0000) and direction angles of 53.13°, 36.87° and 90.00° to the x, y and z axes. This vector magnitude calculator takes x, y and z and uses |v| = √(x² + y² + z²), the straight-line distance from the origin to the point (x, y, z).

Magnitude, unit vector and direction angles

Vector (x, y, z)MagnitudeUnit vectorAngles α, β, γ
3, 4, 05.0000(0.6000, 0.8000, 0.0000)53.13°, 36.87°, 90.00°
1, 2, 23.0000(0.3333, 0.6667, 0.6667)70.53°, 48.19°, 48.19°
2, 3, 67.0000(0.2857, 0.4286, 0.8571)73.40°, 64.62°, 31.00°
1, 1, 11.7321(0.5774, 0.5774, 0.5774)54.74°, 54.74°, 54.74°
-3, 4, 1213.0000(-0.2308, 0.3077, 0.9231)103.34°, 72.08°, 22.62°
2, -1, 23.0000(0.6667, -0.3333, 0.6667)48.19°, 109.47°, 48.19°

Magnitude and unit vector show 4 decimals and the angles 2, as the page does.

How to use this tool

  1. Type the x, y and z components. The fields open at (3, 4, 0).
  2. Read the magnitude, the unit vector and the three direction angles. The check line shows that cos²α + cos²β + cos²γ comes to 1.

Frequently asked questions

How do you find the magnitude of a 3D vector?
Square each component, add the three squares and take the square root. (1, 2, 2) gives √(1 + 4 + 4) = √9 = 3, (2, 3, 6) gives √49 = 7 and (-3, 4, 12) gives √169 = 13. Signs do not matter, because each component is squared.
How do you normalize a vector to get its unit vector?
Divide each component by the magnitude. (1, 2, 2) divided by 3 is (0.3333, 0.6667, 0.6667), a vector of length 1 that points the same way. A zero vector cannot be normalized: the tool shows "Zero vector has no direction."
What are direction angles and direction cosines?
The direction angles α, β and γ are the angles between the vector and the x, y and z axes, found as arccos of each component divided by the magnitude. (1, 2, 2) makes angles of 70.53°, 48.19° and 48.19°. The cosines are the unit vector’s components, and their squares add up to 1, which the page shows as a check.
Is the magnitude of a vector the same as its L2 norm?
Yes. The L2 norm, the Euclidean norm and the length of a vector all mean √(x² + y² + z²). It is also the distance from the origin to the point (x, y, z): the point (1, 1, 1) is 1.7321 from the origin.
Can a component be very large or very small?
Yes. (1e-200, 0, 0) has a magnitude of 1.0000 × 10^-200 and a unit vector of (1.0000, 0.0000, 0.0000), and (1e200, 1e200, 0) has a magnitude of 1.4142 × 10^200. The length is found with Math.hypot, which does not overflow when the components are squared. Only a magnitude beyond about 1.8 × 10^308 is refused.

Related Tools

View all tools