Let $G$ be a simple undirected graph with $n$ vertices, and let $A_G$ be the corresponding adjacency matrix. Let $\kappa_1, \dots , \kappa_n$ be the eigenvalues of the adjacency matrix $A_G$. I have read that $ \kappa_1 + \dots + \kappa_n = 0, $ and I have checked this by hand for $n \leq 3$ along with a few "random" graphs. It is true in all the cases I have checked.
It seems that we want to write $A_G = U^{T} D U$, where $D$ is a diagonal matrix with trace $\text{tr}(D) = 0$, but I have been unable to supply a proof. How would one prove this?