Sum of diagonal elements
b = trace(A)
b = trace(A) is the sum of the diagonal elements of the matrix A.
A
t = sum(diag(A));
det | eig
det
eig