To better explain, I have the matrix
\begin{bmatrix}3&2&0\\5&0&0\\k&b&-2\end{bmatrix}
where k is chosen to make the matrix non-diagonal. I have to find, if possible, a matrix with the same eigenvalues which is not similar to this one, but I can't seem to find it.
Is it only this particular case, or in general non-diagonalizable matrices that are not similar have different eigenvalues?
Thanks in advance.
Lozenges is correct, and here is the proof of why. Let $A$ and $B$ be similar matrices, i.e. $A = S B S^{-1}$ for some invertible matrix $S$. The characteristic polynomial of $A$ is $$p_A(\lambda) = \text{det}(A - \lambda I) = \text{det}(S B S^{-1} - S (\lambda I) S^{-1})=\text{det}(S)\text{det}(B - \lambda I) \text{det}(S^{-1})$$ but $\text{det}(S)$ and $\text{det}(S^{-1})$ are inverses (this is a property of pairs of inverse matrices). This implies $$p_A(\lambda) = \text{det}(A - \lambda I) = p_B(\lambda) = \text{det}(B - \lambda I)$$