Solution (source code)

= Solution

Set $P=a^\dagger b^\dagger$ and $Q=ab$. Independent <bosonic> <canonical commutation relations> give $[Q,P]=N_a+N_b+1=2K_3$, while $[K_3,P]=P$ and $[K_3,Q]=-Q$. Substituting $K_1=(P+Q)/2$ and $K_2=(P-Q)/(2i)$ yields
$$
[K_1,K_2]=-iK_3,\qquad[K_2,K_3]=iK_1,\qquad[K_3,K_1]=iK_2.
$$
Therefore
$$
\boxed{[iK_1,iK_2]=iK_3,\quad[iK_2,iK_3]=-iK_1,\quad[iK_3,iK_1]=-iK_2},
$$
which matches the <matrix> <Lie algebra>. This <boson-pair realization of SU(1,1)> differs from the number-conserving <Schwinger boson representation> of $SU(2)$.