The stability of a stratified shear layer is studied using the compressible magnetohydrodynamic (MHD) equations, including an effective gravity term to represent curvature effects of the flow and magnetic field line geometry. A general eigenvalue equation is derived for a two‐dimensional MHD fluid. For the case of a hyperbolic tangent shear flow and exponential density profile, it is found that in the Boussinesq approximation the compressibility raises the critical Richardson number from (1)/(4) to as much as (1)/(2) , with the exact value depending on the value of the magnetic field at infinity. Under the approximation of a strong asymptotic magnetic field, but without invoking the Boussinesq approximation, it is shown both analytically and numerically that the density gradient terms cause the shear instability to be dispersive. In particular, the long‐wavelength stability boundary for the case of Richardson numberJ=0 is characterized by a normalized phase velocityc=−1. This result implies that the solution for the stability boundary found by Satyanarayana, Lee, and Huba [Phys. Fluids30, 81 (1987)], which required thatc=−&bgr;/2 (where &bgr; is the ratio of the velocity and density gradient scale lengths), is not valid, in general.