The evolution of the primary sex ratio, the proportion of male births in an individual's offspring production strategy, is a frequency-dependent process that selects against the more common sex. Because reproduction is shaped by the entire life cycle, sex ratio theory would benefit from explicitly two-sex models that include some form of life cycle structure. We present a demographic approach to sex ratio evolution that combines adaptive dynamics with nonlinear matrix population models. We also determine the evolutionary and convergence stability of singular strategies using matrix calculus. These methods allow the incorporation of any population structure, including multiple sexes and stages, into evolutionary projections. Using this framework, we compare how four different interpretations of sex-biased offspring costs affect sex ratio evolution. We find that demographic differences affect evolutionary outcomes and that, contrary to prior belief, sex-biased mortality after parental investment can bias the primary sex ratio (but not the corresponding reproductive value ratio). These results differ qualitatively from the widely held conclusions of previous models that neglect demographic structure.