Consider the matrix $$ \begin{matrix} -1 & 3 & 5 \\ -3 & -1 & 6 \\ 0 & 0 & 3\\ \end{matrix} $$ I know that the Eigen values are 3, -1+3i, -1-3i and I got the answer by solving the characteristic equation.
My confusion is, why don't I get this answer by just transforming this matrix to an upper triangular form in which case the Eigen values are its diagonal elements. On doing so, the diagonal elements that I got were -1,-10 and 3 (R2-3*R1). I know that the sum of the eigens should be equal to trace (=3), which is not in this case. But isn't it true that the diagonals of a triangular matrix form it's Eigen values? What am I missing here?
That is not true as you just illustrated.
I think you are confused with the result that if $$A = PTP^*$$ then the eigenvalues of $A$ and $T$ are the same.
If $A = BT$ where $B$ is nonsingular, we can't conclude that eigenvalues of $A$ and $T$ are the same.