Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Matrices and Linear Algebra > Matrix-Based Minimization >

Norm

Norm[expr]
gives the norm of a number, vector or matrix.
Norm[expr, p]
gives the p-norm.
  • For complex numbers, Norm[z] is Abs[z].
  • For matrices, Norm[m] gives the maximum singular value of m.  »
  • Norm[m, "Frobenius"] gives the Frobenius norm of m. »
Norm of a vector:
Norm of a complex number:
v is a vector of integers:
Use exact arithmetic to compute the norm:
Use approximate machine-number arithmetic:
Use 35-digit precision arithmetic:
s is a SparseArray representation of v:
The norm is always real even when the input is complex:
TraditionalForm formatting:
The p-norm:
The Infinity-norm:
Norm of a matrix, equal to the largest singular value:
The 1-norm and Infinity-norm, respectively, for matrices:
The Frobenius norm for matrices:
Symbolic matrix norms for a real parameter x:
Estimate the mean distance from the origin to random points in the unit square:
Compare to the asymptotic result:
Solve an ill-conditioned linear system m.x=b with a known solution:
Get the norm of the residual:
Get the norm of the actual error:
Approximate the solution of using n spatial points and k time steps:
Find two solutions with fixed n where the second has twice as many time steps:
Estimate the error by the norm of the difference:
Extrapolate to a better solution from the first-order convergence of the backward Euler method:
Compute a more accurate solution with NDSolve:
Compare the errors in the three solutions:
The norm of v is equal to the square root of the Dot product v.v^:
||v||_p is a decreasing function of p:
The horizontal asymptote is the Infinity-norm, equal to Max[Abs[v]]:
The matrix 2-norm is the maximum 2-norm of m.v for all unit vectors v:
This is also equal to the largest singular value of r:
The Frobenius norm is the same as the norm made up of the vector of the elements:
It is expensive to compute the 2-norm for large matrices:
If you need only an estimate, the 1- or Infinity-norms are very fast:
Unit balls for using 1, 2, 3 and infty norms:
Different norm functions:
New in 5
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team