The trace and determinant are unchanged under an orthogonal transformation. If you have, as I suspect, n distinct eigenvalues, then you're guaranteed to be able to orthogonally diagonalize A. If you can do that, and you know that the trace and determinant are unchanged by such a transformation, then you're done.