norm

norm(x)

norm(x, p)

Try it yourself:


Measure vector or matrix size with norm

norm calculates a norm: a non-negative measure of vector length or matrix magnitude. The default commonly corresponds to Euclidean length for vectors.

Example

The norm of [3,4] is 5. Use hypot for component lengths directly, and distance for separation between points. Norms support normalization, error measurement, and convergence checks.

Choices and caveats

Different norm orders measure different properties, so state which norm a formula requires. For complex vectors, conjugation matters; see conj and ctranspose. Inputs should be numeric and dimensionally meaningful.

All functions