Mathematical study of scattering resonances