## Similar Diagonal Matrices

As part of a larger problem involving classifying intertwining operators of two group representations, I came across the following question: If $X$ is an $n \times n$ diagonal matrix with $n$ distinct non-zero eigenvalues, then exactly which $n \times n$ matrices $A$ satisfy the following equality $AXA^{-1} = X$? Does anyone know the answer to this question?

Edit: Nevermind. I found a better way of doing the problem that avoids this sort of argument.
 PhysOrg.com science news on PhysOrg.com >> Ants and carnivorous plants conspire for mutualistic feeding>> Forecast for Titan: Wild weather could be ahead>> Researchers stitch defects into the world's thinnest semiconductor
 Recognitions: Gold Member Science Advisor Staff Emeritus Those whose eigenvalues are the numbers on the diagonal of the original matrix.
 Is that true? I believe it is the set of operators with the same invariant subspaces. The eigenvalues don't have to be the same, they just have to be simultaneously diagonalizable.