We investigate galaxy clustering and the correlations between galaxies and mass in the \Lambda CDM cosmological model ( inflationary cold dark matter with \Omega _ { m } = 0.4 , \Omega _ { \Lambda } = 0.6 , h = 0.65 , n = 0.95 , \sigma _ { 8 } = 0.8 ) , using a large , smoothed particle hydrodynamics simulation ( SPH , with 2 \times 144 ^ { 3 } particles in a 50 h ^ { -1 } { Mpc } cube ) . Simulated galaxies can be unambiguously identified as clumps of stars and cold gas a few kpc to a few tens of kpc across , residing in extended halos of hot gas and dark matter ; the space density of the resolved galaxy population at z = 0 corresponds to that of observed galaxies with luminosity L \gtrsim L _ { * } / 4 . We investigate the galaxy correlation function , the pairwise velocity dispersion and mean pairwise velocity , and the second and third moments of counts-in-cells ; we also investigate the galaxy-mass correlation function and the average extended mass distributions around galaxies , both of which can be measured via galaxy-galaxy lensing . For the most part , the predicted biases between galaxies and dark matter lead to good agreement with current observations , including : ( 1 ) a nearly constant comoving correlation length from z = 3 to z = 0 for mass-selected galaxy samples of constant comoving space density ; ( 2 ) an rms bias factor b _ { \sigma } \approx 1 at z = 0 ; ( 3 ) a scale-dependent bias on small scales that transforms the curved dark matter correlation function into a nearly power-law galaxy correlation function ; ( 4 ) galaxy pairwise dispersion and hierarchical skewness ratio S _ { 3 } in good agreement with observed values , and lower than values for the dark matter by \sim 20 \% ; ( 5 ) a ratio of galaxy-galaxy to galaxy-mass correlation functions consistent with recent measurements from the Red Cluster Sequence survey ; and ( 6 ) a mean excess mass \Delta M ( 260 h ^ { -1 } { kpc } ) approximately proportional to galaxy baryon mass M _ { b } , in agreement with estimates from the Sloan Digital Sky Survey ( SDSS ) . All of these clustering properties vary with galaxy baryon mass and , more strongly , with the age of a galaxy ’ s stellar population . The predicted dependences are in good qualitative agreement with the observed dependence of galaxy clustering and the galaxy-mass correlation function on galaxy type . The predicted ratio \Delta M ( 260 h ^ { -1 } { kpc } ) / M _ { b } is lower than the SDSS estimates by a factor of \sim 1.5 - 2 for galaxies with M _ { b } \gtrsim 2 \times 10 ^ { 11 } M _ { \odot } . A test with a higher resolution ( smaller volume ) simulation suggests that this discrepancy is mostly a numerical artifact ; if so , then the SDSS weak lensing comparison leaves little room for feedback or other astrophysical processes to reduce the stellar masses of luminous galaxies , at least given our adopted cosmological parameters . On the whole , our results show that the \Lambda CDM model and the galaxy formation physics incorporated in the SPH simulation give a good account of observed galaxy clustering , but anticipated improvements in clustering and weak lensing measurements will soon test this picture in much greater detail .