LinearAlgebra
Norm
compute the p-norm of a Matrix or Vector
MatrixNorm
compute the p-norm of a Matrix
VectorNorm
compute the p-norm of a Vector
Calling Sequence
Parameters
Description
Examples
References
Norm(A, p, c)
MatrixNorm(A, p, c)
VectorNorm(A, p, c)
A
-
Matrix or Vector
p
(optional) non-negative number, infinity, -infinity, Euclidean, or Frobenius; norm selector that is dependent on A
c
(optional) equation of the form conjugate=true or false; specifies if the result in the 2-norm case for Matrices uses the Hermitian transpose or the result in the p-norm case for Vectors where p is even assumes that the entries of the Vector are real and avoids extra calls to abs.
The Norm(A) command computes the infinity norm of A. The Norm(A,p) command computes the p-norm of A.
If p or c is included in the calling sequence, their value and the resulting norm depends on whether A is a Vector or a Matrix.
By default, Norm(A) computes the infinity-norm for A.
Vector Norms
If V is a Vector and p is included in the calling sequence, p must be one of a non-negative number, infinity, -infinity, Frobenius, or Euclidean.
By default, VectorNorm(A) computes the infinity-norm for A.
The p-norm of a Vector V when 1≤p<∞ is add⁡Vip,i=1..Dimension⁡V1p.
The infinity-norm of Vector V is max⁡seq⁡Vi,i=1..Dimension⁡V.
The -infinity-norm of Vector V is min⁡seq⁡Vi,i=1..Dimension⁡V. Note that the -infinity norm is neither a norm nor a metric. The infinity norm returns the maximum absolute value, so by a convention used in some other programs, the same function, Norm, can be used to get the minimum absolute value.
Maple implements Vector norms for all 0≤p≤∞. For 0<p<1 the final pth root computation is not done ( i.e., the calculation is just add⁡Vip,i=1..Dimension⁡V. This defines a metric on R^n, but the pth root is not a norm and the form computed by VectorNorm in such cases is more useful. The limiting case of p = 0 returns the number of non-zero elements of V (this will be a floating-point number if p or any element of V is a floating-point number).
For Vectors, the 2-norm can also be specified as either Euclidean or Frobenius.
Matrix Norms
If A is a Matrix and p is included in the calling sequence, p must be one of 1, 2, infinity, Frobenius, or Euclidean.
By default, MatrixNorm(A) computes the infinity-norm for A.
The p-norm of a Matrix A is max⁡VectorNorm⁡A·V,p, where the maximum is taken over all Vectors V with VectorNorm⁡V,p=1. Maple only implements MatrixNorm(A, p) for p = 1, 2, infinity and the special case p = Frobenius (which is not actually a Matrix norm; the Matrix A is treated as a "folded up" Vector). These norms are defined as the following.
MatrixNorm⁡A,1=max⁡seq⁡VectorNorm⁡A1..−1,j,1,j=1..ColumnDimension⁡A
MatrixNorm⁡A,∞=max⁡seq⁡VectorNorm⁡Ai,1..−1,1,i=1..RowDimension⁡A
MatrixNorm⁡A,2=max⁡seq⁡Eigenvalues⁡A·HermitianTranspose⁡Ai,i=1..RowDimension⁡A
MatrixNorm⁡A,Frobenius=add⁡add⁡Ai,j2,j=1..ColumnDimension⁡A,i=1..RowDimension⁡A
For the 2-norm case of a Matrix, c may be included in the calling sequence to select between the transpose and the Hermitian transpose of A. The 2-norm case can also be specified by using Euclidean.
This function is part of the LinearAlgebra package, and so it can be used in the form Norm(..) only after executing the command with(LinearAlgebra). However, it can always be accessed through the long form of the command by using LinearAlgebra[Norm](..).
with⁡LinearAlgebra:
A≔1,−1,0|0,1,1|1,0,1
A≔101−110011
Norm⁡A,2
3
B≔10,0,0|0,9,12|2,4,1
B≔10020940121
MatrixNorm⁡B,1
10
h≔3|4
h≔34
VectorScalarMultiply⁡h,1VectorNorm⁡h,Euclidean
3545
VectorNorm⁡2,0,0.5
1.414213562
v≔a,b,c
v≔abc
VectorNorm⁡v,2,conjugate=false
a2+b2+c2
VectorNorm⁡v,2,conjugate=true
de Boor, Carl. "An Empty Exercise". ACM SIGNUM Newsletter, Vol. 25 No. 2. (1990): 2-6.
See Also
LinearAlgebra[DotProduct]
LinearAlgebra[Normalize]
Matrix
Vector
Download Help Document