Linear Algebra

Vector Magnitude & Unit Vector

Compute ‖v‖ = √(v₁² + v₂² + ...) and the unit vector v̂ = v/‖v‖ for 2D and 3D vectors. Includes direction angle and verification that ‖v̂‖ = 1.

Inputs
Vector v

Visualization — v (blue) vs v̂ (gold) on unit circle

Step-by-Step Work