  Galaxy-galaxy lensing measures the mean excess surface density DS(r) around a
sample of lensing galaxies. We develop a method for combining DS(r) with the
galaxy correlation function xi_gg(r) to constrain Omega_m and sigma_8, going
beyond the linear bias model to reach the level of accuracy demanded by current
and future measurements. We adopt the halo occupation distribution (HOD)
framework, and we test its applicability to this problem by examining the
effects of replacing satellite galaxies in the halos of an SPH simulation with
randomly selected dark matter particles from the same halos. The difference
between dark matter and satellite galaxy radial profiles has a ~10% effect on
DS(r) at r<1 Mpc/h. However, if radial profiles are matched, the remaining
impact of individual subhalos around satellite galaxies and environmental
dependence of the HOD at fixed halo mass is <5% in DS(r) for 0.1<r<15 Mpc/h. We
develop an analytic approximation for DS(r) that incorporates halo exclusion
and scale-dependent halo bias, and we demonstrate its accuracy with tests
against a suite of populated N-body simulations. We use the analytic model to
investigate the dependence of DS(r) and the galaxy-matter correlation function
xi_gm(r) on Omega_m and sigma_8, once HOD parameters for a given cosmological
model are pinned down by matching xi_gg(r). The linear bias prediction is
accurate for r>2 Mpc/h, but it fails at the 30-50% level on smaller scales. The
scaling of DS(r) ~ Omega_m^a(r) sigma_8^b(r) approaches the linear bias
expectation a=b=1 at r>10 Mpc/h, but a(r) and b(r) vary from 0.8 to 1.6 at
smaller r. We calculate a fiducial DS(r) and scaling indices a(r) and b(r) for
two SDSS galaxy samples; galaxy-galaxy lensing measurements for these samples
can be combined with our predictions to constrain Omega_m and sigma_8.
