Original question asked:
If matrix $A$ commutes with $B$, and $B$ commutes with $C$, then does matrix $A$ commute with $C$?
This can easily be disproven by taking $B = I$ and looking at some matrices $A$ and $C$ that doesn't satisfy the condition.
However, I thought: if $B$ is given to be non-invertible, is the case true?
If so, why? If not, can you provide an example?
Also, if not, are there any stronger conditions that would make the case true (for example, $A$ and $C$ has to be both non-invertible)?