MatMPpinv               package:mixAK               R Documentation

_M_o_o_r_e-_P_e_n_r_o_s_e _p_s_e_u_d_o_i_n_v_e_r_s_e _o_f _a _s_q_u_a_r_e_d _m_a_t_r_i_x

_D_e_s_c_r_i_p_t_i_o_n:

     For a matrix A its Moore-Penrose pseudoinverse is such a matrix
     A[+] which satisfies

       (i) A*A[+]*A = A,
       (ii) A[+]*A*A[+] = A[+],
       (iii) (A*A[+])' = A*A[+],
       (iv) (A[+]*A)' = A[+]*A.

     Computation is done using spectral decomposition. At this moment,
     it is implemented for symmetric matrices only.

_U_s_a_g_e:

       MatMPpinv(A)

_A_r_g_u_m_e_n_t_s:

       A: either a numeric vector in which case inverse of each element
          of A is returned or a squared matrix.

_V_a_l_u_e:

     Either a numeric vector or a matrix.

_A_u_t_h_o_r(_s):

     Arno&#353t Kom&#225rek arnost.komarek[AT]mff.cuni.cz

_R_e_f_e_r_e_n_c_e_s:

     Golub, G. H. and Van Loan, C. F. (1996, Sec. 5.5). _Matrix
     Computations. Third Edition_. Baltimore: The Johns Hopkins
     University Press.

_E_x_a_m_p_l_e_s:

     set.seed(770328)
     A <- rWishart(1, 5, diag(4))
     Ainv <- MatMPpinv(A)

     ### Check the conditions
     prec <- 13
     round(A - A %*% Ainv %*% A, prec)
     round(Ainv - Ainv %*% A %*% Ainv, prec)
     round(A %*% Ainv - t(A %*% Ainv), prec)
     round(Ainv %*% A - t(Ainv %*% A), prec)

