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
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) | Magnitude | Unit vector | Angles α, β, γ |
|---|---|---|---|
| 3, 4, 0 | 5.0000 | (0.6000, 0.8000, 0.0000) | 53.13°, 36.87°, 90.00° |
| 1, 2, 2 | 3.0000 | (0.3333, 0.6667, 0.6667) | 70.53°, 48.19°, 48.19° |
| 2, 3, 6 | 7.0000 | (0.2857, 0.4286, 0.8571) | 73.40°, 64.62°, 31.00° |
| 1, 1, 1 | 1.7321 | (0.5774, 0.5774, 0.5774) | 54.74°, 54.74°, 54.74° |
| -3, 4, 12 | 13.0000 | (-0.2308, 0.3077, 0.9231) | 103.34°, 72.08°, 22.62° |
| 2, -1, 2 | 3.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
- Type the x, y and z components. The fields open at (3, 4, 0).
- 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 toolsCross Product Calculator
Cross product A × B of two 3D or 2D vectors with the i, j, k working, the magnitude (parallelogram area), the dot product and a picture.
Triangle Calculator
Enter any three sides or angles of a triangle, at least one a side. Solves SSS, SAS, ASA, AAS and both SSA triangles, with area, perimeter and heights.
Percent Error Calculator
Percent error of a measured value against the true value, |measured − true| ÷ |true| × 100, signed if you want, or the percent difference of two values.
Arithmetic Sequence Calculator
Arithmetic sequence nth term aₙ = a₁ + (n − 1)d and sum Sₙ of the first n terms, with the first 20 terms listed and the position of any value.
Basic Calculator
Basic calculator for + − × ÷ in the standard order of operations (2 + 3 × 4 = 14), with % and memory keys, ^ for powers and the result as a fraction.
Decimal to Fraction
Convert a decimal to a fraction in lowest terms and see the working: 0.75 = 3/4, 2.75 = 11/4 or 2 3/4, and 0.333… (3 repeating) = 1/3.