[Math] Finding an unitary matrix, $P$, and diagonal matrix, $D$, such that $P^{-1}AP = D$.

eigenvalues-eigenvectorslinear algebramatrices

Let $A = \begin{pmatrix} 0 & i \\ i & 0 \end{pmatrix}$. I need to find an unitary matrix, $P$ and diagonal matrix $D$, such that $P^{-1}AP = D$ (Or determine why those can't be found)

Now, for this to happen, $A$ must be a normal matrix, and this is true iff there's an orthonormal basis for $V$ composed by eigenvectors of $T$.

How do I do this in practice? Do I have to find the eigenvectors of $A$ and then apply on them Gram-Schmidt process?

Or should I first check that $A$ has $n$ different eigenvalues, since $D$ must be $D=\text{Diag}(\lambda_1, \ldots, \lambda_n)$

Best Answer

Step 1: Find the eigenvalues of $A$. In this case, they are $\{i,-i\}$.

Step 2: Find the corresponding eigenvectors (up to scalar multiplication). They are $(1,1)$ and $(1,-1)$. (In general, if an eigenvalue is repeated, find linearly independent and pairwise orthogonal eigenvectors corresponding to it, if possible—see the comment by @Omnomnomnom below.)

Step 3: Normalize the eigenvectors so that each has unit norm: $(2^{-1/2},2^{-1/2})$ and $(2^{-1/2},-2^{-1/2})$.

Step 4: Form a matrix $P$ having the eigenvectors as columns: $$P=\left(\begin{array}{cc}\dfrac{1}{\sqrt{2}}&\dfrac{1}{\sqrt{2}}\\\dfrac{1}{\sqrt{2}}&-\dfrac{1}{\sqrt{2}}\end{array}\right).$$ You can check that $P$ is unitary.

Step 5: Now let $D$ be the matrix having the eigenvalues in the diagonal: $$D=\left(\begin{array}{cc}i&0\\0&-i\end{array}\right).$$

Step 6: Check that $A=PDP^{-1}$.