← LibraryThe Norm of a Vector | KEVOS® MathematicsProject Delivery · Project ManagementLesson 169/189← PrevNext →
ArticlePublished 8 Aug 202621 min readBy Kevin Jogin
Skip to content

Engineering/Mathematics/Vectors

The Norm of a Vector

The norm u is the single non-negative number that measures the size of a vector, defined from the moduli of its entries so that it works over m exactly as length works in the plane. It is the square root of the inner product of a vector with itself, and that one identity is what ties geometry to algebra for the rest of the subject.

  • Core level
  • Stream: orthogonality
  • Reading time 13 min
  • Ref KVS-ENG-MATH-0031
Taxonomy
Engineering / Mathematics
Prerequisite
Inner product; modulus of a complex number
Value
A real scalar, always 0
Key identity
u2=u,u
Zero only for
The zero vector 0
Cost
m multiplications, m1 additions, one square root

Overview

Every quantitative statement about approximation, convergence, error or stability needs a way to say how big a vector is. The norm supplies it. For a vector with m entries the norm is the square root of the sum of the squared moduli of those entries, which in 2 and 3 reproduces the Pythagorean length of an arrow and in m extends that idea without modification to complex data.

Using the modulus rather than the entry itself is the whole trick. A complex entry such as 3+4i has no meaningful sign, and squaring it directly would produce 7+24i — a complex number that cannot be compared with zero. Squaring its modulus gives 25, a real non-negative contribution. Summing those contributions gives a real total that is zero only when every entry vanishes, so the norm can be relied upon to distinguish a vector from the zero vector.

The norm is not an independent construction bolted on beside the inner product; it is derived from it. The identity u2=u,u says that the inner product already contains the notion of length, and the positive-definiteness of the inner product is exactly what makes the square root well defined. This is why orthogonality, projection, least squares and the Gram-Schmidt procedure all work with the same single algebraic object.

In engineering practice the norm appears in three distinct roles. It is a magnitude: the total root-mean-square amplitude of a signal or a set of phasors. It is a metric: the distance uv between a measurement and a model, which is the quantity least squares minimises. And it is a scaling device: dividing a vector by its norm produces a unit vector that carries direction alone, which is the standard first step in normalising a basis, a search direction or a modal shape.

Definition

Norm of a Vector

NV

For um, the norm of u is the non-negative real scalar

  • u=|[u]1|2+|[u]2|2++|[u]m|2
equivalently u=i=1m|[u]i|2, where |c| denotes the modulus of the complex number c.

When every entry is real the modulus is the absolute value, the squares are ordinary squares, and the formula collapses to the Pythagorean length familiar from geometry.

Unit Vector

UV

A vector whose norm equals 1. Any non-zero u is converted to a unit vector by normalisation: form u^=1uu. The result points in the same direction as u and carries no magnitude information.

Distance Between Vectors

DBV

The distance between u and v in m is uv. This function is symmetric, is zero exactly when u=v, and satisfies the triangle inequality, so m equipped with it is a metric space and every notion of convergence and approximation is available.

Concepts

The norm is the inner product in disguise

Expanding u,u with the definition of the inner product gives i[u]i[u]i¯, and the product of a complex number with its own conjugate is precisely the square of its modulus. So u,u=i|[u]i|2=u2. The consequence is practical as well as conceptual: any expression involving u2 can be manipulated with the bilinearity rules of the inner product without ever meeting a square root, which is why almost every proof about lengths is carried out on squared norms.

Positive definiteness and why it is not automatic

The statement u,u0, with equality if and only if u=0, is called positive definiteness. It follows because the sum consists of squared moduli, each of which is a non-negative real number; a sum of non-negative reals is zero only when every term is zero, and a complex number of zero modulus is itself zero. Drop the conjugate from the definition of the inner product and this property is destroyed immediately — the vector [1i] would then satisfy 12+i2=0 and pass as a zero-length non-zero vector.

Absolute homogeneity, not linearity

Scaling a vector scales its norm by the modulus of the scalar: αu=|α|u. The proof is a one-line consequence of the multiplicativity of the modulus. Note carefully that the norm is not a linear function — it cannot be, since it is always non-negative. Multiplying a vector by 1 or by i leaves its norm unchanged, which is the algebraic expression of the fact that a norm records magnitude and discards phase and sign entirely.

The triangle inequality and Cauchy-Schwarz

Two inequalities do most of the analytical work. The Cauchy-Schwarz inequality states |u,v|uv, with equality exactly when the two vectors are scalar multiples of one another. The triangle inequality u+vu+v follows from it by expanding u+v2 as an inner product. Together they guarantee that the norm behaves like a length: no route through an intermediate point is shorter than the direct one, and correlations between vectors are bounded by their magnitudes.

Normalisation and what it costs

Dividing by the norm produces a unit vector, which is the standard way to strip magnitude from direction. The operation is cheap but not free: it introduces a division and a square root, both of which lose accuracy relative to the multiply-add operations around them, and it fails outright on the zero vector. Production code normalises only when the direction is genuinely what is wanted; algorithms such as the power method and Gram-Schmidt normalise every iteration precisely to stop magnitudes drifting towards overflow or underflow.

One norm among many

This page defines the Euclidean or 2-norm, the only one induced by an inner product. Other norms are in routine use — the 1-norm (sum of moduli), the infinity norm (largest modulus), and weighted variants — and all of them satisfy the same three axioms of non-negativity, absolute homogeneity and the triangle inequality. What singles out the 2-norm is that it alone comes with orthogonality, projection and the Pythagorean identity, so all of the geometry in this library is written in terms of it. In finite dimensions the norms are equivalent, meaning each bounds a constant multiple of the others, so convergence statements do not depend on the choice.

Procedure: computing a norm without losing accuracy

Scan for the largest modulusFind s=maxi|[u]i| in one pass. If s=0 the vector is zero and the norm is 0; return immediately.
Scale the entriesDivide every entry by s. All scaled moduli now lie in [0,1], so no square can overflow and the largest is exactly 1.
Accumulate the squaresSum the squared scaled moduli. The total lies between 1 and m, safely inside the exponent range of any floating-point format.
Take the root and rescaleReturn ssum. This is the algorithm behind the BLAS routine xNRM2, and it is why calling the library beats writing the textbook formula.
Normalise only if direction is wantedIf a unit vector is required, divide by the norm just computed. Guard against a norm of zero rather than relying on the exception behaviour of division.

Equations

Definition of the norm

EQ-NV-01
u=i=1m|[u]i|2

The moduli are squared, not the entries themselves. This is what keeps the sum real and non-negative for complex data.

Norm from the inner product

EQ-NV-02
u2=u,u,u=u,u

The bridge between the algebra of the inner product and the geometry of length. Every subsequent identity on this page is derived from it.

Positive definiteness

EQ-NV-03
u,u0andu,u=0u=0

A sum of squared moduli vanishes only when every term does. This is the property that makes the square root well defined and the norm a genuine measure of size.

Absolute homogeneity

EQ-NV-04
αu=|α|u,α

The modulus of the scalar, not the scalar. Multiplication by any unit-modulus factor such as 1 or i leaves the norm unchanged.

Normalisation to unit length

EQ-NV-05
u^=1uu,u^=1(u0)

Direction without magnitude. Undefined for the zero vector, which is the one input every implementation must guard.

Cauchy-Schwarz inequality

EQ-NV-06
|u,v|uv

Equality holds exactly when one vector is a scalar multiple of the other. Dividing through defines the correlation coefficient used throughout statistics and signal processing.

Triangle inequality and distance

EQ-NV-07
u+vu+v,d(u,v)=uv

The inequality makes uv a metric, which is what licenses talk of convergence, tolerance and approximation error.

Variable Definitions

Symbols used on this page
SymbolNameMeaningDomain / type
uVectorThe vector whose size is being measuredelement of C^m
mSizeNumber of entries in the vectorpositive integer
[u]iEntryThe i-th component of ucomplex scalar
|c|ModulusDistance of the complex number c from the originnon-negative real
uNormEuclidean length of the vectornon-negative real
u,vInner productSesquilinear form whose diagonal values give squared normscomplex scalar
αScalarMultiplier applied to a vectorelement of C
u^Unit vectorNormalised version of u, of norm oneelement of C^m
sScaling factorLargest entry modulus, used to prevent overflow during accumulationnon-negative real

Worked Numerical Example

Problem statement

Three parallel branches of a single-phase distribution board carry root-mean-square current phasors 3+4i, 5+12i and 86i amperes. Each branch has the same resistance R. Compute the norm of the current vector, use it to obtain the total dissipated power, and normalise the vector to a unit direction for use as a load-shape signature.

  1. Assemble the phasor vector

    Collect the three branch currents into a single vector in 3. Complex entries are unavoidable here: the real part is the in-phase component and the imaginary part the quadrature component, so no ordering or sign convention can replace them.

    I=[3+4i5+12i86i]
  2. Square the modulus of each entry

    The modulus of a+bi is a2+b2, so its square is simply a2+b2 and no square root is needed at this stage. Working with squared moduli avoids introducing rounding error before the summation.

    |3+4i|2=25,|5+12i|2=169,|86i|2=100
  3. Sum and take the root

    Adding the three contributions gives 25+169+100=294. Since 294=49×6, the square root simplifies exactly.

    I=294=7617.146A
  4. Cross-check against the inner product

    The identity I2=I,I gives an independent route to the same number. Each term is an entry multiplied by its own conjugate, for example (3+4i)(34i)=9+16=25, and the three products again total 294. Agreement confirms both the arithmetic and the sign conventions.

  5. Convert to a physical quantity

    With equal branch resistance R, the total average power dissipated is P=R(|I1|2+|I2|2+|I3|2)=RI2. The squared norm is the physically meaningful quantity; the norm itself is its root-mean-square scaling.

    P=RI2=294RW
  6. Normalise to a direction

    Dividing each entry by 76 produces a unit vector recording only how the current is distributed between branches, independent of total loading. Two boards operating at different total currents but with the same unit vector have identical load balance.

    I^=176[3+4i5+12i86i],I^=1
  7. Interpret an imbalance measure

    If the balanced reference vector for this board is r, also normalised, then I^r is a single scalar imbalance index in the range [0,2]. The triangle inequality guarantees it behaves sensibly under composition, which is what makes it usable as an alarm threshold.

Result

The current vector has norm 7617.15A and squared norm 294A^2, so the board dissipates 294R watts. The normalised vector separates the question of how much current flows from how it is shared, and the distance between normalised vectors gives a directly comparable imbalance metric across boards of different rating.

Applications & Industry Use

Electrical power engineering

Root-mean-square magnitude of phasor sets

Bus voltage and branch current phasors are complex vectors. Their squared norms are proportional to stored energy and dissipated power, so norm-based indices are used for loading, imbalance and harmonic distortion without ever converting back to the time domain.

Structural engineering

Modal normalisation and participation

Mode shapes from an eigenvalue extraction are determined only up to a scalar. Normalising each shape to unit norm, or to unit mass-weighted norm, makes participation factors and modal masses comparable between modes and between analysis runs.

Control systems

Convergence and stopping criteria

Iterative solvers, state estimators and optimisers terminate on a norm: the residual Axb or the step size xk+1xk falling below a tolerance. Because the norm collapses a whole vector to one number, it can be compared with a threshold, logged and alarmed.

Machine learning

Regularisation and feature scaling

Ridge regression penalises the squared norm of the parameter vector, shrinking coefficients towards zero and stabilising ill-conditioned fits. Separately, normalising feature vectors to unit norm makes the inner product between them a pure cosine similarity that ignores document or record length.

Robotics and navigation

Distance, error and unit direction

Position error is the norm of the difference between commanded and measured pose vectors. Direction of travel is obtained by normalising a velocity vector, which separates the heading command from the speed command in a control law.

Signal processing

Signal energy and matched filtering

The squared norm of a sampled signal vector is its energy, by Parseval's relation equal to the energy of its spectrum. Matched filtering correlates against a unit-norm template so that the detection statistic depends on waveform shape rather than on template amplitude.

Design Considerations

Work with the squared norm wherever possible

Comparisons, minimisations and thresholds can almost always be restated in terms of u2. Doing so removes a square root from the inner loop, keeps the expression polynomial so it can be differentiated cleanly, and avoids the accuracy loss of a root near zero. Take the square root only when a human-readable magnitude is the output.

Never compute the norm from the naive formula on real data

Squaring entries can overflow when the largest modulus exceeds about 10154 in binary64, and can underflow to zero when it falls below about 10154. Both produce a silently wrong answer from perfectly representable input. Use a scaled accumulation, hypot for two entries, or the library routine that already implements it.

Decide whether the norm should be weighted

The plain Euclidean norm treats every entry as equally important, which is wrong whenever the entries carry different units or different uncertainties. A weighted norm uWu with a positive-definite W — typically an inverse covariance or a mass matrix — is the correct instrument, and it retains every property on this page.

Guard normalisation against the zero vector

Normalising is undefined at 0 and numerically hazardous nearby, where the direction is dominated by rounding error rather than data. Test the norm against a tolerance scaled to the problem, and define explicitly what the algorithm does when a direction is requested from a vanishing vector.

State the norm you mean

Reporting that an error is "below 106" is meaningless without saying which norm and whether it is absolute or relative. A relative residual Axb/b is dimensionless and scale-invariant; an absolute residual is neither. Fix the convention once and record it alongside the tolerance.

Beware of dimension when interpreting magnitude

The norm of a vector of m independent unit-variance samples grows like m. A threshold tuned on a 10-dimensional problem will fire constantly at dimension 1000. Normalise by m to obtain a root-mean-square value when comparing across different vector lengths.

Standards & Codes

Notation, interchange and numerical standards that govern how this material is written down, stored and computed in production systems.

Applicable standards, conventions and reference implementations
ReferenceTitleRelevance to this topic
ISO 80000-2Quantities and units — Part 2: MathematicsFixes the double-bar notation for a norm and the single-bar || for absolute value and modulus, a distinction that this page relies on throughout and that is frequently blurred in software documentation.
IEEE 754-2019IEEE Standard for Floating-Point ArithmeticDefines the finite exponent range that makes naive squaring unsafe, and specifies the correctly rounded sqrt and the hypot operation recommended for two-argument magnitude computation.
BLAS Level 1Basic Linear Algebra Subprograms, vector operationsThe reference norm routines SNRM2, DNRM2, SCNRM2 and DZNRM2 implement the scaled accumulation described here, and xSCAL performs the normalising multiplication.
IEC 61869 / IEC 61000-4-30Instrument transformers and power quality measurement methodsPower-quality quantities such as total harmonic distortion and unbalance factors are defined as ratios of norms of harmonic or sequence-component vectors, which is the applied form of this page's definition.
ISO/IEC 40314Mathematical Markup Language (MathML) Version 3.0Encodes the norm and modulus delimiters on this page as semantic markup, so the distinction between and || survives into assistive technology and search indexing.

Material Selection

For a mathematical topic, "material" is the numeric representation: the scalar field, storage format and precision the computation is built from.

Representation and precision selection
RepresentationSelect whenTrade-off
IEEE 754 binary64 with scaled accumulationGeneral numerical work where entry magnitudes are not known in advance.The default correct choice; the scaling pass costs one extra sweep over the data but removes all overflow and underflow risk.
IEEE 754 binary32Large signal or image data where memory bandwidth dominates and only three significant digits of magnitude are required.Halves storage and traffic, but the narrower exponent range makes unscaled squaring overflow above roughly 1019, so scaling becomes mandatory rather than merely prudent.
Exact rational arithmetic on the squared normSymbolic verification of orthogonality or independence, where the answer must be exactly zero or exactly non-zero.Keeps u2 exact and decidable, but the norm itself is generally irrational, so the square root must be left in surd form or approximated at the end.
Fixed-point with a guard-bit budgetEmbedded DSP and motor-control targets without a floating-point unit.Deterministic timing and small silicon area, but the accumulator must carry enough guard bits for m squared terms, and the square root needs a dedicated CORDIC or Newton routine.
Squared norm only, no square rootNearest-neighbour search, thresholding, and any comparison of magnitudes.Removes the most expensive operation entirely and is exact for comparison purposes, but the retained quantity has squared units and must be labelled as such to avoid misreporting.
Complex versus real storagePhasor, spectral and quantum data where entries are genuinely complex.A complex vector of size m costs the same as a real vector of size 2m for norm purposes, since |a+bi|2=a2+b2; splitting into real and imaginary arrays gives identical norms and often better vectorisation.

Manufacturing Notes

Implementation notes — how the result is actually produced by hand, by algorithm and by library, including cost and numerical behaviour.

Operation count

A real norm requires m multiplications, m1 additions and one square root, so it is a strictly O(m) operation dominated by memory traffic rather than arithmetic. A complex norm doubles the multiplications. The scaled algorithm adds one comparison pass and one division pass, which is usually invisible against the cost of fetching the vector from memory.

The scaled algorithm in detail

Let s be the largest entry modulus. Compute i(|[u]i|/s)2, which lies between 1 and m, then multiply the square root of that sum by s. Since every scaled term is at most 1, no intermediate can overflow, and since the largest is exactly 1, no information is lost to underflow. A one-pass variant that rescales on the fly is what DNRM2 actually implements.

Library behaviour

numpy.linalg.norm defaults to the 2-norm for vectors and to the Frobenius norm for matrices — a genuine trap, since the induced 2-norm of a matrix is the largest singular value, not the Frobenius norm. MATLAB's norm defaults to the induced 2-norm for matrices instead. Always pass the order argument explicitly rather than relying on the default.

Verification technique

Three cheap checks catch most errors. Confirm u2 against the inner product computed independently; confirm αu=|α|u for a complex α such as i, which will expose a missing conjugate; and confirm that a normalised vector returns a norm of 1 to within a few units in the last place.

Accuracy of the accumulation

Summing m squared terms in the obvious order accumulates rounding error of order mε relative to the result, where ε is the unit roundoff. For very long vectors, pairwise or compensated summation reduces this to order εlogm or ε respectively, at negligible cost. Because all terms are non-negative there is no cancellation, so the norm is one of the better-conditioned computations in numerical linear algebra.

Failure Modes & Common Mistakes

Failure modes, root causes and prevention
Failure mode / mistakeImpactRoot causePrevention & detection
Squaring entries instead of modulihighWriting [u]i2 for complex data, which produces a complex number that may even be zero for a non-zero vector.Always form [u]i[u]i¯, or use the library complex norm routine which handles the conjugation internally.
Overflow or underflow in naive accumulationhighSquaring an entry of magnitude beyond roughly 10154 in binary64, or below 10154, before summing.Scale by the largest modulus first, or call xNRM2 / hypot rather than coding the textbook formula.
Normalising the zero vectorhighDividing by a norm of zero, or by a norm so small that the resulting direction is pure rounding noise.Test the norm against a tolerance scaled to the data before dividing, and define the algorithm's behaviour for the degenerate case explicitly.
Confusing the Frobenius and induced matrix normsmediumApplying a vector norm function to a matrix and accepting the default, which differs between libraries.Specify the order explicitly; remember that the induced 2-norm is the largest singular value, while the Frobenius norm is the vector norm of the flattened entries.
Comparing absolute residuals across problems of different scalemediumUsing Axb directly as a convergence test when b varies by orders of magnitude between cases.Normalise the residual by b or by Ax so the criterion is dimensionless and scale-invariant.
Treating the norm as linearmediumAssuming u+v=u+v, which holds only when the vectors are non-negative multiples of each other.Use the triangle inequality as an inequality; when an equality is needed, expand u+v2 via the inner product and keep the cross terms.
Mixing units within one vectormediumStacking quantities with different physical dimensions, so the sum of squares has no meaningful unit and the norm is dominated by whichever entry happens to be numerically largest.Non-dimensionalise each entry, or adopt a weighted norm with a diagonal weight matrix that restores comparability.
Assuming a small norm implies a small relative errorlowReading a small residual as evidence of an accurate solution in an ill-conditioned system.Bound the solution error by the residual multiplied by the condition number; report the condition estimate alongside any residual claim.

FAQs

Why does the definition use the modulus rather than the entry itself?

Because a complex number squared is still complex and cannot be compared with zero. Squaring the modulus gives a real non-negative contribution from every entry, so the total is a real number that is zero only for the zero vector. For real entries the modulus is the absolute value and squaring it is the same as squaring the entry, so nothing changes.

What is the relationship between the norm and the inner product?

They are two views of one object: u2=u,u. The inner product carries the extra information of relative orientation between two different vectors, while the norm is what remains when both arguments coincide. Because the inner product is positive definite, the square root always exists as a real number.

Is the norm of a vector always a real number even for complex vectors?

Yes, and always non-negative. Each term of the sum is a squared modulus, which is real and non-negative by construction, so the total is a non-negative real and its square root is taken in the usual real sense. A complex-valued norm would be meaningless, since norms are compared with thresholds.

Why do numerical libraries not use the textbook formula directly?

Because squaring the entries can overflow or underflow long before the true norm approaches the limits of the format. A vector whose largest entry is 10200 has a perfectly representable norm, but its square is infinite in binary64. Library routines scale by the largest modulus first, which costs one extra pass and removes the failure entirely.

Can two different vectors have the same norm?

Certainly — infinitely many do. The set of vectors with norm 1 is a sphere, not a point. The norm captures magnitude only; all directional information is discarded, which is exactly why it is paired with the inner product when direction matters.

When should I use a weighted norm instead of the plain Euclidean one?

Whenever the entries are not interchangeable: different physical units, different measurement uncertainties, or different importance to the objective. Replacing u,u by uWu with a Hermitian positive-definite W keeps every property on this page while restoring comparability between entries.

Does the norm satisfy the Pythagorean theorem?

It does, but only for orthogonal vectors. Expanding u+v2 gives u2+v2 plus cross terms in u,v; those cross terms vanish precisely when the vectors are orthogonal, leaving the familiar identity.

References

  1. Beezer, R. A. A First Course in Linear Algebra, Version 0.70. University of Puget Sound, 2006. Section O, subsection N. Licensed under the GNU Free Documentation License v1.2.
  2. ISO 80000-2:2019, Quantities and units — Part 2: Mathematics. International Organization for Standardization.
  3. IEEE 754-2019, IEEE Standard for Floating-Point Arithmetic. Institute of Electrical and Electronics Engineers.
  4. Higham, N. J. Accuracy and Stability of Numerical Algorithms, 2nd edition. Society for Industrial and Applied Mathematics, 2002.
  5. Lawson, C. L., Hanson, R. J., Kincaid, D. R. and Krogh, F. T. Basic Linear Algebra Subprograms for Fortran Usage. ACM Transactions on Mathematical Software, 1979.
  6. Golub, G. H. and Van Loan, C. F. Matrix Computations, 4th edition. Johns Hopkins University Press, 2013.

AI Suggested Questions

  • Show me a binary64 vector whose true norm is finite but whose naive sum-of-squares overflows, and trace what the scaled algorithm does instead.
  • Derive the triangle inequality from the Cauchy-Schwarz inequality by expanding the squared norm of a sum.
  • How does the expected norm of a random vector with independent unit-variance entries grow with dimension, and what does that imply for fixed thresholds?
  • Compare the 1-norm, 2-norm and infinity norm of the same vector and explain which optimisation problems each one favours.
  • Why is the induced 2-norm of a matrix the largest singular value, while the Frobenius norm is the vector 2-norm of its entries?
  • Construct a weighted norm from a covariance matrix and show that it still satisfies absolute homogeneity and the triangle inequality.

Related Calculators

Continue learning

Algebraic and Geometric Multiplicities of Eigenvalues | KEVOS® MathematicsArticle · Project ManagementAmitsur’s Theorem on the Radical of a Polynomial Ring | KEVOS®Article · Project ManagementAmitsur’s Theorem on the Radical of an Algebra of Small Dimension | KEVOS®Article · Project ManagementArchetypes: Reference Catalogue of Worked Systems | KEVOS® MathematicsArticle · Project Management