Compute the Euclidean norm (length), unit vector, and direction angles for 2D or 3D vectors. Visualize the vector in the XY‑plane with scalable axes.
In mathematics, physics, and engineering, the magnitude (or length) of a vector is a fundamental measure of its size. For a vector v = (vx, vy, vz), its Euclidean norm is defined as ‖v‖ = √(vx² + vy² + vz²). This quantity represents the straight-line distance from the origin to the point (vx, vy, vz) in Cartesian space. The concept traces back to Pythagoras in 2D and was generalized by Euclid and later by Hermann Grassmann and Bernhard Riemann, forming a cornerstone of metric spaces and linear algebra.
‖v‖ = √(vx² + vy² + vz²)
The unit vector is obtained by dividing each component by the magnitude: û = v / ‖v‖ (provided ‖v‖ ≠ 0).
Given any vector v = (vx, vy, vz), the Euclidean norm is computed by squaring each component, summing them, and taking the square root. The unit vector points in the same direction but has length 1: û = (vx/‖v‖, vy/‖v‖, vz/‖v‖). Direction cosines (α, β, γ) are the cosines of the angles between the vector and each positive axis: cos α = vx/‖v‖, cos β = vy/‖v‖, cos γ = vz/‖v‖. The angles in degrees are arccos of these ratios. For the 2D polar angle θ, we compute atan2(vy, vx) in radians and convert to degrees.
Our calculator handles both 2D and 3D vectors gracefully. If the vector is zero, the unit vector is undefined, and a warning is shown — we follow standard mathematical conventions.
| Vector (x, y, z) | Magnitude ‖v‖ | Unit Vector (û) | Direction Angles (α, β, γ) | Type |
|---|---|---|---|---|
| (3, 4, 0) | 5.0000 | (0.6000, 0.8000, 0) | 53.13°, 36.87°, 90° | 2D right triangle |
| (1, 2, 2) | 3.0000 | (0.3333, 0.6667, 0.6667) | 70.53°, 48.19°, 48.19° | 3D classic |
| (0, 5, 0) | 5.0000 | (0, 1, 0) | 90°, 0°, 90° | Vertical |
| (-2, 3, 0) | 3.6056 | (-0.5547, 0.8321, 0) | 123.69°, 33.69°, 90° | 2D quadrant II |
| (3, 4, 5) | 7.0711 | (0.4243, 0.5657, 0.7071) | 64.90°, 55.55°, 45.00° | 3D orthonormal |
In structural engineering, a force vector F = (400 N, 300 N, 200 N) is applied to a node. The magnitude ‖F‖ = √(400²+300²+200²) = 538.52 N gives the total resultant force. Unit vector û = (0.743, 0.557, 0.371) shows the force direction. Direction angles help align bracing elements. Our calculator instantly provides these values, reducing manual errors and aiding iterative design.
While the Euclidean norm (L2) is most common, other norms like L1 (Manhattan distance) or L∞ (max norm) appear in optimization and data science. The L2 norm is unique because it is derived from an inner product and satisfies the parallelogram law. This norm is invariant under orthogonal transformations (rotations), making it fundamental in geometry and quantum mechanics. Our calculator focuses on the L2 norm — the natural geometric length.