entrywise.norm: Compute the entrywise norm of a matrix

View source: R/entrywise.norm.R

entrywise.normR Documentation

Compute the entrywise norm of a matrix

Description

This function returns the ≤ft\| {\bf{x}} \right\|_p norm of the matrix {\mathbf{x}}.

Usage

entrywise.norm(x,p)

Arguments

x

a numeric vector or matrix

p

a real value for the power

Details

Let {\bf{x}} be an m \times n numeric matrix. The formula used to compute the norm is ≤ft\| {\bf{x}} \right\|_p = ≤ft( {∑\limits_{i = 1}^m {∑\limits_{j = 1}^n {≤ft| {x_{i,j} } \right|^p } } } \right)^{{1 \mathord{≤ft/ {\vphantom {1 p}} \right. } p}}.

Value

A numeric value.

Note

If argument x is not numeric, the function displays an error message and terminates. If argument x is neither a matrix nor a vector, the function displays an error message and terminates. If argument p is zero, the function displays an error message and terminates.

Author(s)

Frederick Novomestky fnovomes@poly.edu

References

Bellman, R. (1987). Matrix Analysis, Second edition, Classics in Applied Mathematics, Society for Industrial and Applied Mathematics.

Golub, G. H. and C. F. Van Loan (1996). Matrix Computations, Third Edition, The John Hopkins University Press.

Horn, R. A. and C. R. Johnson (1985). Matrix Analysis, Cambridge University Press.

See Also

one.norm, inf.norm

Examples

A <- matrix( c( 3, 5, 7, 2, 6, 4, 0, 2, 8 ), nrow=3, ncol=3, byrow=TRUE )
print( entrywise.norm( A, 2 ) )

matrixcalc documentation built on Sept. 15, 2022, 1:05 a.m.