Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

matrix-norm

Matrix Norm


Description

Returns the norm of a matrix.

Usage

norm2(x, p = 2)

Arguments

x

a numeric matrix.

p

an integer value, 1, 2 or Inf. p=1 - The maximum absolute column sum norm which is defined as the maximum of the sum of the absolute valued elements of columns of the matrix. p=2 - The spectral norm is "the norm" of a matrix X. This value is computed as the square root of the maximum eigenvalue of CX where C is the conjugate transpose. p=Inf - The maximum absolute row sum norm is defined as the maximum of the sum of the absolute valued elements of rows of the matrix.

Details

The function norm2 computes the norm of a matrix. Three choices are possible:

p=1 - The maximum absolute column sum norm which is defined as the maximum of the sum of the absolute valued elements of columns of the matrix.

p=2 - The spectral norm is "the norm" of a matrix X. This value is computed as the square root of the maximum eigenvalue of CX where C is the conjugate transpose.

p=Inf - The maximum absolute row sum norm is defined as the maximum of the sum of the absolute valued elements of rows of the matrix.

Note, the function fBasics::norm() has become obsolete, since base::norm() has become available in the R base environment. To avoid conflicts with norm() we have renamed in the fBasics package as norm2.

Value

returns the value of the norm of the matrix.

References

Golub, van Loan, (1996); Matrix Computations, 3rd edition. Johns Hopkins University Press.

Examples

## Create Pascal Matrix:
   P <- pascal(5)
   P                  
     
## Return the Norm of the Matrix:                      
   norm2(P)

fBasics

Rmetrics - Markets and Basic Statistics

v3042.89.1
GPL (>= 2)
Authors
Diethelm Wuertz [aut], Tobias Setz [cre], Yohan Chalabi [ctb] Martin Maechler [ctb]
Initial release
2017-11-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.