Let with . Commutation gives
Thus belongs to the eigenspace , with the zero vector allowed. Since has distinct eigenvalues, each eigenspace is one-dimensional. Hence for some scalar . This is the fact that commuting maps preserve eigenspaces.
The standard linear independence theorem for eigenvectors belonging to distinct eigenvalues supplies a basis of eigenvectors of . The preceding argument makes every one an eigenvector of as well. Their column matrix therefore simultaneously diagonalizes and . This is simple spectrum gives simultaneous diagonalization.
For real matrices, this conclusion always holds over ; a real common basis follows when the distinct eigenvalues of are real. Real matrix entries alone do not ensure a real eigenbasis: a quarter-turn of , with , has eigenvalues . The matrices in this question have real spectra, so their common basis is real.