The following points to be noted :
a) In a diagonal matrix D , determinant(D) = a.b.c.... where each of a,b, c and so on are diagonal elements.
b) The diagonal elements of the diagonal matrix are eigen values as well..
c) Trace is the sum of the diagonal elements of a matrix..
d) The sum of eigen values is given by trace of the matrix.
e) The roots of characteristic equation are nothing but eigen values of the corresponding matrix
So , trace of a matrix is nothing but the sum of eigen values..
And hence given a characteristic equation , sum of eigen values is the same as sum of roots of the corresponding characteristic equation..
Given characteristic equation : λ3 - 6λ2 - λ + 22 = 0
We know sum of roots here = - (Coefficient of λ2 ) / (Coefficient of λ3 )
= 6
Hence trace of matrix = 6