Unveiling the Complex Circumgalactic Medium: A Comparative Study of Merging and Non-Interacting Galaxy Groups

While most galaxies live in group environments where they undergo an accelerated evolution, the characteristics of their circumgalactic medium (CGM) remain uncertain. We present an analysis of the CGM of two galaxy groups in different stages of interaction: (G1) a close pair of galaxies ($z=0.043$) separated by 87 kpc that do not show signs of interactions and (G2) four merging galaxies ($z=0.098$) separated by 10 kpc. We present spatially-resolved Keck/KCWI galaxy observations and HST/COS quasar spectra (G1 at 48 kpc and G2 at 100 kpc away) to quantify both the resolved galaxy and CGM properties in these two different group environments. G1 contains two typical star-forming galaxies with no evidence of strong outflows. G2 contains two star-forming, one post-starburst and one quiescent galaxy. Both groups have a range of CGM detected metal lines (HI, CII, SiII, SiIII, NV and OVI). Despite G2 being twice as far from the quasar, G2 has $\log (N(HI)/{\rm cm}^{-2})=17.33$, compared to $\log (N(HI)/{\rm cm}^{-2})=16.43$ for G1. We find that the CGM of the merging galaxies (G2) is more kinematically complex, is in a higher ionisation state, spans a wider range of metallicities and column densities, has smaller cloud sizes, and is inconsistent with the simple superposition model that seems to match well with G1. We conclude that the complexity of the CGM in merging galaxies surpasses that of not strongly interacting galaxies, suggesting that mergers play a significant role in shaping the intricate structure of the CGM.


INTRODUCTION
The gas that resides outside the interstellar medium but within the virial radius of galaxies is known as the circumgalactic medium (CGM), where approximately 50% of the baryonic mass in galaxy halos are located (Werk et al. 2014).Various processes associated with the CGM such as outflows, inflows and gas recycling are fundamental to understanding galaxy evolution (e.g., Tumlinson et al. 2017).The CGM is normally too diffuse to detect in emission, so it is typically detected through absorption, using bright background quasars (QSOs; e.g.Lanzetta et al. 1995;Chen et al. 1998;Churchill et al. 2000;Kacprzak et al. 2008;Nielsen et al. 2013;Prochaska et al. 2017;Péroux et al. 2022) or gravitationally lensed galaxies (Lopez et al. 2018(Lopez et al. , 2020;;Mortensen et al. 2021;Tejos et al. 2021;Fernandez-Figueroa et al. 2022; Barone et al. 2024) as background sources.
Most galaxies live in group environments or were located in one ★ E-mail: antoniafernandez@swin.edu.au in the past (e.g.Tully 1987;Garcia 1993;Eke et al. 2004).Therefore, understanding the group CGM is fundamental to understanding the evolution of most galaxies in the Universe.However, the vast majority of CGM studies have not considered galactic environment, leaving many unanswered questions about a vital period in every galaxy's history.Recent work has found that the CGM in group environments is more extended and kinematically complex (Chynoweth et al. 2008;Chen et al. 2010;Bordoloi et al. 2011;de Blok et al. 2018;Nielsen et al. 2018;Dutta et al. 2020;Huang et al. 2021), going to distances up to 140 kpc from the centre of the group, although it is anisotropic in its spatial distribution (Fossati et al. 2019;McCabe et al. 2021).Moreover, it has been theorised that the CGM of groups is directly affected by interactions between their galaxies, such as mergers, tidal streams and gas transfers between galaxies, making the CGM more complex in these cases (Bowen et al. 1995;Churchill & Charlton 1999;Kacprzak et al. 2010b,a;Anglés-Alcázar et al. 2017;Nateghi et al. 2021;Nielsen et al. 2022).This opens the possibility that the CGM absorption associated with group galaxies belongs to multiple galaxies within the group (Kacprzak et al. 2010a;Bielby et al. 2017;Péroux et al. 2017Péroux et al. , 2019;;Pointon et al. 2017Pointon et al. , 2020;;Rahmani et al. 2018;Nielsen et al. 2018;Hamanowicz et al. 2020;Lehner et al. 2020;Cherrey et al. 2023).While Mg ii absorption strength tends to be higher in group environments (Bordoloi et al. 2011;Nielsen et al. 2018;Dutta et al. 2018), multiple observational studies have found a decrease in both Civ (Burchett et al. 2016) and Ovi (Pointon et al. 2017;McCabe et al. 2021) covering fractions and kinematics associated with group galaxies at low redshifts.This trend is due to the CGM of group galaxies having a higher temperature (Bielby et al. 2017;Ng et al. 2019;Zahedy et al. 2019) that allows ions to go into higher ionisation states, a phenomenon also found in simulations (Oppenheimer et al. 2016(Oppenheimer et al. , 2021;;Wĳers & Schaye 2022).It is important to note that while the CGM of group galaxies is dominated by the hot phase ( ∼ 10 7 K), there is still gas in the warm ( ∼ 10 5 K) and cool ( ∼ 10 4 K) phases.
Galaxy mergers are quite common in group environments.It is well-known that interactions between galaxies trigger star formation both from simulations (Barnes & Hernquist 1996;Mihos & Hernquist 1996;Tissera et al. 2002;Di Matteo et al. 2007;Montuori et al. 2010;Renaud et al. 2014) and observations (Larson & Tinsley 1978;Barton et al. 2000;Alonso et al. 2004;Nikolic et al. 2004;Woods et al. 2006;Woods & Geller 2007;Ellison et al. 2008;Heiderman et al. 2009;Knapen & James 2009;Robaina et al. 2009;Ellison et al. 2010;Patton et al. 2011;Pan et al. 2018).Furthermore, star formation drives outflows (e.g.Heckman et al. 2000;Rubin et al. 2014;Reichardt Chu et al. 2022, 2024), which could indicate that the CGM of merging galaxies might be dominated by outflowing gas.Indeed, simulations suggest this is true, Hani et al. (2018) found that mergers increase the physical extent and metallicity of the CGM, and that outflowing gas dominates the CGM kinematics.Sparre et al. (2022) found that merging events can decrease the metallicity in the centre of the host galaxy through these outflows.Simulations further suggest that one of the causes of the increased temperature in the group CGM is heating through mergers (Cox et al. 2004(Cox et al. , 2006;;Sinha & Holley-Bockelmann 2009;Moreno et al. 2019).However, a later study concluded that mergers are not the main determinant of the CGM in group environments, with other processes, such as AGN feedback, having a more important role (Hani et al. 2019).Observational studies have found that merging events can be associated with higher Hi column densities (Dutta et al. 2018), large velocity offsets between absorbers and their host galaxies (Keeney et al. 2011;Johnson et al. 2015;Rupke et al. 2019), and diluted metallicities in their host galaxies (Bustamante et al. 2020;Calabrò et al. 2022).Unfortunately, observational studies of the CGM of merging galaxies have focused on small samples and inhomogeneous environments, so more studies are necessary to understand its characteristics.
To further investigate the effect of mergers in the CGM, we analyse two galaxy groups located near the line of sight of the same QSO.The first group, hereafter Group 1, features two nearby galaxies at  = 0.043 that are separated by 87 kpc and do not appear to be strongly interacting (see Fig. 1 (top)).The QSO line-of-sight is located 40 kpc from G1a and 55 kpc from G1b.The second group, hereafter Group 2, has four merging galaxies.The configuration of this group is displayed in Fig. 1 (bottom).It contains three starforming galaxies (G2a-c) and one quiescent galaxy (G2d), all located at  G2 = 0.09849.The QSO line-of-sight is located 100 kpc from the galaxies.These two systems have galaxies at different stages of interaction.As such, we may expect to find key differences in their CGM, which we explore in this paper.Using Keck/KCWI IFU data, we are able to directly compare the resolved galaxy properties to those of their CGM.At the top we have G1a and G1b, a pair of galaxies at  = 0.043 which are not strongly interacting, the background QSO is at the center and G2a-d, the strongly interacting group of four merging galaxies at  = 0.098, is at the bottom.There is an unrelated object to the North-East of the merging system.Bottom: zoom-in into the merging system, highlighting each of the galaxies that belong to it and the labels that will be used throughout this paper.
This paper is organised as follows: Section 2 details our datasets and all the methods used to analyse them.Results of the distant pair are described in Section 3, while those of the merging system are detailed in Section 4. These results are consequently discussed in Section 5. Finally, Section 6 offers a summary and presents the final conclusions of the paper.We assume a flat Λ cold dark matter (ΛCDM) Universe with Ω Λ = 0.7, Ω  = 0.3, and  0 = 70 km s −1 Mpc −1 , and a Kroupa initial mass function (Kroupa 2001).The columns are: (1) Right ascension, (2) declination, (3) redshift, (4) impact parameter, (5) inclination angle, (6) bulge-to-total ratio, (7) azimuthal angle,(8) total star-formation rate, and (9) mean   parameter. The SFR was calculated using O ii.

DATA AND ANALYSIS
The quasar field we studied in this paper is displayed in Fig. 1 and properties of the galaxies are shown in Table 1.We have observed two galaxy groups in the quasar field J0832+243.
The groups were originally identified as a single candidate compact group by McConnachie et al. (2009), given the isolated nature of four bright galaxies in proximity to each other.Upon spectroscopic followup, the visually identified compact group was actually two groups.There are no other objects that have been identified at the redshift of our now two groups.However, the Arecibo Legacy Fast ALFA survey (ALFALFA; Haynes et al. 2011) has identified Hi detection at the redshift of G1.This provides a Hi mass of log(M/M ⊙ ) = 10.1.
In the following subsections, we present the data reduction and analysis of our Keck/KCWI IFU data, HST/COS spectroscopy, and Sloan imaging of the field.The IFU data were used to obtain resolved galaxy properties, the COS data were used to characterize the physical conditions of the multiphase CGM, and the Sloan imaging was used to model the morphological properties of the galaxies.

KCWI integral field spectroscopy
Observations of the galaxies were performed with the Keck Cosmic Web Imager (KCWI; Morrissey et al. 2018) on 2022 March 3 UT (PID: 2022A_W230) using the large slicer and BL grating with a wavelength centre of 4500 Å and 2 × 2 binning.The large slicer has a field-of-view of 33 ′′ × 20.4 ′′ .The BL grating has a resolving power of 900 (1.75 Å pix −1 or 128 km s −1 ) and a wavelength range of 3500 ≲  ≲ 5500 Å.We took one exposure centred on G1a, another centred on G1b and a third centred on the G2 group.Each of these exposures was 300 s long.
We used the IDL version of the KCWI Data Reduction Pipeline (DRP) 1 with standard settings but skipped the sky subtraction step to aid in additional flat-fielding at a later stage.A flux calibration was performed in the last step of the DRP using the standard star bd33d2642 from the DRP star list.A residual illumination gradient was later removed and the sky was subtracted following the procedure of Nielsen et al. (2022).The data were reprojected onto square spaxels with 0.29 ′′ sides using Montage2 with default settings.Because this reprojection oversamples the original data (we did not dither the observations since we only obtained one exposure per galaxy), these spaxels were then spatially binned 3 × 3, resulting in a pixel size of 0.87 × 0.87 arcsec 2 to match the seeing of the observations.While this binning accounts for most of the oversampling, the final rebinned cube is oversampled in the slice direction by 1.6 spaxels.The final spatial resolution of each spaxel at the redshift of the galaxies is 0.72, 0.69 and 1.08 kpc for the G1a, G1b and G2 respectively.Additional details about the reduction process can be found in Nielsen et al. (2022).The Galactic extinction was corrected using a Cardelli et al. (1989) attenuation law.The value of the   parameter at the right ascension and declination of the galaxies was calculated using the NED Extinction Calculator. 3he pPXF software (Cappellari & Emsellem 2004;Cappellari 2017Cappellari , 2022)), which is designed for stellar continuum modelling, was used to fit the stellar H  absorption in order to obtain the correct H  emission-line flux.We used the templates from the Extended Medium resolution INT Library of Empirical Spectra (E-MILES, Sánchez-Blázquez et al. 2006), with BaSTI isochrones (Pietrinferni et al. 2004(Pietrinferni et al. , 2006)), and a Kroupa IMF.These templates span a range of 53 ages from 0.03 to 14.00 Gyr, 12 [Z/H] values from −2.27 to 0.40, and have [/Fe] values scaled to the solar neighbourhood (base models; Vazdekis et al. 2016).The software was run with an additive polynomial of order 12 (see van de Sande et al. 2017).The pPXF continuum subtraction was performed only on the spaxels that had a continuum SNR > 5, along with an additional polynomial fit around the emission lines we were interested in ([O ii] 3727, 3729, [Oiii] 4959, 5007, H  and H ).This second polynomial fit was used to anchor the zero-flux level while fitting Gaussians to the emission lines.In the case of spaxels with SNR < 5, only the polynomial fit around the lines was performed.
After subtracting the continuum, we corrected for the intrinsic dust extinction within each galaxy using the equations described in Cardelli et al. (1989).The   parameter was calculated using the ratio between the flux of the H  and the H  lines.Equations 3 and 4, and Table 2 of Calzetti (2001) were used to calculate  ( − ).The flux from the two lines was calculated by fitting a Gaussian model to them.Both lines were assumed to come from the same gas so that they would have the same velocity and velocity dispersion.Having calculated  ( − ), we transformed it into   assuming the standard of   = 3.1.The average   values for each galaxy are presented in Table 1.

Galaxy morphologies
SDSS r-band images were used to model galaxy properties such as inclinations, azimuthal angles and impact parameters (e.g., Kacprzak et al. 2011Kacprzak et al. , 2012Kacprzak et al. , 2019) ) by fitting a bulge+disk model to the galaxies in the G1 pair using Galaxy IMage 2D (Simard et al. 2002) where the models were convolved with the instrument's point spread function.The surface brightness of the disk component was modelled using an exponential profile, while the bulge component was modelled using a Sersic profile (Sersic 1968).The galaxies' centroids were extracted using Source Extractor (Bertin & Arnouts 1996).It was not possible to perform this analysis on G2 galaxies, as their morphology is more complicated.This work defines azimuthal angle (Φ) as the angle between the galaxy's projected major axis and the background quasar sightline.Results of this analysis are shown in Table 1.

Gas-phase kinematics
The spectra of G1a, G1b, G2a and G2b have significant detections of the [Oii] 3727, 3729 (≥ 5), H  (≥ 3) and [Oiii] 5007 (≥ 3) emission lines.G2c only has significant [Oii] (≥ 5) emission lines detected.Using an in-house Python software, we simultaneously fitted a single Gaussian to the H  and [Oiii] lines and a double Gaussian to the [Oii] 3727, 3729 doublet, assuming that all the lines for a given galaxy have the same velocity centroid.Additionally, we assumed the two lines in the [Oii] 3727, 3729 doublet have the same FWHM and that the ratio in the amplitude of the two lines range between 0.5 and 2. The results of these fits were used to create velocity maps and measure the physical properties of the galaxies.G2d did not have any emission lines and we are unable to compute gas-phase properties for this galaxy.The stellar kinematics for G2d are described in Section 2.2.5.
The galaxies in G2 were deblended by analysing the kinematics of the system.We found that G2c is rotating perpendicular to G2a, while G2d has a much lower redshift compared to G2b.Additionally, we looked into differences in the spectra of the different galaxies, with the difference between G2b and G2d being the most significant.G2b has the characteristics of being a post-starburst galaxy (its H  equivalent width is 4.3 Å), while G2d does not have any emission lines and only Ca ii H&K absorption is present, indicating that we are looking at different galaxies.
Here, we modelled the emission (G1a, G1b, G2a, G2b, G2c) and absorption (G2d) kinematics of our galaxies using the 3DBarolo software (Di Teodoro & Fraternali 2015), which creates a 3D rotating disk model to the kinematic data by fitting a rotation model in concentric rings.A first fit was performed for each of our galaxies, allowing us to derive a rotation curve for each of them.The rotation curve was assumed to have the following shape: where  max is the maximum velocity and   is the turnover radius.Best-fit parameter values for each of our galaxies were found, which allowed us to extend the models up to the location of the quasar.The software was used a second time with the extended parameters and an extended rotation model was obtained to compare with the quasar absorption kinematics.

Star Formation Rates
The star formation rates (SFR) were calculated using the following equation: where  H  / H  is the intrinsic luminosity ratio (Calzetti 2001) is the observed H  luminosity, and  H  = 10 −41.257 is the scale parameter from Hao et al. (2011), assuming a Kroupa IMF (Kroupa 2001),  ⊙ , 100 Myr model.The extinction parameter  H  was assumed to be 0 since the dust extinction correction had already been performed.While it is covered, we are not able to detect H  emission in G2c, so its SFR has to be calculated using the [O ii] emission lines.The method described in Kewley et al. (2004) was used.This method assumes a Salpeter IMF (Salpeter 1955), so we changed to a Kroupa IMF using the conversion described in Speagle et al. (2014).G2d does not have any emission lines, so we could only compute the SFR 3 upper limits from the H  line.
Outflows are found to be more common at higher Σ SFR , and observations of them become quite rare below Σ SFR < 0.1 M ⊙ yr −1 kpc −2 (Heckman 2002;Heckman et al. 2015;Reichardt Chu et al. 2022).We, therefore, derive Σ SFR measurements using the aforementioned SFR and the sizes of our spaxels measured in Section 2.1.

Gas-phase metallicities and ionization
The metallicity of the gas in the CGM can be used as an indicator of its origin.When the CGM gas has a similar or higher metallicity compared to its host galaxy it is likely coming from outflows (e.g., Péroux et al. 2020;Cameron et al. 2021).Conversely, if the gas has a lower metallicity compared with its host galaxy, it might be attributed to tidal streams and, for the lowest metallicities, accretion.Here, the  23 and  32 parameters were used to estimate oxygen abundances and ionisation parameters of the galaxies' ISM using the methods of Kobulnicky & Kewley (2004).A first initial value for the oxygen abundance was calculated using the methods from Zaritsky et al. (1994) and McGaugh (1991) and averaging the results.This initial value was used to decide which branch of  23 to use.In this method, oxygen abundances and ionisation parameters are highly dependent on each other, so it is necessary to iterate until the method converges to a valid solution for both quantities.Only two iterations were needed in this case before the method converged.These values and maps will be used to compare the ISM with our CGM measurements.In order to compare the CGM to the galaxy ISM, we normalise the ISM metallicity to Z ⊙ ≈ 0.015 and 12 + log(O/H) ⊙ = 8.72 (Allende Prieto et al. 2001).
We also modelled the metallicity gradients of our galaxies.Following the methods of Klimenko et al. (2023), we compute two gradients: 1) an azimuthally averaged gradient using all the possible spaxels and 2) one assuming an angular window of 30 • .Both are computed since there could be azimuthally-dependent variations in the metallicity gradients.Both are fit using a first-order polynomial.It is expected that earlier-type galaxies have negative metallicity gradients, while the slope becomes more shallow in the case of late-type galaxies (Sánchez 2020).

Stellar population modelling
We used pPXF to model the kinematics of the stellar populations of galaxies G1a, G1b, G2a, G2b, and G2c.The E-MILES templates were once again used with BaSTI isochrones and a Kroupa IMF.The emission lines were masked to keep only the stellar component of the spectra and corrected for Galactic extinction and intrinsic dust extinction.We used spaxels with a continuum SNR of ≥ 5 for the analysis.An order 12 additive polynomial was used to model the stellar kinematics.
In the case of G2d, the SNR was too low to perform reliable modelling with pPXF, but its spectra featured Ca ii H&K absorption.
To study the kinematics of this galaxy, further binning was applied to our KCWI spectra and a double Gaussian model was fitted to the absorption.The results of these fits were used to model the kinematics of this galaxy following the same methods explained in Section 2.2.2.

Quasar spectroscopy and photoionization modelling
The CGM analysis is based on HST/COS observations of the QSO J083220+243100 ( qso = 1.30325) obtained under the Program ID 14071 (PI Borthakur).The COS observations at intermediate resolution (R∼20,000) span the wavelength range 1140 − 1450 Å with total exposure of 4800 s in the G130M far-UV grating.The coadded spectrum was taken from the HSLA archive (Peeples et al. 2017).The spectrum was rebinned to two wavelength pixels per resolution element of 0.06 Å.The rebinned spectrum was continuum normalized using lower-order polynomials to define the continuum level.The two galaxy groups are located at different redshifts ( = 0.043 for the G1 group and  = 0.098 for the G2 group), so their absorption lines do not overlap.At these redshifts, we have spectral coverage for Ly , Cii, Siii, Siiii, Nv, and O vi.However, we do note that cloud 2 in G2 (see Fig. 13 and Tables 4 and 5) may be blended with a tentative absorption system that could contain Ly  and Ciii at only  = 0.3571.Thus, values determined for cloud 2 should be taken with caution.
Group environments are likely to have a complicated CGM from galaxy-galaxy interactions and there are usually multiple velocity components, or clouds, along a given line of sight.We modelled the absorption in both systems using the Cloud-by-cloud Multiphase Bayesian Modelling method described in Sameer et al. (2021Sameer et al. ( , 2022Sameer et al. ( , 2024) ) to quantify those variations.This method uses Cloudy (Ferland et al. 2017) to characterize the physical conditions of the different clouds that produce the absorption in the data.Cloudy is used to generate a grid with different values of metallicity (), hydrogen number density ( H ), and neutral hydrogen column density ( (Hi)), at the redshift of the absorption, assuming the KS19 (Khaire & Srianand 2019) extragalactic background radiation as the photoionizing radiation field.This grid is then explored by adopting a nested-sampling approach implemented using PyMultinest (Buchner et al. 2014).Depending on the number of clouds needed to explain the observed absorption in multiple transitions, Voigt Profiles (VPs) are synthesized for each cloud (convolved with the line spread function for the appropriate COS grating) and compared with the observed data in multiple transitions, yielding a distribution for modelled parameters.Typically, all of the observed line transitions cannot be reproduced with one phase of gas.In many instances, a photoionization model that accurately reproduces the observed low-ionization absorption (e.g., Si ii, Si iii) fails to generate requisite high-ionization absorption (e.g., N v, O vi).Under such circumstances, we model such absorption using hybrid models with contributions from collisional and photoionization.After applying this method, each cloud in the absorption system is characterized by six parameters: log , log  H , log , log  (HI), , and   .We adopt uniform priors on log , log  H , log , and log  (HI) in the ranges log  ∈ [−3.0,1.5],log  H ∈ [−6.0, 0.0], log  ∈ [2.0, 6.5], log  (HI) ∈ [12.0, 19.0].We use a uniform prior on   (the non-thermal contribution to the Doppler parameter of a cloud) ranging between [0,  + 2()] where  is the Doppler broadening parameter determined from a preliminary VP fit.We determine the Doppler broadening parameter  for all transitions using the equation  2 =  2 nt +  2 t , where  t = √︁ 2/ is the line broadening due to temperature and  nt the line broadening due to non-thermal effects.The non-thermal broadening component is assumed to be the same for all the transitions in the same cloud.

G1 -DISTANT PAIR RESULTS
In Section 3.1, we present the galaxy properties (SFR, gas kinematics, stellar kinematics, metallicities, etc.) of G1a and G1b in the distant pair.We then present the CGM properties in Section 3.2, followed by an analysis connecting the galaxy and CGM properties in Section 3.3.A further discussion of the origin of the CGM is presented in Section 3.4.

G1 -Galaxy properties
G1 has two galaxies: one moderately inclined (G1a, see Fig. 2(a),  G1a = 0.04320) and another edge-on (G1b, see Fig. 3(a),  G1b = 0.04308).Both have reasonably symmetric morphologies and rotation fields, which is an indication that they are not strongly interacting.General properties of these galaxies are listed in Table 1.They are at impact parameters of 40.4 kpc and 55.4 kpc from the quasar line-of-sight, respectively, while the two galaxies are separated from each other by 86.7 kpc (see Fig. 1).G1a is moderately inclined at  = 40 • , while G1b is edge-on with an inclination angle of  = 89  and 3( d).The stars and gas in G1a are rotating in the same direction with similar rotation velocities, and this is also true for G1b.The coherence between the stars and gas in both galaxies, along with the symmetric and smooth rotation maps are further evidence that the two galaxies are not strongly interacting.G1a has a maximum gas rotation velocity of 237 km s −1 and G1b of 245 km s −1 .Both galaxies have blueshifted rotation velocities towards the QSO line-of-sight.
Gas abundance maps can be found in Figs.2(f) and 3(f).The median gas oxygen abundance of G1a is 12+log(O/H) = 8.80±0.11.Its abundance peaks close to the centre at 12 + log(O/H) = 9.00 ± 0.06 and decreases to 12 + log(O/H) = 8.41 ± 0.18 out to 6.5 kpc.The median oxygen abundance of G1b is 12 + log(O/H) = 8.76 ± 0.13, which is within uncertainties of G1a.In the case of G1b, we see low abundances along the major axis where accreting gas is expected to merge onto the disk, and high abundances along the minor axis where outflowing gas is ejected.These results are expected signatures of baryon cycle gas flows for star-forming galaxies.We explore the galaxy gradients and their relation to the CGM metallicities in Section 3.3.
None of the galaxies in G1 are particularly star-forming, with G1a having a SFR of 3.68 ± 0.10 M ⊙ yr −1 and G1b of 0.54 ± 0.02 M ⊙ yr −1 .To explore the possibility of outflows occurring within the galaxies, we examine the Σ SFR .Σ SFR are displayed in Figs.2(c) and 3(c).The total Σ SFR of G1a and G1b are 0.0245 +0.02 −0.01 and 0.0107 +0.01 −0.00 M ⊙ yr −1 kpc −2 , respectively.In both cases, the Σ SFR is higher near the centre and decreases with distance.Both G1a and G1b have a total Σ SFR below the threshold required to produce strong star formation-driven outflows (e.g., Heckman et al. 2015).Nine spaxels in G1a have a Σ SFR marginally   higher than the threshold, with one spaxel reaching a maximum value of 1.41 ± 0.15 M ⊙ yr −1 kpc −2 .In the case of G1b, only two spaxels are above the threshold, going up to 0.27 ± 0.02 M ⊙ yr −1 kpc −2 .Therefore, it is possible that these small regions are currently producing outflows, but outflows are likely not occurring throughout the disks.
To determine whether these galaxies have AGN, we explore the line-ratio diagram (Lamareille 2010).We produced line-ratio diagrams for each galaxy, which includes all spaxels with all lines detected above 5, as shown in Fig. 4. The figure shows that the vast majority of the galaxy is consistent with typical star-forming regions.Only six spaxels reside in the AGN region, however the 1 uncertainty bars on these points show the data is consistent with originating from star-forming regions.Furthermore, these points reside at distances of 5-6 kpc from the galaxy centre, so it is also unlikely they are connected to a central AGN.In the case of G1b, we see a similar trend as only three spaxels are in the AGN region, but they have large error bars and are still consistent with star-forming activity.Therefore, it is unlikely that these two galaxies currently have active AGN.The columns are: (1) ion, (2) component, (3) velocity of the cloud relative to  = 0.04318, (4) equivalent width, and (5) column density.

G1 -CGM absorption properties
We identified H i, Cii, Siii, Siiii, and N v absorption in the quasar spectrum.The rest-frame equivalent widths and column densities of these ions, as well as their individual cloud rest-frame equivalent widths and column densities, are detailed in Table 2.The total H i column density of the system is log  (Hi/cm −2 ) = 16.43 +0.03 −0.04 .As shown in Fig. 5, this system is determined to comprise three clouds, where two were constrained by the low/intermediate ionisation ions (clouds 1 and 2 in Fig. 5) and the third was constrained by the high ionisation ions (cloud 3 in Fig. 5).The absorption in Hi arises from both the low/intermediate and high ionisation phases, with most of the column density arising from the low/intermediate phase (log  (H i/cm −2 ) = 16.36 +0.05 −0.05 ).The velocities, hydrogen column densities, Doppler parameters, hydrogen densities, metallicities, temperatures, and sizes of each cloud are displayed in Fig. 6 and tabulated in Table 3.The two clouds of the lower ionisation phase have column densities of log  (Hi/cm −2 ) ≈ 16, metallicity comparable to or greater than solar, a size of ≤ 3 kpc, hydrogen number densities of log( H /cm −3 ) = −3, and temperatures of  = 10 4 K. On the other hand, the higher ionisation component has a much lower column density at log  (Hi/cm −2 ) = 14, while at the same time, it has a much higher temperature of  = 10 5.5 K.The temperature, size and hydrogen number density are unconstrained on this cloud.and G1b, where strong Hi, Siii, Siiii and Nv absorption is detected.The velocity zero-point is defined as the redshift of G1a and is represented by the vertical blue dashed line.Additionally, the redshift of G1b is indicated with the orange dashed line.Black and grey curves indicate the data and the 1 uncertainty, respectively.Three clouds were fitted to this absorption system, where their profiles are colour-coded by thick solid curves and their velocity centroids are noted by the vertical ticks.The dashed cyan line indicates the total fit to the absorption profile.The grey-shaded areas were not considered in the modelling.

G1 -Comparing the CGM and ISM
We have presented the properties of the galaxies along with those of absorption in the previous two subsections.Here we explore the possible connections between the galaxies in the distant pair and their CGM.
First, we explore the kinematic connection between the galaxies and their CGM.Low ionisation absorption has been shown to be consistent with the co-rotation velocities of the galaxy (e.g.Steidel et al. 2010;Kacprzak et al. 2010a;Ho et al. 2017;Rahmani et al. 2018;Weng et al. 2023;Nateghi et al. 2023a,b).These models are displayed in Fig. 7, with the contours showing the location of the galaxies, the yellow star displaying the position of the quasar and the pie charts presenting the velocities of the clouds found in the absorption (see Fig. 5 and Table 3), using the galaxies' redshifts as the velocity zero-point.The colour of the outer ring of the pie chart corresponds to the colour of the specific clouds in all other figures.
If we assume that the CGM gas is co-rotating, lagging or accreting into the ISM, we would expect to see the velocities of the absorption to lie between the galaxy systemic velocity and the velocity of the model in the location of the quasar (e.g., Steidel et al. 2002).The velocity ranges at the location of the quasar are shown in Fig. 6 as the blue-shaded area for G1a and the orange-shaded area for G1b.It is clear that two of the clouds match the velocity range of G1a and G1b (clouds 2 and 1, respectively).Both of these clouds are in the low-ionisation phase and have kinematics consistent with an accretion model.The higher ionisation component (cloud 3) is at higher velocities in the direction opposite to the rotation direction of both galaxies.
The range of metallicities of the ISM, defined as the median ± standard deviation, is shown in Fig. 6 as the blue hatched area for G1a and the orange hatched area for G1b.Metallicity gradients can be seen in Figs. 8 and 9.In the case of G1a, the metallicity decreases with distance, both in the direction of the quasar (with a slope of 14 16 −0.051± 0.017 dex kpc −1 ) and in general (with a slope of −0.015 ± 0.004 dex kpc −1 ).On the other hand, the metallicity of G1b increases with distance in both the direction of the quasar and in general, but the slope is shallow (0.010 ± 0.006 dex kpc −1 ), although this could be an effect of the galaxy's edge-on inclination, which makes the metallicity more likely to be a reflection of the outer regions of the disk at all radii.In the case of G1a, its average ISM metallicity is not consistent with any of the clouds, although it is within 1.5 of cloud 1.If we look at the gradients, cloud 1 is consistent with the overall gradient, while cloud 3 is consistent with the angular window gradient.Whereas in the case of G1b, none of the clouds are consistent with the average metallicity of the ISM, but the positive gradient makes it match with cloud 2 in both the direction of the quasar and as a general trend.Altogether, cloud 2 is consistent with the rotation of G1a, while cloud 1 is consistent with the rotation of G1b.However, cloud 2 is consistent with the metallicity gradient of G1b and cloud 1 matches the metallicity gradient of G1a.The only high ionisation cloud, cloud 3, does not match the velocity or metallicity gradient of either galaxy in this pair.

G1 -Origin of the CGM absorption
Given the properties of galaxies G1a and G1b, as well as the three clouds along the quasar sightline described in the previous sections, we attempt to ascertain the physical origin of these clouds.
First, we explore the possibilities of the absorption arising from outflows.The CGM originating from outflowing gas from G1b is unlikely given the star formation surface density of G1b, and the Figure 8. Left: Gas metallicity map of G1a.The blue line connects the centre of G1a with the quasar and represents the quasar angle (QA).We selected the spaxels that were within 30 • of aperture from this line.The selected spaxels are highlighted in blue.Right: Gas metallicity vs. distance.All of the spaxels are shown in grey, while those along the quasar direction aperture are shown in blue.We performed a linear fit to both of these samples, and the best fits are represented with the grey and blue lines, respectively.It is clear that the metallicity of G1a decreases with distance from its centre.The violin plots represent the metallicities of the different clouds in the CGM.
extremely large opening angle (/2 > 70 degrees) required for the quasar to probe outflowing gas from G1b. G1a has a more optimal orientation for the quasar to probe its outflow.Following the methods of Ho & Martin (2020) to deduce the sign of the disk inclination, we infer that we are viewing G1a such that a possible outflow in the direction of the quasar would be pointed away from the observer with redshifted velocities.Cloud 3 is consistent with this scenario and has a velocity offset of 59 km s −1 with respect to G1a, which is within a reasonable range for outflow velocities (Nielsen et al. 2017).The properties of cloud 3 suggest that it is in higher ionisation phases, low column density, but potentially low metallicity.If cloud 3 did originate from an outflow, then it no longer contains ISM metallicity and may have mixed with the ambient CGM.
We next explore whether some of the CGM absorption is consistent with being associated with co-rotating disks or gas accretion.For cloud 1, its velocity is consistent with gas losing angular momentum and being accreted onto G1b.Cloud 1 also has a lower metallicity than the disk of the galaxy and has a lower metallicity than the extrapolated metallicity gradient.Thus, cloud 1 is most consistent with originating from gas that is accreting onto G1b.Cloud 3 is rotating in the opposite direction as G1a and G1b.However, this cloud aligns with the metallicity gradient of G1a.Cloud 2 has kinematics consistent with an accretion model with respect to G1a.However, the Figure 9. Left: Gas metallicity map of G1b.The orange line connects the centre of G1b with the quasar and represents the quasar angle (QA).We selected the spaxels that were within 30 • of aperture from this line.The selected spaxels are highlighted in orange.Right: Gas metallicity vs. distance.All of the spaxels are shown in grey, while those along the quasar direction aperture are shown in orange.We performed a linear fit to both of these samples, and the best fits are represented with the grey and orange lines, respectively.In this case, the slope of the fit is positive (0.010±0.006), but the large uncertainty indicates that the metallicity of G1b remains roughly constant with distance.This might be a consequence of its edge-on inclination.The violin plots represent the metallicities of the different clouds in the CGM.cloud metallicity is super-solar, which may imply that the gas was previously from an outflow that is being reaccreted into G1a.Given the face-on orientation of the galaxy, the quasar sightline likely probes a superposition of physical phenomena within the CGM.
We finally explore the possibility of gas arising from the intergalactic medium (IGM).Works such as Rudie et al. (2012), Lehner et al. (2013), Savage et al. (2014), andHafen et al. (2017) have shown that absorption of log  (Hi/cm −2 ) < 14.5 is likely associated with the IGM.While cloud 3 is consistent with the extended metallicity gradient of G1a, it is not consistent with the rotation range of either galaxy.It is in a high ionisation state, has a high temperature, a low metallicity and a low column density.All of these properties are consistent with what we would observe from the IGM.This cloud might be associated with intergalactic gas along the line-of-sight of the quasar.Tidal streams are also a possibility for the origins of cloud 3, but one would likely expect, given the direction of rotation of both galaxies, that velocities of that material would align with the rotation direction of the galaxies.
Overall, G1a and G1b seem like typical star-forming galaxies and they are consistent with their CGM having originated from a superposition of two galaxies with reasonable explanations for the potential origins of the individual clouds, such as recycled outflows (3), accretion (1,2) or the IGM (3).Therefore, they are a good control sample to compare with the interacting group which we discuss next.

G2 -MERGING SYSTEM RESULTS
In Section 4.1, we present the galaxy properties (SFR, gas kinematics, stellar kinematics, among others) of G2a-d in the merging system.We then present the CGM properties in Section 4.2, followed by an analysis connecting the galaxy and CGM properties in Section 4.3.A further discussion of the origin of the CGM is presented in Section 4.4.

G2 -Galaxy properties
This group (see Fig. 1) contains four merging galaxies that have a mean redshift of  G2 = 0.09849.While at first glance they may look like only two galaxies, further inspection of these system's redshifts (see Table 1) and kinematics (see Fig. 10) indicates that they are four distinct galaxies.This group has a velocity dispersion of 109±56 km s −1 .Their distance to the QSO line-of-sight is 100 kpc.
G2a, G2b and G2c have strong [Oii] 3727, 3729 emission lines, as shown in Fig. 11(b).G2a and G2c dominate the emission from this group.For G2c, the [Oii] 3727, 3729 are the only emission lines detected.G2d does not have any emission lines.The only lines present in its spectrum are Ca ii H&K absorption., where strong Hi, Cii, Siii, Siiii, Nv and Ovi absorption is detected, along with weaker Ci, Ni and Oi absorption.The velocity zero-point is defined as the redshift of the whole system, and the velocity of each galaxy is indicated with the vertical dashed lines.Black and grey curves indicate the data and error spectrum, respectively.Six clouds were fitted to this absorption system, where their profiles are colour-coded by thick solid curves and their velocity centroids are noted by the vertical ticks.The dashed cyan line indicates the total fit to the absorption profile.The grey-shaded areas were not considered in the modelling.
Kinematic maps of the ISM and stellar components of the entire group with the velocity zero-point set to  G2 are displayed in Figs.10(b) and 10(c).The whole system is rotating in the gas component.The stellar component appears to be rotating in the same direction as the gas as well and seems to have a similar range of velocities (−300 to 300 km s −1 ).It was not possible to calculate a gas velocity for G2d, as it does not feature any emission lines.In the case of the stellar kinematics, G2d appears quite blueshifted at −270 km s −1 compared to the rest of the group.Fig. 10(d) also shows the rotation kinematics of each galaxy using their own redshift as a velocity zero-point, allowing us to see the kinematics of each galaxy individually.Each of the galaxies is rotating in their own direction, while rotating around each other at the same time.When the kinematics of the merging system is modelled as a whole, the side closest to the quasar sightline is rotating with positive velocities.When modelling the kinematics of the individual galaxies, their maximum velocities are 152, 169, 93, and 254 km s −1 for G2a-d, respectively.While G2a,b,d appear to be rotating in the same direction as the group, G2c's rotation axis is perpendicular to the system and it has negative velocities towards the line-of-sight of the quasar.It is important to point out that the SNR of the spectra in G2d is considerably lower than that of the other galaxies, so performing Voronoi binning was necessary to reach a SNR ≥ 3. Unfortunately, this meant we only had eight spaxels to analyse the kinematics of this galaxy, and the model had to extrapolate a maximum velocity with less information than the other galaxies.Thus, the model in this galaxy should be interpreted with caution.We further explore and model the kinematics of these galaxies in Section 4.3.This group's ionised gas abundance map is shown in Fig. 11(d).H  emission lines are quite weak, if present at all, on G2b, so we could only calculate its abundance in three spaxels.There are no H  emission lines on G2d, so we could not calculate the abundance at all in that case.This is likely due to G2a and G2c stripping gas away from it during earlier stages of the merging.The median metallicity of G2a is 12 + log(O/H) = 8.79 ± 0.09, while that of G2c is 12 + log(O/H) = 8.73 ± 0.10, which is consistent with G2a within uncertainties.However, the gas metallicity is slightly higher where G2a and G2b meet, going up to 12 + log(O/H) = 8.93 in that region.
We used pPXF to calculate the stellar ages of the galaxies.We found the median age of the stars in G2a to be 8.50 ± 0.44 Gyr, while the median age of the stars in G2c is 8.48 ± 0.61 Gyr.Therefore, the ages of the stars in G2a and G2c are consistent within uncertainties.However, in the case of G2b, the median age of its stars is 9.21 ± 0.36 Gyr, meaning that G2b's stellar ages are higher than G2a and G2c.Interestingly, the stars are younger where G2a and G2b meet, having ages as low as 7.48 Gyr in that area, suggesting a recent star-formation event likely triggered by the merging.Further evidence of a recent star-formation event is provided by the fact that the H  emission line in G2b has a rest-frame equivalent width of 4.3 Å, which is indicative of a post-starburst state (Wu et al. 2018).Unfortunately, G2d's spectra do not have enough SNR to perform a pPXF run successfully, so we do not have stellar ages for this galaxy.
G2a has the highest SFR of all the galaxies in this Group at 5.13 ± 0.70 M ⊙ yr −1 .G2c has a lower SFR at 2.30 ± 0.03 M ⊙ yr −1 .In the case of G2b, we could only calculate its SFR [O ii] = 0.06 ± 0.03 M ⊙ yr −1 , as it does not contain H  emission lines.It was only possible for us to calculate an upper limit for the SFR of G2d as SFR ≤ 0.03 M ⊙ yr −1 .A Σ SFR map of the group is shown in Fig. 11(c).The total Σ SFR of G2a and G2c is 0.02 ±0.01 and 0.01 ±0.01 M ⊙ yr −1 kpc −2 , respectively.For G2b, we calculated its [O ii] Σ SFR as 0.06 ± 0.03 M ⊙ yr −1 kpc −2 .The Σ SFR is slightly higher where G2a and G2c meet, going as high as 0.9 ± 0.2 M ⊙ yr −1 kpc −2 , although this spaxel is most likely an outlier.The Σ SFR is higher than 0.1 M ⊙ yr −1 kpc −2 in only two spaxels in this system, so it is most likely not currently driving outflows as a whole, but might be driving them in those areas.Figure 14.Properties of the CGM absorption associated with merging system.The violin plots show the posterior distributions of cloud (from top to bottom): column density, metallicity, hydrogen number density, temperature, and thickness as a function of velocity.The velocity zero point is defined by the redshift of the whole system.Each violin represents one of the velocity components of the absorption centred at the redshift of the cloud.The vertical range of the darker and lighter violins indicates the 1 and 3 range for each parameter, respectively, and the black horizontal lines represent their most likely value.The width of each violin represents the posterior distribution of that particular absorption property.The vertical dashed lines indicate the systemic velocity of each galaxy.To compare the absorption to the galaxies, the range of velocity values an extended rotating galaxy disk would have at the location of the quasar is represented by the blue-shaded area in the case of G2a, the orange-shaded area for G2b, the purple-shaded area for G2c and the red-shaded area for G2d.The green shaded area represents the range of metallicities of the galaxies.
We produced line-ratio diagrams for each spaxel with all [O ii], [Oiii] and H  lines detected above 5, as shown in Fig. 12.All of these spaxels are located in either G2a and G2c.The majority of the spaxels are consistent with star-forming regions.Three spaxels lie in the AGN region of the line-ratio diagram.However, not only are their uncertainties large enough for the points to still be consistent with the star-forming region, but they are also located in the bridge between G2a and G2c rather than at the galaxy centres.This area would also be more prone to shocks produced by the merger, making the line-ratios exhibit AGN-like characteristics, even without AGN activity (D'Agostino et al. 2019).It is unlikely that an AGN would be located between the two galaxies, so we reject the hypothesis that either galaxy hosts an active AGN.

G2 -CGM absorption properties
When examining the CGM absorption of the merging system, we identified Hi, Nii, Cii, Siii, Nv and Ovi absorption, along with modest Oi absorption in the quasar spectrum, as shown in Fig. 13.The total Hi column density of the system is log  (Hi/cm −2 ) = 17.32 +0.09 −0.11 .The line measurements for all of the detected ions are detailed in Table 4.We modelled six components to this system, where five were constrained by low/intermediate ionisation ions (clouds 1, 2, 3, 4 and 5) and a sixth was constrained by the high ionisation ions (cloud 6).Two of the low ionisation components (clouds 1 and 2) show no metals associated with them.In the case of cloud 5, the low metallicity is expected, given that it has a low column density.However, the column density of cloud 3 is quite high, so it is interesting to see its low metallicity.
The redshifts, hydrogen column densities, Doppler parameters, hydrogen densities, metallicities, temperatures and sizes of each cloud are displayed in Fig. 14 and Table 5.The three low-ionisation clouds with Siii absorption (1, 2 and 4) have supersolar metallicities and a lower hydrogen number density of log( H /cm −3 ) ∼ −3, while the metallicities of the other two low-ionisation clouds (3 and 5) and the high-ionisation cloud (6) are subsolar and have a higher hydrogen number density ranging from log( H /cm −3 ) = −4 to −2.2.All of the low ionisation clouds have lower temperatures of 10 4 K, compared to the higher temperature of the higher ionisation cloud of 10 5.5 K.The clouds have a wide range of sizes (ranging from 10 −5 to 10 kpc) and column densities (ranging 13 ≲ log  (H i/cm −2 ) ≲ 17).

G2 -Comparing CGM and ISM
We have presented the properties of the galaxies along with those of absorption in the previous two subsections.Here we explore the possible connections between the galaxies in the merging system and their CGM.
The galaxy kinematic models are displayed in Fig. 15.The contours in the figure highlight the location of the four galaxies and correspond to the DECaLS -band image.Additionally, the yellow star shows the position of the quasar and the pie charts display the velocity of each of the clouds found in the absorption, with the outer part being colour-coded to match the colours of each cloud (see Fig. 13 and Table 4), using the relative velocities of each galaxy.The velocity between the systemic velocity at the projected distance of the quasar is shown as shaded regions for each galaxy in Fig. 14.The vertical dashed lines represent the systemic velocity of each galaxy, colour-coded in the same way as the shaded areas.If the velocity of the absorbing gas is between the systemic velocity (vertical dashed lines) and the velocity of the model at the location of the quasar, that would be evidence that the absorbing gas is co-rotating, lagging or accreting onto the ISM (e.g., Steidel et al. 2002).Good examples of this are G2a and G2c.G2a has three clouds (4, 5 and 6) consistent with its rotation.Two of these clouds are in a low ionisation state but have higher column densities (clouds 4 and 5) while the other cloud ( 6) is in a high ionsation state with a low HI column density.G2c has one cloud (2) consistent with its rotation direction, but this cloud is at a higher velocity than the model at the quasar sightline.No clouds are consistent with corotation with G2d.However, it is important to Extended rotation models for the galaxies in the merging system.The DECaLS g-band contours indicate the location of the galaxies.The letter in the top left corner of the plots shows which galaxy the model belongs to, where the galaxy itself is also highlighted with yellow contours.The yellow star represents the location of the quasar.The pie chart shows the velocities of the clouds found in the absorption using the galaxies' redshifts as velocity zero-points.The outer annulus of the pie charts is colour-coded to match the colours used to represent the clouds in Figs. 13 and 14.
note that the kinematics of these galaxies are unlikely to be described by rotation only.This means that although the models are useful for understanding the kinematics of the system, they might break down (e.g. if tidal streams or outflows are present).
The range of metallicities of the ISM (defined as the median of all the spaxels from Fig. 11, which is dominated by galaxies G2a and G2c) is shown in Fig. 14 as the blue and purple hatched areas for G2a and G2c, respectively.To better understand the relationship of the CGM metallicity to the galaxy metallicities, we also modelled the metallicity gradients of galaxies G2a and G2c together in the direction of the quasar using a one-degree polynomial, as seen in Fig. 16.In this case, the metallicity decreases with distance, both in the direction of the quasar (with a slope of −0.005 ± 0.003) and in general (with a slope of −0.006 ± 0.002).This extended metallicity gradient is consistent with cloud 3 of the absorption.Three components (clouds 1, 2 and 4) have a metallicity that is consistent with the ISM within uncertainties.All these components are in a low-ionisation state.The other components have a metallicity that is lower than the ISM.Two of these components (clouds 3 and 5) are in a low ionisation state, while the third one (cloud 6) has a high ionisation state.
As a summary, we find that three clouds (4, 5 and 6) are consistent with co-rotation of G2a, and the other clouds are not consistent with co-rotating of any galaxy.Also, three clouds (1, 2 and 4) have a metallicity higher than, or equal to, the ISM, while the others have lower metallicities and are consistent with the metallicity gradient of G2a and G2c.

G2 -Origin of the CGM absorption
Given the properties of galaxies, as well as those of the clouds along the quasar sightline described in the previous sections, we attempt to ascertain the physical origin of each cloud.However, unlike G1 the merging process makes it more difficult to assign a particular galaxy Figure 16.Left: Gas metallicity map of the merging system.The blue line connects the centre of G2a with the quasar (labelled QA).To isolate the metallicity gradient in the direction of the quasar, we selected the spaxels that were within 30 • of aperture from this line and these spaxels are highlighted in blue.Right: Gas metallicity vs. distance.All of the spaxels are shown in grey, while those along the quasar line-of-sight are shown in blue.We performed a linear fit to both of these samples and the best fits are represented with the grey and blue lines, respectively.It is clear that the metallicity of the merging system decreases with distance from its centre.The violin plots represent the metallicities of the different clouds in the CGM.
to each of the clouds.This means that the superposition model does not match well with the observations of this group.
We do find clouds (4, 5 and 6) that have kinematics consistent with the rotation kinematics of G2a at metallicities at or below the ISM metallicity.However, it is highly unlikely that G2a would have a smooth extended rotating disk, which would have been disrupted during the merging/interacting process.
Tidal streams are common in interacting galaxies, therefore we explore the possibility that our clouds are related to this process.Clouds 1 and 3 do not match the rotation of any of the galaxies, although cloud 3 is rotating in the same direction as G2d.It is also worth noting that clouds 2, 4 and 5 are moving in the same direction as the merger.This is a suggestion that these clouds could not be corotating gas, and they might be tidal streams that are moving in the same direction as the merger.
Several studies have pointed out that the IGrM is clumpy and anisotropic (Fossati et al. 2019;McCabe et al. 2021).In the case of our clouds, we see that clouds 1, 3, 5 and 6 are consistent with a thickness of the order of 1 kpc and smaller.The small size of these clouds points to a clumpy CGM/IGrM scenario.

DISCUSSION
Both targets in the distant pair are consistent with being typical star-forming galaxies.The CGM absorption at  = 0.04318 has three velocity components The CGM absorption at  = 0.098522 is found to be associated with a merging system of galaxies.Three of the four galaxies in the merging system are also star-forming, but they have more complex kinematics.The absorption has six velocity components.In the next subsections we compare the properties and the CGM of the two groups.We also compare our results to those found in the literature.

Comparison of the two groups
The galaxies in these two groups are in different stages of interaction.This translates into the galaxies and their CGM having different properties.
First, we compare the emission properties of the galaxies, starting from the SFR.Neither of the two groups seems to be particularly star-forming, although the spectrum of G2b is consistent with a poststarburst galaxy, given that its H  EW is 4.3 Å (Wu et al. 2018).This is expected, given that there is evidence that mergers trigger star-burst episodes.Further proof that there was a recent star formation episode triggered by the merging is the fact that the stars in G2a are younger (8.5 Gyr) than the rest of the stars in the system (9.2Gyr).
Next, we compare the variation between the absorption of the two systems.One major difference is that the merging system has six clouds, as opposed to the distant pair, which only has three, even though the impact parameter of the distant pair is much lower by a factor of two (G1:  ≃ 48kpc and G2:  ≃ 100kpc).This higher amount of components translates into having a higher H i equivalent width and column densities (G1: log  (Hi/cm −2 ) = 16.43 and G2: log  (H i/cm −2 ) = 17.33).This is inconsistent with the anticorrelation between Hi and  found for isolated galaxies (Kacprzak et al. 2021, and references therein).However, this is consistent with previous studies that show that the CGM of group galaxies extends into further distances (Bordoloi et al. 2011;Nielsen et al. 2018).This increase in absorption strength appears to increase even more in mergers.Additionally, G2 has a larger number of clouds at sub-kpc scales.Moreover, the smaller size of one of the clouds in G1 is most likely associated with the IGM, rather than the CGM of the whole   system.This difference in the sizes of the clouds in both systems could be due to the merging creating smaller clumps or small scale structure in the CGM of G2 (Hani et al. 2018;Sparre et al. 2022).
Looking at the kinematics of both groups, we note that the merging system has a wider range of velocities.The absorption on the distant pair only spans a range of ∼200 km s −1 , compared to the ∼400 km s −1 of the merging system.This is consistent with Nielsen et al. (2018), who showed that the CGM of group galaxies is more kinematically complex.Our results suggest that this level of kinematic complexity likely increases even more for merging galaxies.Another interesting difference between the two groups is that the gas in the merging system is in a higher ionisation state.This is expected, as the merging would create the ideal conditions to ionise the gas further than usual and could be situated in a higher halo mass system, further populating the level of ionised gas (Oppenheimer et al. 2016(Oppenheimer et al. , 2021;;Wĳers & Schaye 2022).
We can also explore the differences in the connections between ISM and CGM of both groups.The ISM metallicities of the galaxies in G1 are comparable to those in G2, both in their ISM and CGM.It is interesting to note that we see a much wider range of metallicities in the merging system, spanning 1.62 dex, compared to those of the distant pair, which span only 0.61 dex.The lower metallicity clouds in the merging pair seem to match the rotation of the system, unlike the low metallicity cloud in the distant pair, which does not seem to match any of the rotation.This suggests that the gas has different origins and again points to a scenario that merging galaxies produce a more complex CGM.
As a general conclusion, the CGM of G2 seems to be more complex than the CGM of G1.This is expected because G2 is in a more advanced state of merging, so the CGM should be more complicated.

Comparison with the literature
It has been shown that absorption of group galaxies tends to be stronger and extend to further distances (Chen et al. 2010;Kacprzak et al. 2010b;Nielsen et al. 2018;Hamanowicz et al. 2020;Cherrey et al. 2023).While clear differences in the properties of the CGM exist between group and isolated galaxies, very few studies have wellquantified galaxy group selection criteria.Thus, how exactly different stages of galaxy environment affect the CGM remains less clear.Furthermore, group galaxies have been proposed as an explanation for the existence of Mgii absorbers with equivalent width higher than 2 Å, also known as ultrastrong absorbers (Nestor et al. 2007;Guha et al. 2022).Our study goes one step further by comparing the absorption of group galaxies that are not strongly interacting with those that are merging.We find both equivalent widths and column densities are consistently stronger in G2, even though the QSO probes a larger distance in this case, suggesting that the merging exacerbates the enhancement in absorption strengths and extents.Bordoloi et al. (2011) presented the superposition model to explain the distribution of CGM in group galaxies.This model assumes that the absorption of the group can be explained as the superposition of the absorption of each of the individual galaxies of the group.In the case of G1, we can identify which absorption component most likely corresponds to which galaxy, supporting this model even further.However, this separation is not as clear in the case of G2, indicating that this model only works well in the case of non strongly interacting galaxies, or galaxies that are in the early stages of interaction.This effect could be due to the gas having more opportunities to mix in more strongly interacting or merging systems so that the gas then loses its kinematic and metallicity connection to the original host.Additionally, other papers have suggested different approaches to the  2023) developed a model for the CGM of group galaxies that includes outflows and disks, but they were unable to apply it to a merging system.These results, along with other studies that find anisotropy in the CGM of group galaxies (Butsky et al. 2019;McCabe et al. 2021), call for the need to develop more complex models or detailed high-resolution simulations to explain the CGM distribution of interacting and merging galaxies.Nielsen et al. (2018) compared the kinematics of isolated and group galaxies by calculating their pixel-velocity Two-Point Correlation Function (TPCF).This function is defined as the probability distribution of the separation in velocity of every pair of absorbing pixels in the sample.They found that the TPCF of group galaxies has more power at higher velocities, suggesting not only that their absorption is more kinematically complex, but also that this trend is originating through galaxy-galaxy interactions and/or major merger events.In the case of our data, we find that the merging system has wider absorption profiles (400 km s −1 in the merging system compared to 200 km s −1 in distant pair) and double the velocity components, compared to the distant pair.Our results further suggest that the reason the CGM of groups is more kinematically complex is because of the interactions between the group galaxies.Additionally, Nielsen et al. (2018) find that group galaxies tend to have a higher fraction of clouds with a velocity offset higher than 100 km s −1 , also known as high-velocity clouds.In the case of our systems, the merging group has two of these high-velocity clouds, as opposed to the distant pair which has zero.This indicates that one of the potential causes for this trend is the CGM being more highly kinematically distributed resulting from the interaction of the galaxies in the group.
Multiple works have found a decreased C iv (Burchett et al. 2016) and Ovi (Stocke et al. 2013;Pointon et al. 2017;Ng et al. 2019;McCabe et al. 2021) absorption associated with group galaxies, and have come to the conclusion that this is due to the higher temperature in group environments creating the perfect conditions to ionise the gas even further.Our study does not have the data to analyse the hot phase of the CGM around our galaxies, but we have found that the CGM of G2 is in a higher ionisation state, given the presence of Nv and Ovi in cloud 6.Although N v is also present in the absorption associated with the distant pair, this absorption is most likely a part of the IGM, and not related to the CGM of the galaxies in this system.This result points to the idea that mergers could contribute to gas heating in group environments, and ionising the gas surrounding them.
In their simulation study, Hani et al. (2018) found that the metallicity of the CGM of post-merger systems is higher than in premergers.This is due to mergers being outflow-dominated and suggests metallicity in group environments should be higher.However, observational studies have mixed results on this subject; while some find that the absorption metallicity in group systems is higher than in isolated galaxies (Lehner 2017;Beckett et al. 2023), others find non-significant differences (Pointon et al. 2020).In the case of our galaxies, we find that the merging system spans a wider range of metallicities than the distant pair, spanning 1.62 dex, compared to the distant pair which only spans 0.61 dex.Although we do not see current active outflows, we still observe higher metallicities at higher impact parameters in the CGM of merging galaxies.This evidence, in addition to the post-starburst state of G2b, suggests that G2 was dominated by outflows at the early stages of merging.However, we find lower metallicity clouds in this system as well, suggesting that the full picture is even more complex.
Moreover, the metallicity gradients also tell a story about the origin of the gas.Although the metallicity of the absorption tends to be lower than that of the ISM (Péroux et al. 2016;Kacprzak et al. 2019), some studies have shown that galaxies with low metallicity in their centres tend to have higher metallicities in their CGM (Kulkarni et al. 2019).The authors of this later study attribute this trend to dilution produced by mergers and infalling gas.This picture is different in group environments, where Hamanowicz et al. (2020) find no significant metallicity gradient between the ISM and the CGM of the groups in their sample, linking this result with the fact that their absorbers are associated with multiple galaxies.In the case of our galaxies, we have mixed results.On the one hand, G1a has a metallicity gradient with a negative slope, but G1b has a slightly positive one.On the other hand, the galaxies in G2 have negative slopes in their metallicity gradients.This could indicate that the galaxies in the distant pair are actually going through early stages of interaction that are not visible in emission.

SUMMARY AND CONCLUSIONS
In this paper, we studied two galaxy systems: one with two galaxies that are not visibly interacting (G1), and a second one with four merging galaxies (G2).Both of these systems are along the line of sight of the same QSO.Using Keck/KCWI and HST/COS data, we calculated both the ISM and CGM properties of all the galaxies in these systems, and found the following: • G1 consists of two galaxies at  = 0.043, G1a and G1b, which have impact parameters of 40.4 and 55.5 kpc, respectively.The galaxies of this system are rotating with maximum velocities of ∼250 km s −1 and have symmetrical velocity maps, confirming that these galaxies are not strongly interacting with each other.Both galaxies in this group have a median oxygen abundance of 12 + log(O/H) = 8.8.The total Σ SFR of G1a and G1b are 0.02 and 0.01 M ⊙ yr −1 kpc −2 , so it is unlikely that they are driving outflows.Additionally, there is no evidence of AGN activity in these galaxies.
• In the case of G2, it features four galaxies at  = 0.098, G2ad, and has an impact parameter of 97.7 kpc.The galaxies of G2 seem to be rotating in the same direction, but when we analysed the kinematics of each of them separately, we found they exhibit a much more complicated behaviour: the galaxies are rotating around each other while rotating on their own axes as well.The group also spans a wide range of velocities, having a velocity dispersion of 109 km s −1 .G2a and G2c have median oxygen abundances of 12+log(O/H) = 8.8 and 8.7, respectively.We could not calculate oxygen abundances in the other two galaxies, as they do not have any Hydrogen emission lines.There is evidence of a recent star-formation event in this system, given that the median age of the stars in the bridge between G2a and G2b is considerably lower (8.5 Gyr) than that of the rest of the group (9.2 Gyr).Additionally, the spectrum of G2b shows signs of being a post-starburst galaxy.The total Σ SFR of G2a and G2c are 0.02 and 0.01 M ⊙ yr −1 kpc −2 , respectively, so it is unlikely that they currently are driving outflows.Additionally, there is no evidence of AGN activity in this system.
• We have identified Hi, Cii, Siii, Siiii, and N v absorption in the quasar spectrum at the redshift of G1, having a total log( (Hi)/cm −2 ) = 16.43.This absorption is divided into three velocity components, or clouds, spanning a velocity range of 132 km s −1 .Two of these components are in a lower ionisation phase, while the other one is in a higher ionisation phase.The two clouds of the lower ionisation phase have column densities of log( (H i)/cm −2 ) ≈ 16, metallicity comparable to or greater than solar, a size of ≤ 3 kpc, hydrogen number densities of log( H /cm −3 ) = −3, and temperatures of  = 10 4 K. On the other hand, the higher ionisation component has a much lower column density at log( (H i)/cm −2 ) = 14, while at the same time, it has a much higher temperature of  = 10 5.5 K.
• We identified Hi, Nii, Cii, Siii, Nv and Ovi absorption, along with modest Oi absorption in the quasar spectrum at the redshift of G2, having a total log( (H i)/cm −2 ) = 17.33.This absorption can be divided into six velocity components, spanning a velocity range of 338 km s −1 .Five of these components are in a lower ionisation phase, while the other one is in a higher ionisation phase.Three of the low-ionisation clouds have supersolar metallicities, while the metallicities of the other two low-ionisation clouds and the highionisation cloud are subsolar.All of the low ionisation clouds have lower temperatures of 10 4 K, compared to the higher temperature of the higher ionisation cloud of 10 5.5 K.The clouds have a wide range of sizes (ranging from 10 −5 to 10 kpc) and column densities (ranging 13 ≲ log( (Hi)/cm −2 ) ≲ 17).
• We find that the kinematics of the absorption associated with G2 is more complex than that of G1, as it spans a wider range of velocities and can be divided into more velocity components.G2 also spans a wider range of metallicities and column densities.This is even more interesting as G2 is twice the distance as G1 away from the quasar.Additionally, some G2 absorption is in a higher ionisation state than found in G1.
• In the case of G1, we were able to assign a possible origin for each absorption component to an individual galaxy by comparing the kinematics and metallicities of both the ISM and the CGM.This result suggests that the superposition model from Bordoloi et al. (2011) describes this system appropriately.Such an analysis was not as straightforward in the case of G2, indicating that this model does not fit merging galaxies very well.This is probably due to the galaxies being so enmeshed with each other that their gas is also well mixed, compared to G1.
In conclusion, this study suggests that the CGM of merging systems is more complex than that of non-interacting galaxies or isolated galaxies.Future work is needed to further disentangle the properties of the CGM in merging galaxies.This work requires a sample of well-defined group environments (e.g., compact groups), along with Hi maps to obtain an understanding of star-formation reservoirs in the galaxies themselves.

Figure 1 .
Figure 1.Top: DECaLS   image of the quasar field with two intervening galaxy groups.At the top we have G1a and G1b, a pair of galaxies at  = 0.043 which are not strongly interacting, the background QSO is at the center and G2a-d, the strongly interacting group of four merging galaxies at  = 0.098, is at the bottom.There is an unrelated object to the North-East of the merging system.Bottom: zoom-in into the merging system, highlighting each of the galaxies that belong to it and the labels that will be used throughout this paper.
• .Both galaxies have strong [O ii] 3727, 3729 emission lines, as shown in Figs.2(b) and 3(b).Rotation maps of the gas component are shown in Figs.2(d) and 3(d), while those of the stellar component are shown in Figs.2(e)

Figure 2 .
Figure 2. Maps of different properties of G1a: (a) DECaLS grz image with the same orientations as Fig. 1.The white arrow points towards the location of the quasar, (b) O ii surface brightness, (c) Σ SFR , (d) gas velocity, (e) stellar velocity, and (f) gas metallicity.

Figure 3 .
Figure 3. Maps of different properties of G1b: (a) DECaLS grz image with the same orientation as Fig. 1.The white arrow points towards the location of the quasar, (b) O ii surface brightness, (c) Σ SFR , (d) gas velocity, (e) stellar velocity, and (f) gas metallicity.

Figure 4 .
Figure 4. Line-ratio diagram of 1 kpc stacks in G1a (top) and G1b (bottom).The blue line separates the AGN and star-forming regions Lamareille (2010).Each stack is colour-coded by its distance to the centre of the galaxy.All stacks lie in the star-forming region.The location of individual spaxels is displayed with smaller circles.

Figure 5 .
Figure5.Absorption at the redshift ( abs = 0.04318) of the distant pair, G1a and G1b, where strong Hi, Siii, Siiii and Nv absorption is detected.The velocity zero-point is defined as the redshift of G1a and is represented by the vertical blue dashed line.Additionally, the redshift of G1b is indicated with the orange dashed line.Black and grey curves indicate the data and the 1 uncertainty, respectively.Three clouds were fitted to this absorption system, where their profiles are colour-coded by thick solid curves and their velocity centroids are noted by the vertical ticks.The dashed cyan line indicates the total fit to the absorption profile.The grey-shaded areas were not considered in the modelling.
Properties of the different components contributing to the absorption.Notes: (1) Cloud ID; (2) Velocity of the cloud; (3) metallicity of the cloud to the solar metallicity; (4) total hydrogen volume density of the cloud; (5) total hydrogen column density of the cloud; (6) neutral hydrogen column density of the cloud; (7) temperature of the cloud in kelvin; (8) inferred line of sight thickness of the cloud in kpc; (9) non-thermal Doppler broadening parameter of the cloud (10) thermal Doppler broadening parameter measured for H i; (11) total Doppler broadening parameter measured for Hi.The marginalised posterior values of model parameters are given as the median along with the upper and lower bounds corresponding to the 16-84 percentiles.

Figure 6 .
Figure 6.Properties of the absorption associated with the distant pair, G1a and G1b.The violin plots show the posterior distributions of (from top to bottom): column density, metallicity, hydrogen number density, temperature, and cloud thickness as a function of velocity.Each violin represents one of the velocity components of the absorption.The range of the violins indicates the 1 range for each parameter and the black horizontal lines represent their most likely value.The velocity zero point is defined by the redshift of G1a.The range of velocity values an extended rotating disk would have at the location of the quasar is represented by the blue-shaded area in the case of G1a, and the orange-shaded area in the case of G1b.The vertical dashed lines indicate the systemic velocity of each galaxy.The blue and orange hatched areas on panel (b) represent the metallicity range of G1a and G1b, respectively.

Figure 7 .
Figure7.Extended rotation model of G1a (top) and G1b (bottom).The DECaLS g-band contours show the location of the galaxies.The yellow star represents the location of the quasar.The pie chart shows the velocities of the clouds found in the absorption, using the galaxies' redshifts as velocity zero-points.The outside part of the pie charts is colour-coded to match the colours used to represent the clouds in Figs.5 and 6.In both cases, there is one cloud that matches the velocity range of the model at the location of the quasar (blue cloud for G1a and green cloud for G1b).

Figure 10 .
Figure 10.Maps of the merging system: (a) DECaLS grz image with the same orientation as Fig. 1.The dashed circles indicate the different galaxies.(b) Gas velocity, using  = 0.09849 as the velocity zero-point.(c) Stellar velocities, using  = 0.09849 as the velocity zero-point.(d) Velocity of the galaxies using each of the galaxies' own redshift as the velocity zero-point.The velocity maps correspond to the gas velocity except in the case of G2d, which shows the stellar velocity.The purple contours indicate the spaxels associated with each galaxy.

Figure 11 .Figure 12 .Figure 13 .
Figure 11.Maps of different properties of the merging system: (a) DECaLS grz image with the same orientation as Fig. 1, (b) [O ii] surface brightness, (c) Σ SFR , and (d) gas metallicity.The purple contours indicate the spaxels associated with each galaxy.
Figure15.Extended rotation models for the galaxies in the merging system.The DECaLS g-band contours indicate the location of the galaxies.The letter in the top left corner of the plots shows which galaxy the model belongs to, where the galaxy itself is also highlighted with yellow contours.The yellow star represents the location of the quasar.The pie chart shows the velocities of the clouds found in the absorption using the galaxies' redshifts as velocity zero-points.The outer annulus of the pie charts is colour-coded to match the colours used to represent the clouds in Figs. 13 and 14.

Table 1 .
Properties of the galaxies.
It was not possible to calculate SFR because this galaxy has no emission lines (see Section 2.2.3). It was not possible to calculate   because these galaxy have no Hydrogen emission lines.

Table 2 .
CGM absorption rest-frame equivalent widths and column densities for the distant pair.

Table 4 .
Equivalent widths and column densities for CGM absorption located at 100 kpc from the merging system.

Table 5 .
Dutta et al. (2020)9)ties of the absorption system associated with merging pair Properties of the different components contributing to the absorption.Notes: (1) Cloud ID; (2) Velocity of the cloud; (3) metallicity of the cloud to the solar metallicity; (4) total hydrogen volume density of the cloud; (5) total hydrogen column density of the cloud; (6) neutral hydrogen column density of the cloud; (7) temperature of the cloud in kelvin; (8) inferred line of sight thickness of the cloud in kpc; (9) non-thermal Doppler broadening parameter of the cloud (10) thermal Doppler broadening parameter measured for H i; (11) total Doppler broadening parameter measured for H i. The marginalised posterior values of model parameters are given as the median along with the upper and lower bounds corresponding to the 16-84 percentiles.superpositionmodel.Nielsen et al. (2018)found their sample does not fit the superposition model, based on the kinematic spread of the absorption systems and suggested a shared CGM model instead.Alternatively,Fossati et al. (2019)attributed the stronger absorption to filaments and tidal streams, whileDutta et al. (2020)proposed a mix of the superposition model with interactions between the individual galaxies.Beckett et al. (