Suppose $A$ is a Hermitian operator with eigenvalues $a_1$, $a_2$, and $a_3$, and eigenvectors $|a_1\rangle$, $|a_2\rangle$, and $|a_3\rangle$, where eigenvector $|a_i\rangle$ corresponds to eigenvalue $a_i$.
How does one write $A$ as a matrix in the $|a_i\rangle$ basis? I know you can express $A$ as $$\sum_i a_i \langle a_i |a_i\rangle,$$
But this doesn't help me express it as a matrix. Anyone know what I can do?
The representation in this basis is
$$ A_{ij} = \langle a_i| A|a_j\rangle = a_j\langle a_i|a _j\rangle $$
if the basis is orthonormal then
$$ A_{ij} = a_j\langle a_i|a _j\rangle = a_j\delta_{ij} $$