Norm
Details and Options
- An empty template
can be entered as
norm
, and
can be entered as
norm2
. » - Norm[expr] formats as
, and Norm[expr,p] formats as
. » - For complex numbers, Norm[z] is Abs[z].
- For vectors, Norm[v] is Sqrt[v.Conjugate[v]]. »
- For vectors, Norm[v,p] is Total[Abs[v]p](1/p) for
. - For vectors, Norm[v,Infinity] is the
‐norm given by Max[Abs[v]]. » - For matrices, Norm[m] gives the spectral or operator norm, which is the maximum singular value of m. »
- Norm specifications for matrices include:
-
1 induced
-norm, operator
-norm2 spectral norm, operator norm Infinity induced
-norm, operator
-norm"Frobenius" Frobenius or Hilbert–Schmidt norm - The
-norm of a matrix is the maximum
-norm of its columns, whereas the
-norm of the matrix is the maximum
-norm of its rows. » - The Frobenius norm computes the
-norm of a vector formed from the entries of the matrix m, i.e Norm[Flatten[m]]. » - Norm can be used on SparseArray and structured array objects. »
Examples
open all close allBasic Examples (3)
Scope (16)
Vectors (7)
The norm of a symbolic vector:
Norm[{1, 2 + x, y}]Simplify, assuming the entries are real:
Simplify[%, {x, y}∈Reals]Norm of a complex-valued vector:
Norm[{1 + I, 2 - 3I, 4}]Norm[{x, y, z}, p]Norm[{-10, 0, 5}, Infinity]Compute a norm using noninteger
:
Norm[{1, 2, 3}, 1.5]v = {1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1};Use exact arithmetic to compute the norm:
Norm[v]Use approximate machine-number arithmetic:
Norm[N[v]]Use 35-digit precision arithmetic:
Norm[N[v, 35]]The norm of a structured vector:
Norm[QuantityArray[{3, 4, 5 }, "Meters"]]The
-norm of a sparse vector in dimension 20:
Norm[SparseArray[{1 -> 5, 10 -> 500}, {20}], ∞]Matrices (6)
Norm of a matrix, equal to the largest singular value:
Norm[{{2, 1.5}, {3, 5}}]SingularValueList[{{2, 1.5}, {3, 5}}]Symbolic matrix norm for a real parameter
:
Refine[Norm[{{1, x}, {3, 4}}], x∈Reals]When the norm is computed without the assumption of reality, the result is much more complicated:
LeafCount /@ {%, Norm[{{1, x}, {3, 4}}]}The
-norm of a matrix is the maximum
-norm of the columns of the matrix:
Norm[(| | | |
| - | - | - |
| a | b | c |
| d | e | f |
| g | h | i |), 1]The
-norm of a matrix is the maximum
-norm of the rows of the matrix:
Norm[(| | | |
| - | - | - |
| a | b | c |
| d | e | f |
| g | h | i |), Infinity]The Frobenius norm for matrices:
Norm[(| | |
| - | - |
| a | b |
| c | d |), "Frobenius"]id = IdentityMatrix[10 ^ 5]Norm[id]All three induced norms of the identity matrix coincide:
Norm[id] == Norm[id, 1] == Norm[id, ∞]The Frobenius norm is distinct, equaling the square root of the dimension:
Norm[id, "Frobenius"]The spectral norm of a tridiagonal matrix represented as a SparseArray object:
s = SparseArray[{{i_, i_} -> -2, {i_, j_} /; Abs[i - j] == 1 -> 1}, {50, 50}]Norm[s]Formatting (3)
Type
norm
to create the template
, then type in a vector to compute its norm:
{1, 2, 3}Type
norm2
to insert the template
; press
to move between positions:
Norm[{1, 2, 3}, 1]Norm[v]Norm[v, 2]The Frobenius norm has dedicated formatting:
Norm[x, "Frobenius"]Applications (3)
Estimate the mean distance from the origin to random points in the unit square:
pts = RandomReal[1, {10 ^ 3, 2}];ListPlot[pts]Mean[Map[Norm, pts]]Compare to the asymptotic result:
NIntegrate[Sqrt[x ^ 2 + y ^ 2], {x, 0, 1}, {y, 0, 1}]Solve an ill-conditioned linear system
with a known solution:
m = N[HilbertMatrix[20]];
b = m.Range[20];
x = LinearSolve[m, b]Norm[m.x - b]Get the norm of the actual error:
Norm[x - Range[20]]Approximate the solution of
using
spatial points and
time steps:
f0[x_] := Exp[-(10( x - 1 / 2)) ^ 2];
α = 0.1;
heat[n_, k_] := Module[{u, m, dt = 1 / k},
m = SparseArray[{{i_, i_} -> -2.dt n ^ 2, {i_, j_} /; Abs[i - j] == 1 -> 1.dt n ^ 2}, {n - 1, n - 1}, 0.];
minv = LinearSolve[SparseArray[{i_, i_} -> 1., {n - 1, n - 1}] - α m];
xgrid = N[Range[n - 1] / n];
u = f0[xgrid];
Do[u = minv[u], {k}] ;
u]Find two solutions with fixed
where the second has twice as many time steps:
u1 = heat[100, 10];
u2 = heat[100, 20];Estimate the error by the norm of the difference:
Norm[u1 - u2]Extrapolate to a better solution from the first-order convergence of the backward Euler method:
u3 = 2 u2 - u1;ListPlot[Transpose[{xgrid, u3}]]Compute a more accurate solution with NDSolve:
sol = First[u /. NDSolve[{D[u[t, x], t] == α D[u[t, x], x, x], u[0, x] == Exp[-(10( x - 1 / 2)) ^ 2], u[t, 0] == u[t, 1] == 0}, u, {t, 0, 1}, {x, 0, 1}]]Compare the errors in the three solutions:
und = sol[1, xgrid];{Norm[u1 - und], Norm[u2 - und], Norm[u3 - und]}Properties & Relations (7)
The norm is always non-negative:
FullSimplify[Norm[x] >= 0]The norm of v is equal to the square root of the Dot product
:
v = RandomComplex[1 + I, {3}];Norm[v] == Sqrt[v. Conjugate[v]]For vectors, the default norm is the 2-norm:
With[{v = RandomReal[1, 10]}, Norm[v] === Norm[v, 2]]This is also true for matrices:
With[{m = RandomReal[1, {19, 19}]}, Norm[m] === Norm[m, 2]]v = RandomReal[1, {100}];LogLinearPlot[Norm[v, p], {p, 1, 100}, PlotRange -> All]The limiting value is the
-norm, equal to Max[Abs[v]]:
Underscript[, p -> ∞]Norm[v, p] == Norm[v, ∞] == Max[Abs[v]]The matrix
-norm is the maximum
-norm of m.v for all unit vectors v:
m = RandomReal[9, {3, 3}];Block[{v = {x, y, z}}, Maximize[{Norm[m.v], Norm[v] == 1}, v]]Norm[m]This is also equal to the largest singular value of
:
SingularValueList[m, 1]The Frobenius norm is the same as the norm of the vector made from the entries of the matrix:
m = RandomReal[1, {9, 10}];Norm[m, "Frobenius"]Norm[Flatten[m]]For a matrix m, Norm[m,Infinity] can be computed as Max[Total/@Abs/@m]:
With[{m = RandomReal[1, {10, 10}]}, Norm[m, ∞] == Max[Total /@ Abs /@ m]]This is equivalent to computing the
-norm of the rows and taking the maximum:
With[{m = RandomReal[1, {10, 10}]}, Norm[m, ∞] == Max[Norm[#, 1]& /@ m]]Norm[m,1] can be computed as Max[Total/@Abs/@Transpose[m]]:
With[{m = RandomReal[1, {10, 10}]}, Norm[m, 1] == Max[Total /@ Abs /@ Transpose[m]]]This is equivalent to computing the
-norm of the columns and taking the maximum:
With[{m = RandomReal[1, {10, 10}]}, Norm[m, 1] == Max[Norm[#, 1]& /@ Transpose[m]]]Possible Issues (2)
It is expensive to compute the
-norm for large matrices:
m = RandomReal[1, {1000, 1000}];Timing[Norm[m]]If you need only an estimate, the
-norm and
-norm are very fast:
Timing[{Norm[m, 1], Norm[m, ∞]}]Norms of general vectors contain Abs:
Norm[{x, y, z}]Use Simplify and FullSimplify to get simpler answers assuming real parameters:
Simplify[%, {x, y, z}∈Reals]Neat Examples (2)
Unit balls for using 1, 2, 3, and
norms:
Table[RegionPlot[Norm[{x, y}, p] ≤ 1, {x, -1.5, 1.5}, {y, -1.5, 1.5}, FrameTicks -> None], {p, {1, 2, 3, Infinity}}]Table[Plot3D[Norm[{x, y}, p], {x, -1.5, 1.5}, {y, -1.5, 1.5}, Mesh -> None, Ticks -> None], {p, {1, 2, 3, Infinity}}]See Also
Normalize RealAbs Abs EuclideanDistance Dot Total RootMeanSquare ContraharmonicMean SingularValueList Integrate DistanceMatrix
Function Repository: MatrixNorm LogarithmicNorm
Tech Notes
History
Introduced in 2003 (5.0) | Updated in 2025 (14.3)
Text
Wolfram Research (2003), Norm, Wolfram Language function, https://reference.wolfram.com/language/ref/Norm.html (updated 2025).
CMS
Wolfram Language. 2003. "Norm." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/Norm.html.
APA
Wolfram Language. (2003). Norm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Norm.html
BibTeX
@misc{reference.wolfram_2026_norm, author="Wolfram Research", title="{Norm}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/Norm.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_norm, organization={Wolfram Research}, title={Norm}, year={2025}, url={https://reference.wolfram.com/language/ref/Norm.html}, note=[Accessed: 12-June-2026]}