Abstract

Modern models predict that galaxies do not evolve in isolation, but exist in haloes of dark matter and gas, embedded in the large-scale "cosmic web". To build a self-consistent model for how galaxies form and evolve, it is vital to understand how galaxies regulate their formation through interaction with the "circumgalactic medium" that surrounds them, and at present the nature and impact of these interactions is poorly-constrained by both theory and observations. This thesis presents new insights into how galaxies affect their surroundings through feedback processes, the impact of the properties of the CGM on galaxy evolution, and how the properties of galaxy-CGM ecosystems are fundamentally connected to the assembly histories of their dark matter haloes. I begin by examining the origin of scatter in the relationship between the gas fraction and mass of dark matter haloes hosting present-day ~L* central galaxies in the EAGLE simulations. The scatter is uncorrelated with the accretion rate of the central galaxy's black hole (BH), but correlates strongly and negatively with the BH's mass, implicating differences in the expulsion of gas by active galactic nucleus (AGN) feedback, throughout the assembly of the halo, as the main cause of scatter. Haloes whose central galaxies host undermassive BHs also tend to retain a higher gas fraction, and exhibit elevated star formation rates (SFRs). Diversity in the mass of central BHs stems primarily from diversity in the dark matter halo binding energy, as these quantities are strongly and positively correlated at fixed halo mass, such that ~L* galaxies hosted by haloes that are more (less) tightly-bound develop central BHs that are more (less) massive than is typical for their halo mass. Variations in the halo gas fraction at fixed halo mass are reflected in both the soft X-ray luminosity and thermal Sunyaev-Zel'dovich flux, suggesting that the prediction of a strong coupling between the properties of galaxies and their halo gas fractions can be tested with measurements of these diagnostics for galaxies with diverse SFRs but similar halo masses. I then examine the connection between the properties of the CGM and the quenching and morphological evolution of central galaxies in both the EAGLE and IllustrisTNG simulations. The simulations yield very different median CGM mass fractions as a function of halo mass, with low-mass haloes being significantly more gas-rich in IllustrisTNG than in EAGLE. Nonetheless, in both cases the scatter in the CGM mass fraction at fixed halo mass is strongly correlated with the specific star formation rate and the kinematic morphology of central galaxies. This feedback elevates the CGM cooling time, preventing gas from accreting onto the galaxy to fuel star formation, and thus establishing a preference for quenched, spheroidal galaxies to be hosted by haloes with low CGM mass fractions for their mass. In both simulations, the CGM mass fraction correlates negatively with the host halo's intrinsic concentration, and hence with its binding energy and formation redshift, primarily because early halo formation fosters the rapid early growth of the central black hole (BH). This leads to a lower CGM mass fraction at fixed halo mass in EAGLE because the BH reaches high accretion rates sooner, whilst in IllustrisTNG it occurs because the central BH reaches the mass threshold at which AGN feedback is assumed to switch from thermal to kinetic injection earlier. Despite these differences, there is consensus from these state-of-the-art simulations that the expulsion of efficiently-cooling gas from the CGM is a crucial step in the quenching and morphological evolution of central galaxies. The above results suggest a connection between the assembly histories of dark matter haloes and the properties of their galaxy-CGM ecosystems. I clearly demonstrate this connection by performing a controlled and systematic experiment in which I adjust the assembly history of a single EAGLE halo hosting a moderately star-forming Milky Way-like galaxy by ``genetically modifying" its initial conditions, keeping all other variables fixed. Shifting the halo assembly history to earlier times increases the integrated feedback injected by the AGN, ejecting a greater fraction of the CGM baryons and leading to the quenching and morphological transformation of the central galaxy. These effects can only have originated from differences in the assembly history of the halo, providing compelling evidence for this novel picture of the self-regulation of galaxy formation.