Non-modal mechanisms underlying transient growth of propagating acoustic waves and non-propagating vorticity perturbations in an unbounded compressible shear flow are investigated, making use of closed form solutions. Propagating acoustic waves amplify mainly due to two mechanisms: growth due to advection of streamwise velocity that is typically termed as the lift-up mechanism leading for large Mach numbers to an almost linear increase in streamwise velocity with time and growth due to the downgradient irrotational component of the Reynolds stress leading to linear growth of acoustic wave energy for large times. Synergy between these mechanisms along with the downgradient solenoidal component of the Reynolds stress produces large and robust energy amplification. On the other hand, non-propagating vorticity perturbations amplify due to kinematic deformation of vorticity by the mean flow. For weakly compressible flows, an initial vorticity perturbation abruptly excites acoustic waves with exponentially small amplitude, and the energy gained by vorticity perturbations is transferred back to the mean flow. For moderate Mach numbers, a strong coupling between vorticity perturbations and acoustic waves is found with the energy gained by vorticity perturbations being transferred to acoustic waves that are abruptly excited by the vortex. Calculation of the optimal perturbations for a viscous flow shows that for low Mach numbers, acoustic wave excitation by vorticity perturbations and the subsequent growth of acoustic waves leads to robust energy growth of the order of Reynolds number, while for large Mach numbers, synergy between the lift-up mechanism and the downgradient solenoidal component of the Reynolds stress dominates the growth and leads to a comparable large amplification of streamwise velocity. [ABSTRACT FROM AUTHOR]