# Almost commuting matrices, one a projection, is there a nearby projection that commutes?

Suppose that $$P, A, Q \in \mathbb{M}^{n \times n}(\mathbb{R})$$ (I'm still interested if it must be done over $$\mathbb{C}$$), (EDIT:) suppose that $$A$$ is given, $$P$$ is an orthogonal projection, and $$\lVert PA-AP \rVert < \delta$$, is there some $$Q$$ an orthogonal projection such that $$\Vert P-Q \rVert < \epsilon(\delta)$$ (such that as $$\delta \to 0$$, so does $$\epsilon$$) and $$QA = AQ$$? Obviously if there's a broader result than just the finite-dimensional case, then that's good too.

I've seen results vaguely like this, e.g. Lin's Theorem is a result about almost-commuting normal matrices. However I haven't seen a result about projections of this kind.

It would be nice if this were true, I hope to learn more about this type of result, but if the good people here could point me to this result or a similar result from which I could jump off, I'd very much appreciate it.

EDIT: A simple counterexample to my suggestion: $$A = \begin{bmatrix}1 & \delta \\ 0 & 1\end{bmatrix}$$ $$P = \begin{bmatrix}0 & 0 \\ 0 & 1\end{bmatrix}$$ The only non-trivial invariant subspaces are $$\mathbb{R}^2$$ and the span of $$\begin{bmatrix}1 & 0\end{bmatrix}$$, but P is not near to the projection for either. But $$\lVert PA-AP \rVert = \delta$$.

Another counterexample is given in the comments.

• Just a hunch, but I would look for counterexamples with badly separated invariant subspaces, such as $A = \begin{bmatrix}0 & 1\\ \delta & 0\end{bmatrix}$ or larger Jordan blocks plus a perturbation in $A(n,1)$. – Federico Poloni Mar 4 at 7:25
• @WilliamBell No, just a scalar. $A = J + \delta e_1 e_n^T$. I went over this in my head and now I am even convinced that it works, with $P = e_1 e_1^T$. Then $\operatorname{Im} Q$ must be a real eigenvector of $A$, and the only one is at a distnace $O(\delta^{1/n})$ from $A$. Taking $n$ sufficiently large gives a counterexample. I will write it as an answer. – Federico Poloni Mar 4 at 7:41
• If you do not impose any normalization, what you ask is even false in fixed dimension $n=2$. If you fix $A$ and $P$ that do not commute, say with $A$ of norm $<1$, then for $A'=\frac{\delta}{2} A$, you have $\|A' P - P'A\| < \delta$, but any projection that commutes with $A'$ must commute with $A$ and therefore be at distance $\geq c(A,P)$ from $P$. – Mikael de la Salle Mar 4 at 8:40
• For an explicit example, take $P=\begin{pmatrix} 1&0\\0&1\end{pmatrix}$ and $A=\begin{pmatrix} 0&\delta\\ \delta&0\end{pmatrix}$, so that $\|PQ-QP\| \geq \frac{1}{\sqrt{2}}$ for every projection $Q$ that commutes with $A$. – Mikael de la Salle Mar 4 at 8:44
• @WilliamBell Oops, I meant $P = \begin{pmatrix} 1 &0\\0&0\end{pmatrix}$, and the conclusion is $\|P-Q\| \geq \frac{1}{\sqrt{2}}$. Sorry for the confusion. – Mikael de la Salle Mar 5 at 8:16

EDIT: I realized that this does not work, because $$PA$$ has one nonzero too much, sorry. $$A$$ and $$P$$ can be simultaneously almost-triangularized, but they don't almost-commute. I'm leaving it up as an attempt, but it doesn't deserve acceptance / upvotes.
Suppose such $$\delta<1$$ and $$\epsilon(\delta)$$ exist. Take $$A = J + \delta e_1 e_n^T$$, $$P = e_1 e_1^T$$ where $$J$$ is a nilpotent Jordan block of size $$n$$, and $$e_1,e_n$$ are the first and last column of the identity matrix $$I$$. Since $$\|P-Q\|<1$$, and orthogonal projection matrices have integer trace equal to their rank, $$Q$$ must have rank 1. Then $$\operatorname{Im} Q$$ must be a real eigenvector of $$A$$, and the only one is $$[1\, \delta^{1/n}\, \delta^{2/n}\, \dots \, \delta^{1-1/n}]^T$$ (and its multiples). So $$Q$$ is at a distance $$O(\delta^{1/n})$$ from $$P$$. Hence $$\epsilon(\delta) > C\delta^{1/n}$$ for some $$\delta$$. This holds for all $$n$$, and thus $$\epsilon(\delta) \geq 1$$, contradicting $$\epsilon(\delta) \to 0$$.
• This is a good answer to the question as I wrote it, but I don't mind dimension-dependence too much, so do you happen to have a suggestion for if I write $\epsilon(\delta, n)$? – William Bell Mar 4 at 7:55
• @WilliamBell Sorry, I have noticed that there is a mistake here, in that $A$ and $P$ do not almost-commute, although they can be almost-simultaneously triangularized. You probably want to un-accept this. :/ – Federico Poloni Mar 4 at 8:46