rcond package:Matrix R Documentation _E_s_t_i_m_a_t_e _t_h_e _R_e_c_i_p_r_o_c_a_l _C_o_n_d_i_t_i_o_n _N_u_m_b_e_r _D_e_s_c_r_i_p_t_i_o_n: Estimate the reciprocal of the condition number of a matrix. This is a generic function with several methods, as seen by 'showMethods(rcond)'. _U_s_a_g_e: rcond(x, norm, ...) _A_r_g_u_m_e_n_t_s: x: an R object that inherits from the 'Matrix' class. norm: Character indicating the type of norm to be used in the estimate. The default is '"O"' for the 1-norm ('"O"' is equivalent to '"1"'). The other possible value is '"I"' for the infinity norm, see also 'norm'. ...: further arguments passed to or from other methods. _V_a_l_u_e: An estimate of the reciprocal condition number of 'x'. _B_A_C_K_G_R_O_U_N_D: The condition number of a regular (square) matrix is the product of the 'norm' of the matrix and the norm of its inverse (or pseudo-inverse). More generally, the condition number is defined (also for non-square matrices A) as kappa(A) = (max_(||v|| = 1; || Av ||)) /(min_(||v|| = 1; || Av ||)). Whenever 'x' is _not_ a square matrix, in our method definitions, this is typically computed via 'rcond(qr.R(qr(X)), ...)' where 'X' is 'x' or 't(x)'. The condition number takes on values between 1 and infinity, inclusive, and can be viewed as a factor by which errors in solving linear systems with this matrix as coefficient matrix could be magnified. 'rcond()' computes the _reciprocal_ condition number 1/kappa with values in [0,1] and can be viewed as a scaled measure of how close a matrix is to being rank deficient (aka "singular"). Condition numbers are usually estimated, since exact computation is costly in terms of floating-point operations. An (over) estimate of reciprocal condition number is given, since by doing so overflow is avoided. Matrices are well-conditioned if the reciprocal condition number is near 1 and ill-conditioned if it is near zero. _R_e_f_e_r_e_n_c_e_s: Golub, G., and Van Loan, C. F. (1989). _Matrix Computations,_ 2nd edition, Johns Hopkins, Baltimore. _S_e_e _A_l_s_o: 'norm', 'kappa()' from package 'base' computes an _approximate_ condition number of a "traditional" matrix, even non-square ones, with respect to the p=2 (Euclidean) 'norm'. 'solve'. _E_x_a_m_p_l_e_s: x <- Matrix(rnorm(9), 3, 3) rcond(x) ## typically "the same" (with more computational effort): 1 / (norm(x) * norm(solve(x))) rcond(Hilbert(9)) # should be about 9.1e-13 ## For non-square matrices: rcond(x1 <- cbind(1,1:10))# 0.05278 rcond(x2 <- cbind(x1, 2:11))# practically 0, since x2 does not have full rank ## sparse (S1 <- Matrix(rbind(0:1,0, diag(3:-2)))) rcond(S1) m1 <- as(S1, "denseMatrix") all.equal(rcond(S1), rcond(m1)) ## wide and sparse rcond(Matrix(cbind(0, diag(2:-1))))