Matrix formulation of acoustic scattering from an arbitrary number of scatterers