An infinitely deep square-well potential is studied by an SU(1,1) algebra, not by an SO(2) algebra. The creation and annihilation operators for the system are obtained from the factorization method. Closed analytical expressions for the matrix elements of some relevant functions are evaluated.