Description
Understanding how environments impact galaxy evolution is pivotal in unraveling the interplay between internal processes and external environmental effects. Using cosmological hydrodynamical simulations (EAGLE, IllustrisTNG), we explore the environmental dependence of the gas-phase mass-metallicity relation (MZR) from z∼2.3 to z=0. We found that, at fixed stellar mass, central galaxies in massive halos exhibit lower metallicities than those in low-mass halos, driven by pristine gas accretion at high-z and AGN-driven outflows at low-z. Conversely, satellite galaxies in massive halos are more metal-rich due to suppressed gas replenishment and stripping. High-z protoclusters reveal a dichotomy: massive galaxies are metal-poor (dominated by gas-rich centrals), while low-mass galaxies are metal-rich (influenced by satellite processes), aligning with observations like MAMMOTH-Grism. These results highlight distinct environmental mechanisms for centrals and satellites—accretion dynamics and AGN feedback versus strangulation and stripping—underscoring the critical role of environment in modulating metallicity across cosmic time. Our findings bridge simulations and observations, offering a framework to decode environmental signatures in galaxy evolution.