triang              package:fUtilities              R Documentation

_U_p_p_e_r _a_n_d _L_o_w_e_r _T_r_i_a_n_g_u_l_a_r _M_a_t_r_i_x_e_s

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

     Extracs the pper or lower tridiagonal part from a matrix.

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

     triang(x)
     Triang(x)

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

       x: a numeric matrix. 

_D_e_t_a_i_l_s:

     The functions 'triang' and 'Triang' allow to transform a square
     matrix to a lower or upper triangular form.  A triangular matrix
     is either an upper triangular matrix or lower  triangular matrix.
     For the first case all matrix elements 'a[i,j]' of matrix 'A' are
     zero for 'i>j', whereas in the second case we have just the
     opposite situation. A lower triangular matrix is  sometimes also
     called left triangular. In fact, triangular matrices  are so
     useful that much computational linear algebra begins with 
     factoring or decomposing a general matrix or matrices into
     triangular  form. Some matrix factorization methods are the
     Cholesky factorization  and the LU-factorization. Even including
     the factorization step,  enough later operations are typically
     avoided to yield an overall  time savings. Triangular matrices
     have the following properties: the  inverse of a triangular matrix
     is a triangular matrix, the product of  two triangular matrices is
     a triangular matrix, the determinant of a  triangular matrix is
     the product of the diagonal elements, the  eigenvalues of a
     triangular matrix are the diagonal elements.

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

     Higham, N.J., (2002); _Accuracy and Stability of Numerical
     Algorithms_,  2nd ed., SIAM.

     Golub, van Loan, (1996); _Matrix Computations_,  3rd edition.
     Johns Hopkins University Press.

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

     ## Create Pascal Matrix:
        P = pascal(3)
        P
        
     ## Create lower triangle matrix
        L = triang(P)
        L                                

