Today I was solving a problem about listing all pairs $(a,b)\in \mathbb{R}^2$ such tath there exist a unique symmetric $2\times 2$ matrix such that $det(A) = a$ and $trace(A)=b$, where $A$ is the matrix that fulfills such conditions.
The solution to this specific problem is all pairs such that $b^2 = 4a$, and the matrix is given by de diagonal matrix with all entries along the diagonal being $a_{ii} = \frac b2$. And to any diagonal matrix (with all entries being equal on the diagonal) we can find $a,b$. Now, to my actual doubt.
Since trace and determinant (along with all the coeficcients of the characteristic polinomial) are invariant under basis changes. Generalizing this problem and dropping the symmetric condition, in order for such a matrix to exist and be unique, it must be invariant under any basis. I have proven that all diagonal matrices with just one eigenvalue fulfill this condition, but I would like to know if there exists any other linear operators such that its matrix representations is the same no matter the basis chosen.
All linear maps which are invariant under change of basis are multiples of the identity as you mentioned, in other words if $\cal{B}=\{e_1,...,e_n\}$ is a basis, $\cal{C}=\{e_1',...,e_n'\}$ a different basis and $L$ is a linear map such that $[L]_{\cal{B}} =[L]_\cal{C}$ then $L$ is a multiple of the identity. To prove this take $\cal{C}=\{2e_1,e_2,...,e_n\}$ and use the invariance condition to find what $L$ has to look like.