# If Two Matrices Have the Same Eigenvalues with Linearly Independent Eigenvectors, then They Are Equal

## Problem 424

Let $A$ and $B$ be $n\times n$ matrices.
Suppose that $A$ and $B$ have the same eigenvalues $\lambda_1, \dots, \lambda_n$ with the same corresponding eigenvectors $\mathbf{x}_1, \dots, \mathbf{x}_n$.
Prove that if the eigenvectors $\mathbf{x}_1, \dots, \mathbf{x}_n$ are linearly independent, then $A=B$.

## Proof.

Since $A$ and $B$ have $n$ linearly independent eigenvectors $\mathbf{x}_1, \dots, \mathbf{x}_n$, they are diagonalizable.
Specifically, if we put $S=[\mathbf{x}_1, \dots, \mathbf{x}_n]$.

Then $S$ is invertible (as column vectors of $S$ are linearly independent) and we have
$S^{-1}AS=D \text{ and } S^{-1}BS=D,$ where $D$ is the diagonal matrix whose diagonal entries are eigenvalues:
$D=\begin{bmatrix} \lambda_1 & 0 & \cdots & 0 \\ 0 & \lambda_2 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \lambda_n \end{bmatrix}.$ It follows that we have
$S^{-1}AS=D=S^{-1}BS,$ and hence $A=B$. This completes the proof.

Determine all $2\times 2$ matrices $A$ such that $A$ has eigenvalues $2$ and $-1$ with corresponding eigenvectors \[\begin{bmatrix} 1 \\...