The cosmological information extracted from photometric surveys is most robust when multiple probes of the large scale structure of the Universe are used. Two of the most sensitive probes are the clustering of galaxies and the tangential shear of background galaxy shapes produced by those foreground galaxies, so-called galaxy-galaxy lensing. Combining the measurements of these two two-point functions leads to cosmological constraints that are independent of the way galaxies trace matter (the galaxy bias factor). The optimal choice of foreground, or lens, galaxies is governed by the joint, but conflicting requirements to obtain accurate redshift information and large statistics. We present cosmological results from the full 5000 deg2 of the Dark Energy Survey's first three years of observations (Y3) combining those two-point functions, using for the first time a magnitude-limited lens sample (MagLim) of 11 million galaxies, especially selected to optimize such combination, and 100 million background shapes. We consider two flat cosmological models, the Standard Model with dark energy and cold dark matter (ΛCDM) a variation with a free parameter for the dark energy equation of state (wCDM). Both models are marginalized over 25 astrophysical and systematic nuisance parameters. In ΛCDM we obtain for the matter density ωm=0.320-0.034+0.041 and for the clustering amplitude S8σ8(ωm/0.3)0.5=0.778-0.031+0.037, at 68% C.L. The latter is only 1σ smaller than the prediction in this model informed by measurements of the cosmic microwave background by the Planck satellite. In wCDM we find ωm=0.32-0.046+0.044, S8=0.777-0.051+0.049 and dark energy equation of state w=-1.031-0.379+0.218. We find that including smaller scales, while marginalizing over nonlinear galaxy bias, improves the constraining power in the ωm-S8 plane by 31% and in the ωm-w plane by 41% while yielding consistent cosmological parameters from those in the linear bias case. These results are combined with those from cosmic shear in a companion paper to present full DES-Y3 constraints from the three two-point functions (3×2pt).