$A$ matrix is diagonalisable if $\exists S : S^{-1}AS $ is a diagonal matrix, how can I find S?

57 Views Asked by At

Per definition a matrix $A$ is diagonalisable if there exists a matrix S such that $S^{-1}AS$ is a diagonal matrix.

My question is how do I find the matrix $S$? Is it always the combination of the vectors that span the eigenspaces of the matrix $A$ or how can I find $S$?