What is the difference between diagonalising a matrix and its eigendecomposition? When we diagonalise a matrix, we write it in terms of a diagonal matrix $S$ which contains all of the eigenvalues of the matrix, a matrix $P$ which contains all of the corresponding eigenvectors of $A$, and $P^{-1}$.
$$A=P^{-1}SP$$
However, when we have an eigendecomposition, we also represent a matrix $B$ in terms a diagonal matrix $\Lambda$ which contains all of the eigenvalues of $B$, a matrix $Q$ (which I think is the eigenbasis) and $Q^T$.
$$B=Q^T \Lambda Q$$
What's the difference between the two?
 A: A square matrix $A \in \mathbb{R}^{n \times n}$ is called diagonalizable if there exists a matrix $P$ and a diagonal matrix $\Lambda$ such that
\begin{equation}
A = P \Lambda P^{-1}.
\end{equation}
Necessarily, the columns of $P$ are eigenvectors of $A$ and the diagonal elements of $\Lambda$ are the corresponding eigenvalues. A natural question to ask is: when is $A$ diagonalizable? One sufficient condition is $A$ is symmetric i.e. $A^T = A$. For symmetric $A$ it turns out that not only does there exist such $P$, we can always choose $P$ to be an orthogonal matrix i.e. $P^T = P^{-1}$, meaning that the columns of $P$ form an orthonormal basis for $\mathbb{R}^n$. Plugging into the above display you find
\begin{equation}
A = P \Lambda P^T.
\end{equation}
More generally, it turns out that a matrix $A \in \mathbb{C}^{n \times n}$ is unitarily diagonalizable (there exists $P$ with $P^* = P^{-1}$) if and only if $A$ is normal i.e. satisfies $AA^* = A^*A$. Here we use the notation $A^* = \bar{A}^T$.
