# Similarity between a matrix and diagonal matrix

How to prove a matrix and a diagonal matrix are similar? Is there some rule to follow or are there some steps to follow?

Like: suppose a matrix $$A$$ = something, prove that $$A$$ is similar to a diagonal matrix, or prove that it isn't... What to do in such a problem?

• Look up "diagonalization". – Robert Israel Feb 15 at 16:47
• Don't edit your question into something completely different. Instead, leave this question alone and ask a new question. Having a question with seemingly unrelated answers will only confuse anyone else who looks at your question, especially if they happen to be looking for advice on a problem similar to the one you originally asked about. – Robert Howard Mar 16 at 23:40
• Well you are totally right .. but whst should I do if I,m not allowed to ask although I didn't ask much ... and it's kinda emergency – user623922 Mar 16 at 23:49
• Why would you not be allowed to ask? If anything, I would think that a new question appearing on the site would attract more attention than an edit being made to an older question. – Robert Howard Mar 17 at 0:37

Here's the idea behind diagonalization: An $$n\times n$$ matrix $$A$$ is similar to a diagonal matrix $$D=\mathrm{diag}(\lambda_1,\cdots,\lambda_n)$$ if and only if an $$n\times n$$ invertible matrix $$P = \begin{bmatrix} P_1 & \cdots & P_n \end{bmatrix}$$ exists such that $$A = PDP^{-1}$$

Equivalently $$AP=PD$$

Writing it as column vectors, we have

$$\begin{bmatrix} AP_1 & AP_2 & \cdots &AP_n \end{bmatrix} = \begin{bmatrix} \lambda_1P_1 & \lambda_2 P_2 & \cdots & \lambda_n P_n\end{bmatrix}$$

Obviously, $$AP_i = \lambda_i P_i$$ for $$i=1,2,\cdots,n$$ is satisfied when $$P_i$$ is the eigenvector associated to $$\lambda_i$$. This suggests that if the matrix $$A$$ has $$n$$ linearly independent eigenvectors, we can diagonalize it. It is shown rigorously in standard textbooks that this is necessary and sufficient.

First thing you should check is whether the matrix is self-adjoint (or even normal if you want) because normal matrices are always diagonalizable. If this didn't help, then compute the eigenvalues, i.e. the roots of the characteristic polynomial. This might be difficult depending on the size of the matrix. Assuming you got the eigenvalues, check whether they are all different. If so, the matrix is diagonalizable. If not, you need to start computing the eigenspaces and check whether the dimensions coincide with multiplicities of the eigenvalues. Again, if they agree, your matrix is diagonalizable. If not, it is not.

There are also some other tricks, e.g. Gershgorin circles, which may help in some cases if you want to look it up.

Suppose you are given an $$N\times N$$ diagonalizable matrix $$D$$ with distinct eigenvalues $$\lambda_1,\lambda_2,\cdots,\lambda_n$$. Then the minimal polynomial for $$D$$ is $$m_D(\lambda)=(\lambda-\lambda_1)(\lambda-\lambda_2)(\cdots)(\lambda-\lambda_n),$$ and the characteristic polynomial of $$D$$ is $$p_D(\lambda)=(\lambda-\lambda_1)^{r_1}(\lambda-\lambda_2)^{r_2}\cdots(\lambda-\lambda_n)^{r_n}.$$ where $$r_k$$ is the dimension of the eigenspace of $$D$$ corresponding to eigenvalue $$\lambda_k$$.

If $$P$$ is another $$N\times N$$ matrix for which $$m_D(P)=0$$, then $$P$$ is diagonalizable with a set of eigenvalues that is a subset of the eigenvalues of $$D$$. The multiplicities of these eigenspaces are then checked by looking at the characteristic polynomial $$p_P$$ of $$P$$. If $$p_P=p_D$$ also holds, then $$P$$ and $$D$$ are similar. So $$P$$ is similar to $$D$$ iff $$m_D(P)=0$$ and $$p_P=p_D$$.