# If two matrices have the same eigenvalues and eigenvectors are they equal?

The question stems from a problem i stumbled upon while working with eigenvalues. Asking to explain why $A^{100}$ is close to $A^\infty$

$$A= \left[ \begin{array}{cc} .6 & .2 \\ .4 & .8 \end{array} \right]$$ $$A^\infty= \left[ \begin{array}{cc} 1/3 & 1/3 \\ 2/3 & 2/3 \end{array} \right]$$ Answer being given that (skipping calculations) that $A$ has eigenvalues $\lambda_1=1$ and $\lambda_2=0.4$ with eigenvectors $x_1=(1,2)$ and $x_2=(1,-1)$, and $A^{\infty}$ has eigenvalues $\lambda_1=1$ and $\lambda_2=0$, with same eigenvectors, while $A^{100}$ has eigenvalues $\lambda_1=1$ and $\lambda_2=(0.4)^{100}$ with same eigenvectors as the others, concluding that as the eigenvectors are the same and the eigenvalues are close comparing $A^\infty$ and $A^{100}$ they must be close.

Creating the basis for my question, how can one conclude that two matrices with same eigenvectors and close/equal eigenvalues are close/equal to each other?

My initial thoughts is that two matrices with equal eigenvectors and eigenvalues founds the basis for the same transformation which is why they are equal - Am I completly off?

The two matrices $\left[ \begin{array}{cc} 1 & 0 \\ 1 & 1 \end{array} \right]$ and $\left[ \begin{array}{cc} 1 & 0 \\ 200 & 1 \end{array} \right]$ both have the same eigenvalues and eigenvectors, but they are nowhere near equal to each other.

But if an $n\times n$ matrix has $n$ distinct eigenvalues or otherwise has a set of eigenvectors that form a basis of $\mathbb R^n,$ then the only matrix that has the same eigenpairs, i.e. the same eigenvectors, each with the same eigenvalue, is that same matrix. That is because a linear transformation is completely determined by what it does with a basis.

If, as the other answers assume, there are $n$ independent eigenvectors, i.e. if the matrices are diagonalizable, then the answer to your question is yes; using the $n$ independent eigenvectors as the base we see that the matrices (in that base) are identical and therefore they are identical in all bases. However, if the matrices are not diagonalizable, i.e. if there are no $n$ independent eigenvectors, then the matrices are not necessarily the same. For example:

$$A = \begin{pmatrix} 1&1\\ 0&1\\ \end{pmatrix}\;\;\text{and}\;\; B = \begin{pmatrix} 1&2\\ 0&1\\ \end{pmatrix}\,,$$

are different matrices that have the same eigenvectors with the same eigenvalues ($1$ is the only eigenvalue and its eigenspace is one-dimensional).

Besides needing a complete base of eigenvectors (as others pointed out), order is important if your "equal" is componentwise-equal. The following two matrices have the same set of eigenvalues and the same set of eigenvectors:

$$A = \begin{pmatrix} 2&0\\ 0&1\\ \end{pmatrix}\;\;\text{and}\;\; B = \begin{pmatrix} 1&0\\ 0&2\\ \end{pmatrix}\,.$$

(Conversely, having different eigenvectors does not necessarily mean the matrices are different. Any base of each eigenspace works as eigenvectors. (Think scaling or repeated eigenvalues.))

• To clarify, $A$ has eigenvectors $t\begin{pmatrix} 1\\ 0\end{pmatrix}$, $t\ne 0$ corresponding to eigenvalue $\lambda =2$, while for $B$ those eigenvectors correspond to the other eigenvalue $\lambda =1$. So the relevant notion of "same eigenvalues and eigenvectors" is that the sets of pairs $(\lambda, E_\lambda)$ are the same. If think some people express that by saying the eigensystems are the same. This is not the case for your $A$ and $B$. Nov 25, 2017 at 22:38

If two $n$ by $n$ matrices, $A$ and $B$ have the same $n$ linearly independent eigenvectors, corresponding to the same eigenvalues, then the matrix of eigenvectors, $U$, can be used to diagonalise both matrices $$U^{-1}AU= U^{-1}BU=D$$ where $D$ is the matrix of eigenvalues. So, in this case, $A=B$ as you suspected.

In $\mathbb{R}^n$, dealing with $n \times n$ matrices $A,B$, assuming they have the same $n$ eigenvectors and corresponding eigenvalues $a_1, \ldots, a_1$ and $b_1, \ldots, b_n$, respectively, you can decompose $$A = VD_AV^T \quad \text{and} \quad B = VD_BV^T,$$ where $D_A$ and $D_B$ are diagonal matrices with diagonal of $a_1, \ldots, a_n$ and $b_1, \ldots, b_n$, respectively. Hence, $$\Delta = A - B = V \left(D_A - D_B\right) V^T,$$ and as $(a_i) \to (b_i)$, the difference matrix $\Delta \to 0_{n \times n}$.

A similar argument can be made for rectangular matrices using singular-value decomposition.

• Why use the arrow notation between the vectors of eigenvalues? Nov 24, 2017 at 14:55
• @layman wanted to suggest the notion of a limit -- as eigenvalues gradually converge, so resulting matrices will converge as well... Nov 24, 2017 at 18:22
• What do you mean by gradually converge? What is converging? We don't have an infinite sequence here. Nov 25, 2017 at 1:07
• @layman not hard to come up with a sequence that starts with $D_A$ and gradually moves towards $D_B$... Nov 27, 2017 at 4:35