# On approximate simultaneous diagonalization

It is well known that two $$n\times n$$ symmetric positive semidefinite matrices $$A$$, $$B$$ such that $$AB=0$$ are simultaneously diagonalizable.

My question is related to the existence of a specific simultaneous diagonalization in the following sense: Let $$\{A_k\}$$, $$\{B_k\}$$ be two sequences of symmetric matrices converging to positive semidefinite matrices $$A$$ and $$B$$, respectively, such that $$AB=0$$. Is it the case that there exist a basis $$\{v_i^k\}$$ of eigenvectors of $$A_k$$ and a basis $$\{w_i^k\}$$ of eigenvectors of $$B_k$$, for all k, such that each $$v_i^k$$ and $$w_i^k$$ converge to some $$c_i$$ such that $$\{c_1,\dots, c_n\}$$ form a simultaneous basis of eigenvectors for $$A$$ and $$B$$?

• Just for the record: two normal matrices $A$ and $B$ are simultaneously diagonalizable if they commute, and $AB=0$ is a sufficient condition for normal matrices $A$ and $B$ to commute. – Jochen Glueck Oct 12 '19 at 18:51

For a $$2\times 2$$-counterexample, let $$A = 0$$, let $$B$$ be the diagonal matrix with diagonal entries $$1$$ and $$0$$ (i.e. $$B$$ is the projection onto the first component), choose $$B_k = B$$ for each $$k \in \mathbb{N}$$ and $$A_k = \frac{1}{k} \begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}$$ for each $$k \in \mathbb{N}$$. Then each sequence $$(v_k) \subseteq \mathbb{R}^2$$ of eigenvectors of $$A_k$$ can only converge to a scalar multiple of $$(1,1)$$ or to a scalar multiple of $$(1,-1)$$.
However, only (scalar multiples of) the canonical unit vectors $$(1,0)$$ and $$(0,1)$$ simultaneously diagonalize $$A$$ and $$B$$.
• And just in case others have the same next thought that I did: the question’s conjecture can’t be fixed by adding a condition that $A,B \neq 0$, since taking the direct sum of this answer’s counterexample with an identity matrix gives a counterexample with $A,B \neq 0$. – Peter LeFanu Lumsdaine Oct 13 '19 at 13:11