det                   package:base                   R Documentation

_C_a_l_c_u_l_a_t_e _t_h_e _D_e_t_e_r_m_i_n_a_n_t _o_f _a _M_a_t_r_i_x

_D_e_s_c_r_i_p_t_i_o_n:

     'det' calculates the determinant of a matrix. 'determinant' is a
     generic function that returns separately the modulus of the
     determinant, optionally on the logarithm scale, and the sign of
     the determinant.

_U_s_a_g_e:

     det(x, ...)
     determinant(x, logarithm = TRUE, ...)

_A_r_g_u_m_e_n_t_s:

       x: numeric matrix.

logarithm: logical; if 'TRUE' (default) return the logarithm of the
          modulus of the determinant.

     ...: Optional arguments.  At present none are used.  Previous
          versions of 'det' allowed an optional 'method' argument. This
          argument will be ignored but will not produce an error.

_V_a_l_u_e:

     For 'det', the determinant of 'x'.  For 'determinant', a list with
     components 

 modulus: a numeric value.  The modulus (absolute value) of the
          determinant if 'logarithm' is 'FALSE'; otherwise the
          logarithm of the modulus.

    sign: integer; either +1 or -1 according to whether the determinant
          is positive or negative.

_N_o_t_e:

     Often, computing the determinant is _not_ what you should be doing
     to solve a given problem.

     Prior to version 1.8.0 the 'det' function had a 'method' argument
     to allow use of either a QR decomposition or an
     eigenvalue-eigenvector decomposition.  The 'determinant' function
     now uses an LU decomposition and the 'det' function is simply a
     wrapper around a call to 'determinant'.

_E_x_a_m_p_l_e_s:

     (x <- matrix(1:4, ncol=2))
     unlist(determinant(x))
     det(x)

     det(print(cbind(1,1:3,c(2,0,1))))

