For a spin 1 system l = 1 and m = -1 , 0 , 1. For the operator S z {\displaystyle S_{z}} we have
S z | l , m ⟩ {\displaystyle S_{z}|l,m\rangle } ⇒ {\displaystyle \Rightarrow } ⟨ l , n | S z | l , m ⟩ = m ℏ ⟨ l , n | l , m ⟩ {\displaystyle \langle l,n|S_{z}|l,m\rangle =m\hbar \langle l,n|l,m\rangle } ⇒ ( S z ) n m = m ℏ δ n m {\displaystyle \Rightarrow (S_{z})_{nm}=m\hbar \delta _{nm}}
So
S z = ℏ ( 1 0 0 0 0 0 0 0 − 1 ) {\displaystyle S_{z}=\hbar {\begin{pmatrix}1&0&0\\0&0&0\\0&0&-1\\\end{pmatrix}}} ⇒ {\displaystyle \Rightarrow } S z 2 = ℏ 2 ( 1 0 0 0 0 0 0 0 1 ) {\displaystyle S_{z}^{2}={\hbar }^{2}{\begin{pmatrix}1&0&0\\0&0&0\\0&0&1\\\end{pmatrix}}}
For the S x {\displaystyle S_{x}} operator we have
S x = ℏ 2 ( 0 2 0 2 0 2 0 2 0 ) {\displaystyle S_{x}={\frac {\hbar }{2}}{\begin{pmatrix}0&{\sqrt {2}}&0\\{\sqrt {2}}&0&{\sqrt {2}}\\0&{\sqrt {2}}&0\\\end{pmatrix}}} ⇒ {\displaystyle \Rightarrow } S x 2 = ℏ 2 ( 1 2 0 1 2 0 1 0 1 2 0 1 2 ) {\displaystyle S_{x}^{2}={\hbar }^{2}{\begin{pmatrix}{\frac {1}{2}}&0&{\frac {1}{2}}\\0&1&0\\{\frac {1}{2}}&0&{\frac {1}{2}}\\\end{pmatrix}}} ⇒ {\displaystyle \Rightarrow } S y = ℏ 2 i ( 0 2 0 − 2 0 2 0 − 2 0 ) {\displaystyle S_{y}={\frac {\hbar }{2i}}{\begin{pmatrix}0&{\sqrt {2}}&0\\-{\sqrt {2}}&0&{\sqrt {2}}\\0&-{\sqrt {2}}&0\\\end{pmatrix}}} S y 2 = ℏ 2 ( 1 2 0 − 1 2 0 1 0 − 1 2 0 1 2 ) {\displaystyle S_{y}^{2}={\hbar }^{2}{\begin{pmatrix}{\frac {1}{2}}&0&-{\frac {1}{2}}\\0&1&0\\-{\frac {1}{2}}&0&{\frac {1}{2}}\\\end{pmatrix}}}
Thus the Hamiltonian can be represented by the matrix
H = ℏ 2 ( A 0 B 0 0 0 B 0 A ) {\displaystyle H={\hbar }^{2}{\begin{pmatrix}A&0&B\\0&0&0\\B&0&A\\\end{pmatrix}}}
To find the energy eigenvalues we have to solve the secular equation
d e t ( H − λ I ) = 0 {\displaystyle det(H-\lambda I)=0} ⇒ {\displaystyle \Rightarrow } d e t ( A ℏ 2 − λ 0 B ℏ 2 0 − λ 0 B ℏ 2 0 A ℏ 2 − λ ) = 0 {\displaystyle det{\begin{pmatrix}A{\hbar }^{2}-\lambda &0&B{\hbar }^{2}\\0&-\lambda &0\\B{\hbar }^{2}&0&A{\hbar }^{2}-\lambda \\\end{pmatrix}}=0}
⇒ {\displaystyle \Rightarrow } λ 1 = 0 {\displaystyle \lambda _{1}=0} , λ 2 = ℏ 2 ( A + B ) {\displaystyle \lambda _{2}={\hbar }^{2}(A+B)} , λ 3 = ℏ 2 ( A − B ) {\displaystyle \lambda _{3}={\hbar }^{2}(A-B)}