# “Commuting observables share common eigenstates”

I am struggling to find a precise definition of this line from my quantum mechanics textbook: If $$[A,B] = 0$$, then the operators commute, and "commuting operators share common eigenstates".

This does not imply that that every A and B have the same exact set of eigenstates, correct? Specifically, there are operators (such as $$S^2$$) that are the identity matrix, meaning that every quantum state vector is an eigenvector of the operator, and also that the operator commutes with every other operator. However, it is not the case that every eigenvector is an eigenvector of the operator that $$S^2$$ commutes with. For example, $$S^2$$ commutes with $$S_x$$, but it is not the case that every quantum state vector is an eigenvector of $$S_x$$ (in fact, it has only two eigenvectors).

So how should I interpret "commuting operators sharing eigenstates"? Does that simply mean that some eigenstates of the operator $$A$$ will be eigenstates of the operator $$B$$ - that there exists a subset of eigenstates from each operator that they share in common?

If two operators $$A$$ and $$B$$ commute, then there is a common eigenbasis $$\lvert \psi_i\rangle$$, i.e. a basis - not just a set of vectors - of eigenvectors of both operators such that $$A\lvert \psi_i\rangle = a_i\lvert\psi_i\rangle$$ and $$B\lvert \psi_i\rangle = b_i\lvert\psi_i\rangle$$.
If the spectra of both $$A$$ and $$B$$ are non-degenerate, i.e. if every eigenspace for a particular eigenvalue is one-dimensional, then this eigenbasis is unique. If they are degenerate, then there can be eigenvectors of one operator that are not eigenvectors of the other, but there is still at least one choice of eigenvectors such that they form a basis and are eigenvectors for both operators.