## Abstract

The origin of large-scale magnetic fields is one of the most puzzling topics in cosmology and astrophysics. It is assumed that the observed magnetic fields result from the amplification of an initial field produced in the early Universe. If these fields really were present before the recombination era, these could have some effects on big bang nucleosynthesis (BBN) and electroweak baryogenesis process, and it would leave imprints in the temperature and polarization anisotropies of the cosmic microwave background (CMB). In this chapter, we analyze the effects of a background primordial magnetic field (PMF) on the CMB anisotropies and how we can have sight the mechanisms of generation of these fields through these features. We start explaining briefly why primordial magnetic fields are interesting to cosmology, and we discuss some theoretical models that generate primordial magnetic fields. Finally, we will show the statistics used for describing those fields, and by using CLASS and Monte Python codes, we will observe the main features that these fields leave on the CMB anisotropies.

### Keywords

- primordial magnetic fields
- CMB
- inflation
- early universe

## 1. Introduction

Magnetic fields are ubiquitous in the Universe. Even if the origin of these fields is under debate, it is assumed that observed fields were originated from cosmological or astrophysical seed fields and then amplified during the structure formation via some astrophysical mechanism [1]. If these fields really were present before the recombination era, these could have some effects on big bang nucleosynthesis (BBN) and electroweak baryogenesis process and leave imprints in the temperature and polarization anisotropies of the cosmic microwave background (CMB) [2]. Since PMFs affect the evolution of cosmological perturbations, these fields might imprint significant signals on the CMB temperature and polarization patterns and produce non-Gaussianities (NG) [3]. As a matter of fact, PMFs introduce scalar, vector, and tensor perturbations that affect the CMB in many ways. For instance, the scalar mode generates magnetosonic waves which influence the acoustic peaks and change the baryon fraction; vector mode contributes notably in scales below the Silk damping, and tensor mode induces gravitational waves that affect large angular scales [4, 5]. Further, helical PMFs produce parity-odd cross correlation which would not arise in the standard cosmological scenario [6, 7]. Recently, enough CMB experiments like Planck and Polarbear have presented new limits on the amplitude of PMFs using temperature and polarization measurements that offer the possibility of investigating the nature of PMFs, and it is expected with future CMB polarization experiments like CMB-S4 and Simons Observatory, among others, to improve significantly the constraints to the helicity of PMFs and NG and to be able to provide a new insight into the early Universe [2].

## 2. A primordial origin

Cosmological scenarios describe the generation of magnetic fields in the early Universe (so-called primordial magnetic field), approximately prior to or during recombination, i.e.,

### 2.1. Inflamagnetogenesis

As mentioned earlier, inflation provides an interesting scenario for the generation of PMFs with large coherence scales. Let us start with the standard free electromagnetic (EM) action, given by [2, 10]

where

and the factors

This action usually contains the standard EM terms coupled to scalar fields (

### 2.2. Cosmological phase transitions

In the early Universe, there have been at least two phase transitions: the cosmological QCD phase transition (∼250 MeV) and electroweak phase transition (

and as we can see, PMFs generated by these mechanisms lead to a coherence length of the field smaller than the Hubble scale at that epoch, and weaker fields on galactic scales are obtained. However, the presence of helical fields can undergo processes of inverse cascade that transfers power from small to large scales, and thus, the result will be strong fields on very large scales [28].

### 2.3. Harrison’s mechanism

Other alternative for the production of PMFs arises during the radiation era in regions that have nonvanishing vorticity. The first attempt at such a model was done by Harrison [30]; there, magnetic fields are created through vorticity generated by the velocity difference in the fluids present. For a formal derivation of the mechanism, see Refs. [31, 32, 33]. At temperatures larger than the electron mass, the interactions among protons, electrons, and photons are strong, and they are locked together. This means that all the system has the same angular velocity and seed fields cannot be generated. For temperatures below

## 3. Magnetic spectra and correlation functions

Two models have been proposed to model PMFs. The first one consists in describing PMFs as an homogeneous field such that *B*^{2} is the local density of the field and where we must require an anisotropic background (like Bianchi VII) to allow the presence of this field. Comparing those models with CMB quadrupole data, Barrow et al. [34] reported an amplitude of PMFs of *B*^{2} would be related to the average density of the field instead. This description does not break neither isotropy nor homogeneity of the background Universe; hence, this scheme allows to have a PMF model concordant to the current constraints. In consequence, we will consider a stochastic primordial magnetic field (PMF) generated in the very early Universe which could have been produced during inflation (noncausal field) or after inflation (causal field) throughout the chapter. The PMF power spectrum which is defined as the Fourier transform of the two-point correlation can be written as

where ^{1},

We assume that power spectrum scales as a simple power law

We usually parametrize the fields through a convolution with a 3D-Gaussian window function smoothed over a sphere of comoving radius

and we define

with

The most general case of the power spectrum for magnetic fields can be studied, if we assume that it is non-zero for *km* an infrared cutoff and *kD* an ultraviolet cutoff corresponding to damping scale of the field written as [4]

Hereafter we simply set this scale at

an additional constraint is found for these fields

In the case where

which in the case of inflationary scenarios would correspond to the wave mode that exits the horizon at inflation epoch and, for causal modes, would be important when this scale is larger than the wave number of interest (as claimed by Kim et al. [37]). Thus, this infrared cutoff would be important in order to constrain PMF parameters and magnetogenesis models [37, 38, 39, 40]. Eq. (15) gives only a useful mathematical representation to constrain these cutoff values via cosmological datasets (for this case, the parameter space would be given by *kD* as a function of *nB* via big bang nucleosynthesis (BBN), and they considered the maximum and minimum wave numbers as independent parameters. In fact, in [3] they found out that the integration scheme used for calculating the spectrum and bispectrum of PMFs is exactly the same if we parametrize *km* as seen in (15) or if we consider

Thus the inclusion of *km* is done only for studying at a phenomenological level, and its effects on the CMB are shown in more detail in [3, 41]. At background level, we need only the energy density of the PMF which is given by

Here, only the non-helical term contributes to the energy density of the PMF in the Universe. In Ref. [38], this equation is also reported, and we will study in more detail their effects on the CMB later. In order to study the impact of PMFs on cosmological perturbations, we start writing the magnetic energy momentum tensor (EMT)

where we can see that EMT of PMFs is quadratic in the fields [42]. Due to the high conductivity in the primordial Universe, the electric field is suppressed, and the magnetic one is frozen into the plasma, and consequently we have that

and the two-point correlation tensor related to the spatial dependence (18) gives

where we can apply the Wick theorem because the stochastic fields are Gaussianly distributed

On the other hand, the equations for the adimensional energy density of magnetic field and spatial part of the electromagnetic energy momentum tensor respectively written in Fourier space are given as

where we express each component of the energy momentum tensor in terms of photon energy density ^{2}. We can also see that using the previous definition, the EMT can be written as

which obey to

where

where we use Eqs. (5) and (20). In this work, we are only focused on the scalar mode of the PMfs. To determine the effect on cosmic perturbations, it is necessary to compute the scalar correlation functions of PMFs using the projector operators:

These convolutions can be written in terms of spectra as follows [35, 48]:

Thus, using Eqs. (24)–(27), along with the Wick’s theorem (20), the spectra take the form

where the angular functions are defined as

The above relations and properties were obtained using the xAct software [49], and they agree with those reported in [35, 47]. Given these results, we are able to analyze the effects of PMFs on CMB by adding the previous contributions to the CMB angular power spectrum. Indeed, some authors [42, 50, 51, 52, 53] have added the above spectrum relations in Boltzmann codes like CAMB [54] or CMBeasy [55], while other authors [4, 5, 56, 57] have analyzed the effects of these fields through approximate solutions.

Using the integration scheme for the Fourier spectra reported in [41], we obtain the solution for the magnetic spectra for different contributions. In Figures 1 and 2, we show the total contribution for *α*. Here we can see that for

## 4. Effects of the background PMFs on the CMB

The presence of energy density of the background PMF increases total radiation-like energy density

where *G* is the gravitational constant and

and *cs*. In fact, the peak location depends on the angle

The angular diameter distance depends on the late history after decoupling (*cs*. By adding PMFs to the primordial plasma, we increase the effective speed of sound which in turn increases the angle of the location of peaks, boosting the peaks to small

In summary, accounting for a background PMF in our model modifies the shape of the temperature power spectrum significantly for large multipolar numbers, that is, the Sachs-Wolfe (SW), Doppler, and early integrated Sachs-Wolfe (EISW) contributions are quite affected by the magnetic field. This fact can be noticed in Figure 5b, where we plot the features of PMFs (

In Figure 6 we show the bidimensional and triangle plots of the MCMC with one magnetic parameter and some of the *B* = 1nG, *kD* = 100 Mpc^{−1}, and

## 5. Magnetic contribution to CMB anisotropies

Since PMFs affect the evolution of cosmological perturbations, these fields might leave significant signals on the CMB. Basically, PMFs add three contributions to the temperature and polarization of the CMB spectra, such as the scalar, vector, and tensor, which have been deeply studied [4, 56, 62, 63]. For the scalar contribution, the shape of the temperature anisotropy (TT mode) presents an increase on large scales, and it also shifts the acoustic peaks via fast magnetosonic waves; nevertheless the main effect of the scalar mode lies on large multipolar numbers, since the primary CMB is significantly suppressed by the Silk damping in these scales [4, 5]. Next, the vector contribution leaves an indistinguishable signal, because in standard cosmology, vector contributions decay with time and do not affect the CMB anisotropies considerably [4]. Further, vector mode peaks where primary CMB is suppressed by Silk damping and so dominates over the scalar ones in small scales [64]. Vector modes are also very interesting in the polarization spectra; in particular, they induce B modes with amplitudes slightly larger than any other contribution, allowing us to constrain better PMFs in the next CMB polarization experiments [52].

Finally, tensor modes induce gravitational wave perturbations that lead to CMB temperature and polarization anisotropies on large angular scales, and the passive tensor modes (produced by the presence of PMFs before neutrino decoupling) generate the most significant magnetic contributions, so those modes become relevant to study the nature of PMFs [48, 65, 66]. Moreover, if helical PMFs are presented before recombination, they affect drastically the parity-odd CMB cross correlations implying a strong feature of parity violation in the early Universe [50]. Using the total angular momentum formalism introduced by [67], the angular power spectrum of the CMB temperature anisotropy is given as

where

where *G* is the gravitational constant, and

Here, for our case, we should integrate only up to

### 5.1. Infrared cutoff in the CMB spectra

Studying the effect of this lower cutoff of CMB spectra, we can constrain PMF generation models. Figure 8 shows the effects of PMFs on the scalar mode of CMB spectra. Here we did a comparison between the Cls with a null cutoff with respect to Cls generated by values of cutoff different from zero. The horizontal solid line shows the comparison with

## 6. Conclusions

In this chapter, we worked on the assumption that in the early Universe, a weak magnetic field was created. This PMF is parametrized by its strength *B* and *ns* changes the shape of the power spectrum, and by increasing *km* the peaks related to the ratio between with and without IR cutoff are shifted to large angles. Moreover, in scenarios like inflation, the effect of infrared cutoff might not be ignored (for a deeper discussion see [39]); thus, the feature of this signal will be useful for constraining PMF inflation generation models. In fact, this *km* is important for studying the evolution of density perturbations and peculiar velocities due to primordial magnetic fields and effects on BBN [37, 68, 69]. Additionally, the power spectrum generated by magnetic fields is blue for

## Conflict of interest

The authors declare that there is no conflict of interest.

## Notes

- This projector has the property P lm k ̂ m = 0 with k ̂ = k k .
- The dimensional energy density of magnetic field showed here is written with different notation in [43] Ω B ≡ B 2 8 π a 4 ρ γ and in [7, 44] Δ B ≡ B 2 8 π a 4 ρ γ .