Hi: what I want to do is decompose the a symmetric matrix A into this form A=LDL' hence TAT'=D,T is inverse of (L)and T is a lower trangular matrix,and D is dignoal matrix for one case A=1 1 1 1 5 5 1 5 14 T=inverse(L)= 1 0 0 -1 1 0 0 -1 1 D=(1,4,9) I tried to use chol(A),but it returns only trangular, anyone know the function can return both L and D? thank you very much~ [[alternative HTML version deleted]]