MATLAB Functions Help Desk

norm

Purpose

Vector and matrix norms

Syntax

Description

The norm of a matrix is a scalar that gives some measure of the magnitude of the elements of the matrix. The norm function calculates several different types of matrix norms:

n = norm(A) returns the largest singular value of A, max(svd(A)).

n = norm(A,p) returns a different kind of norm, depending on the value of p:

If p is...

Then norm returns...

1

The 1-norm, or largest column sum of A, max(sum(abs((A))).

2

The largest singular value (same as norm(A)).

inf

The infinity norm, or largest row sum of A, max(sum(abs(A'))).

'fro'

The Frobenius-norm of matrix A, sqrt(sum(diag(A'*A))).

When A is a vector, slightly different rules apply:

norm(A,p)

Returns sum(abs(A).^p)^(1/p), for any .

norm(A)

Returns norm(A,2).

norm(A,inf)

Returns max(abs(A)).

norm(A,-inf)

Returns min(abs(A)).

Remarks

To obtain the root-mean-square (RMS) value, use norm(A)/sqrt(n).

Note that norm(A), where A is an n-element vector, is the length of A.

See Also

cond        Condition number with respect to inversion

normest     2-norm estimate

svd         Singular value decomposition



[ Previous | Help Desk | Next ]