The trace of a matrix is the sum of the eigenvalues and the determinant is the product of the eigenvalues. The fundamental theorem of symmetric polynomials says that we can write any symmetric polynomial of the roots of a polynomial as a polynomial of its coefficients. We can apply this to the characteristic polynomial of a matrix $A$ to write any symmetric polynomial of eigenvalues as a polynomial in the entries of $A$.

I stumbled upon an explicit formula for this. Let $A$ be an $n \times n$ matrix and $a_1, \dots, a_n$ be its eigenvalues. Then we have the following identity, provided the left hand side is a symmetric polynomial:

$$ \sum_{i \in \mathbb{N}^n} p_i a_1^{i_1} \cdots a_n^{i_n} = \sum_{i \in \mathbb{N}^n} p_i \det(A_1^{i_1}, \dots, A_n^{i_n}) $$

The determinant $\det(A_1^{i_1}, \dots, A_n^{i_n})$ on the right hand side is the determinant of a matrix with those column vectors, where $A_i^k$ is the $i$-th column of the $k$-th power of $A$. The left hand side is a symmetric polynomial of the eigenvalues of $A$, and the right hand side is a polynomial of the entries of $A$.

Example: if $A$ is a $2\times 2$ matrix, then $$a_1 a_2^2 + a_1^2 a_2 = \det(A_1, A_2^2) + \det(A_1^2, A_2)$$

Proof. Let $p(A) \in End(\bigwedge^n V^*)$ be given by $p(A)f(v_1,\dots,v_n) = \sum_{i\in \mathbb{N}^n}f(A^{i_1}v_1,\dots,A^{i_n}v_n)$. We have $End(\bigwedge^n V^*) \simeq \mathbb{R}$ and $p(A)$ is the right hand side of the identity under this isomorphism. Since $p(A)$ was defined basis independently, the right hand side is basis independent, and we get the left hand side in the eigenbasis. $\Box$

Link to detailed proof and slight generalization to an identity on several commuting matrices. E.g. for commuting $2\times 2$ matrices $A,B$:

$$a_1 b_1 a_2^2 + a_1^2 a_2 b_2 = \det(AB_1, A_2^2) + \det(A_1^2, AB_2)$$

This identity looks like it should be a few hundred years old, especially since the proof is quite simple, but I have not seen this in linear algebra courses. Is this a well known identity? Where should I look to learn more about these types of identities? Or, maybe I am mistaken and the identity is false? (though I have also empirically tested it with a computer program) I apologize if this question is too basic for mathoverflow; I am only doing pure mathematics for fun. I initially asked elsewhere but was advised to ask here. Thanks!