symmpart               package:Matrix               R Documentation

_S_y_m_m_e_t_r_i_c _P_a_r_t _a_n_d _S_k_e_w(_s_y_m_m_e_t_r_i_c) _P_a_r_t _o_f _a _M_a_t_r_i_x

_D_e_s_c_r_i_p_t_i_o_n:

     symmpart(x) computes the symmetric part '(x + t(x))/2' and the
     skew symmetric part '(x - t(x))/2' of a square matrix 'x'. Note
     that 'x == symmpart(x) + skewpart(x)' for all square matrices.

_U_s_a_g_e:

     symmpart(x)
     skewpart(x)

_A_r_g_u_m_e_n_t_s:

       x: a _square_ matrix; either "traditional" of class '"matrix"',
          or typically, inheriting from the 'Matrix' class.

_V_a_l_u_e:

     'symmpart()' returns a symmetric matrix, inheriting from
     'symmetricMatrix' iff 'x' inherited from 'Matrix'.

     'skewpart()' returns a skew-symmetric matrix, typically of the
     same class as 'x' (or the closest "general" one, see
     'generalMatrix').

_E_x_a_m_p_l_e_s:

     m <- Matrix(1:4, 2,2)
     symmpart(m)
     skewpart(m)

     stopifnot(all(m == symmpart(m) + skewpart(m)))

