normest | R Documentation |
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.
normest(M, maxiter = 100, tol = .Machine$double.eps^(1/2))
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. |
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.
2-norm of the matrix as a positive real number.
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)
Trefethen, L. N., and D. Bau III. (1997). Numerical Linear Algebra. SIAM, Philadelphia.
cond
, svd
normest(magic(5)) == max(svd(magic(5))$d) # TRUE
normest(magic(100)) # 500050
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.