  In this article we apply quaternionic linear algebra and quaternionic linear
system theory to develop the inverse scattering transform theory for the
nonlinear Schr\"odinger equation with nonvanishing boundary conditions. We also
determine its soliton solutions by using triplets of quaternionic matrices.
