Finding commuting matrices @JoonasIlmavirta That can't be right, since certainly scalar multiples of the identity commute with both $A$ and $B$. The feeling I have is rather that the eigenspaces of a matrix commuting with $A$ and $B$ should be big. Also, whether an eigenvalue is zero or not shouldn't matter, since $M$ will commute with $A$ and $B$ iff $\lambda I + M$ does.