normest: Estimated Matrix Norm

View source: R/normest.R

normestR Documentation

Estimated Matrix Norm

Description

Estimate the 2-norm of a real (or complex-valued) matrix. 2-norm is also the maximum absolute eigenvalue of M, computed here using the power method.

Usage

normest(M, maxiter = 100, tol = .Machine$double.eps^(1/2))

Arguments

M

Numeric matrix; vectors will be considered as column vectors.

maxiter

Maximum number of iterations allowed; default: 100.

tol

Tolerance used for stopping the iteration.

Details

Estimate the 2-norm of the matrix M, typically used for large or sparse matrices, where the cost of calculating the norm (A) is prohibitive and an approximation to the 2-norm is acceptable.

Theoretically, the 2-norm of a matrix M is defined as

||M||_2 = max \frac{||M*x||_2}{||x||_2} for all x \neq 0

where ||.||_2 is the Euclidean/Frobenius norm.

Value

2-norm of the matrix as a positive real number.

Note

If feasible, an accurate value of the 2-norm would simply be calculated as the maximum of the singular values (which are all positive):

max(svd(M)\$d)

References

Trefethen, L. N., and D. Bau III. (1997). Numerical Linear Algebra. SIAM, Philadelphia.

See Also

cond, svd

Examples

normest(magic(5)) == max(svd(magic(5))$d)  # TRUE
normest(magic(100))                        # 500050

pracma documentation built on Nov. 10, 2023, 1:14 a.m.