Matrix (version 1.2-8)

norm: Matrix Norms

Description

Computes a matrix norm of x, using Lapack for dense matrices. The norm can be the one norm, the infinity norm, the Frobenius norm, or the maximum modulus among elements of a matrix, as determined by the value of type.

Usage

norm(x, type, ...)

Arguments

x
a real or complex matrix.
type
A character indicating the type of norm desired.

The default is "O". Only the first character of type[1] is used.

...
further arguments passed to or from other methods.

Value

A numeric value of class "norm", representing the quantity chosen according to type.

Details

For dense matrices, the methods eventually call the Lapack functions dlange, dlansy, dlantr, zlange, zlansy, and zlantr.

References

Anderson, E., et al. (1994). LAPACK User's Guide, 2nd edition, SIAM, Philadelphia.

See Also

onenormest(), an approximate randomized estimate of the 1-norm condition number, efficient for large sparse matrices.

Examples

Run this code
x <- Hilbert(9)
norm(x, "1")
norm(x, "I")
norm(x, "F")
norm(x, "M")

Run the code above in your browser using DataCamp Workspace