norm | R Documentation |
Computes the norm of a matrix.
norm2(x, p = 2)
x |
a numeric matrix. |
p |
an integer value, |
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.
the requested norm of the matrix, a non-negative number
Since base::norm()
has become available in the R base
environment, the function fBasics::norm()
has become obsolete.
To avoid conflicts with norm()
we have renamed the fBasics' one
to norm2
.
Golub, van Loan, (1996); Matrix Computations, 3rd edition. Johns Hopkins University Press.
## Create Pascal Matrix:
P <- pascal(5)
P
## Return the Norm of the Matrix:
norm2(P)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.