# Does total $\hat{S}^2$ always commute with total $\hat{S}_z$ even for interacting spins?

I was given the following operator $$\hat{f}$$ describing the interaction of two spin-$$\frac12$$ particles:

$$\hat{f}=a+b{\hat{\bf S}_1}\cdot{\hat{\bf S}_2}.$$

I was told that I can prove that $$\hat{f}$$ does commute with the total spin operators $$\hat{S}^2$$ and $$\hat{S}_z$$ because of the commutation relation $$[\hat{S}^2,\hat{S}_z]=0$$. Why is this true, and is it necessarily true regardless of the interaction between spins? From what I have learnt about addition of angular momentum, $$[\hat{J}^2,\hat{J}_z]=0$$ is true for non-interacting particles, but I am concerned about the spin interactions and possible coupling between the two particles.

Additionally, does $${\hat{\bf S}_1}$$ necessarily commute with $${\hat{\bf S}_2}$$ (for calculating $$\hat{S}^2$$ as a dot product)? I know that for non-interacting particles, the two particles have different spinor spaces, but once again I am uncertain for particles with interacting spins.

Algebraically, $$S_1 \cdot S_2 = \frac{1}{2} \left((S_1+S_2)^2 - S_1^2 - S_2^2\right)$$, so we see that $$S^2$$ and $$S_z$$ commutes with all the terms. We use the fact that $$[S^2, S_z] = [S^2, S_y] = [S^2, S_z] = 0$$ as you said.
You can also view the interaction as $$S_{x,1}S_{x,2} + S_{y,1}S_{y,2} + S_{z,1}S_{z,2} = \frac{1}{2}\left(S_{+,1}S_{-,2} + S_{-,1}S_{+,2}\right) + S_{z,1}S_{z,2}$$ where $$S_{+,n} = S_{x,n} + iS_{y,n}$$ is the spin ladder operator and so on. We see that the interaction operator preserves the total spin and raises or lowers the individual spin polarization by one unit, but the total spin polarization $$S_z$$ is preserved.
The commutativity of spin operators is determined by the angular momentum algebra. This is independent of the presence of interaction. So to answer your last question, yes, $$S_1$$ commutes with $$S_2$$. The effect of interaction on the system is that it changes which quantum numbers are good (the set of conserved quantities changes). For example, in the isotropic Heisenberg interaction above, we saw that total spin and its polarization are conserved, but for dipolar interaction, this is not true.