B={{0,1,-(Sqrt[3])},{7,π,E},{-(3/4),6,8}};
Tr[B]
N[%]
Total[Diagonal[B]]//N