TITLE: On approximate simultaneous diagonalization
QUESTION [6 upvotes]: 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$?

REPLY [7 votes]: The answer is no in general.
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$.