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
where
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
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
Thus the inclusion of
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
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

Figure 1.
Non-helical contribution to

Figure 2.
Non-helical contribution to

Figure 3.
Non-helical contribution to
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
and

Figure 4.
Spectrum of CMB temperature anisotropies with PMFs obtained numerically from CLASS code. Each plot displays the effect of
The angular diameter distance depends on the late history after decoupling (

Figure 5.
A snapshot of the transfer functions and
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

Figure 6.
Left: Results of MCMC constrained with BAO data 2015 and with Planck simulated data 2013. Right: Triangle plot of the results of MCMC. Regions are the 68% and 95% confidence level. Here we use
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
Here, for our case, we should integrate only up to

Figure 7.
Plot of the CMB temperature power spectrum induced by scalar magnetic perturbations, where the lines with filled circles are for
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

Figure 8.
Comparison between the CMB temperature power spectrum induced by scalar PMF at
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
References
- 1.
Grasso D, Rubinstein HR. Magnetic fields in the early universe. Physics Reports. 2001; 348 (3):163-266 - 2.
Subramanian K. The origin, evolution and signatures of primordial magnetic fields. Reports on Progress in Physics. 2016; 79 (7):076901 - 3.
Hortua HJ, Castañeda L. Reduced bispectrum seeded by helical primordial magnetic fields. Journal of Cosmology and Astroparticle Physics. 2017; 2017 (06):020 - 4.
Mack A, Kahniashvili T, Kosowsky A. Microwave background signatures of a primordial stochastic magnetic field. Physical Review D. 2002; 65 (12):123004 - 5.
Kahniashvili T, Ratra B. CMB anisotropies due to cosmological magnetosonic waves. Physical Review D. 2007; 75 (2):023002 - 6.
Hortua HJ, Castañeda L. Parity odd CMB power spectrum via helical magnetic fields. In: Proceedings of the 28th Texas Symposium on Relativistic Astrophysics. 2015 - 7.
Shiraishi M. Probing the Early Universe with the CMB Scalar, Vector and Tensor Bispectrum. Tokyo: Springer; 2013 - 8.
Campanelli L. Lorentz-violating inflationary magnetogenesis. The European Physical Journal C. 2015; 75 :278 - 9.
Durrer R, Neronov A. Cosmological magnetic fields: Their generation, evolution and observation. The Astronomy and Astrophysics Review. 2013; 21 (1):62 - 10.
Subramanian K. Magnetic fields in the early universe. Astronomische Nachrichten. 2010; 331 :110 - 11.
Martin J, Yokoyama J. Generation of large scale magnetic fields in single-field inflation. Journal of Cosmology and Astroparticle Physics. 2008; 1 :025 - 12.
Ferreira RJZ, Jain R, Sloth MS. Inflationary magnetogenesis without the strong coupling problem. Journal of Cosmology and Astroparticle Physics. 2013; 2013 (10):004 - 13.
Caprini C, Sorbo L. Adding helicity to inflationary magnetogenesis. Journal of Cosmology and Astroparticle Physics. 2014; 10 :056 - 14.
Durrer R, Hollenstein L, Jain RK. Can slow roll inflation induce relevant helical magnetic fields? Journal of Cosmology and Astroparticle Physics. 2011; 3 :037 - 15.
Bamba K, Yokoyama J. Large-scale magnetic fields from inflation in dilaton electromagnetism. Physical Review D. 2004; 69 :043507 - 16.
Bamba K, Odintsov SD. Inflation and late-time cosmic acceleration in non-minimal Maxwell-F(R) gravity and the generation of large-scale magnetic fields. Journal of Cosmology and Astroparticle Physics. 2008; 4 :024 - 17.
Adshead P, Giblin JT Jr, Scully TR, Sfakianakis EI. Magnetogenesis from axion inflation. Journal of Cosmology and Astroparticle Physics. 2016; 10 :039 - 18.
Emami R, Firouzjahi H, Sadegh Movahed M. Inflation from charged scalar and primordial magnetic fields? Physical Review D. 2010; 81 :083526 - 19.
Ratra B. Cosmological ‘seed’ magnetic field from inflation. The Astrophysical Journal. 1992; 391 :L1-L4 - 20.
Demozzi V, Mukhanov V, Rubinstein H. Magnetic fields from inflation? Journal of Cosmology and Astroparticle Physics. 2009; 8 :025 - 21.
Barnaby N, Namba R, Peloso M. Observable non-gaussianity from gauge field production in slow roll inflation, and a challenging connection with magnetogenesis. Physical Review D. 2012; 85 :123523 - 22.
Kandus A, Kunze KE, Tsagas CG. Primordial magnetogenesis. Physics Reports. 2011; 505 (1):1-58 - 23.
Widrow LM. Origin of galactic and extragalactic magnetic fields. Reviews of Modern Physics. 2002; 74 :775-823 - 24.
Widrow LM, Ryu D, Schleicher DRG, et al. The first magnetic fields. Space Science Reviews. 2012; 166 :37-70 - 25.
Straumann N. Cosmological Phase Transitions; 2004. ArXiv - 26.
Quashnock JM, Loeb A, Spergel DN. Magnetic field generation during the cosmological QCD phase transition. The Astrophysical Journal. 1989; 344 :L49-L51 - 27.
Cheng B, Olinto AV. Primordial magnetic fields generated in the quark-hadron transition. Physical Review D. 1994; 50 :2421-2424 - 28.
Tevzadze AG, Kisslinger L, Brandenburg A, Kahniashvili T. Magnetic fields from qcd phase transitions. The Astrophysical Journal. 2012; 759 (1):54 - 29.
Hogan CJ. Magnetohydrodynamic effects of a first-order cosmological phase transition. Physical Review Letters. 1983; 51 :1488-1491 - 30.
Harrison ER. Generation of magnetic fields in the radiation era. Monthly Notices of the Royal Astronomical Society. 1970; 147 (3):279 - 31.
Matarrese S, Mollerach S, Notari A, Riotto A. Large-scale magnetic fields from density perturbations. Physical Review D. 2005; 71 (043502) - 32.
Hortua HJ, Castañeda L, Tejeiro JM. Evolution of magnetic fields through cosmological perturbation theory. Physical Review D. 2013; 87 :103531 - 33.
Nalson E, Christopherson AJ, Malik KA. Effects of non-linearities on magnetic field generation. Journal of Cosmology and Astroparticle Physics. 2014; 1409 :023 - 34.
Barrow JD, Ferreira PG, Silk J. Constraints on a primordial magnetic field. Physical Review Letters. 1997; 78 :3610-3613 - 35.
Ballardini M, Finelli F, Paoletti D. CMB anisotropies generated by a stochastic background of primordial magnetic fields with non-zero helicity. Journal of Cosmology and Astroparticle Physics. 2015;(10):031 - 36.
Durrer R, Caprini C. Primordial magnetic fields and causality. Journal of Cosmology and Astroparticle Physics. 2003;(11):010 - 37.
Kim E-J, Olinto AV, Rosner R. Generation of density perturbations by primordial magnetic fields. The Astrophysical Journal. 1996; 468 :28 - 38.
Yamazaki DG. CMB with the background primordial magnetic field. Physical Review D. 2014; 89 (083528) - 39.
Yamazaki DG, Kusakabe M. Effects of power law primordial magnetic field on big bang nucleosynthesis. Physical Review D. 2012; 86 (12):123006 - 40.
Choudhury S. Inflamagnetogenesis redux: Unzipping sub-Planckian inflation via various cosmoparticle probes. Physics Letters B. 2014; 735 :138-145 - 41.
Hortúa HJ, Castañeda L. Power spectrum of post-inflationary primordial magnetic fields. Physical Review D. 2014; 90 :123520 - 42.
Paoletti D, Finelli F. CMB constraints on a stochastic background of primordial magnetic fields. Physical Review D. 2011; 83 (12):123533 - 43.
Caprini C, Finelli F, Paoletti D, Riotto A. The cosmic microwave background temperature bispectrum from scalar perturbations induced by primordial magnetic fields. Journal of Cosmology and Astroparticle Physics. 2009; 6 (21) - 44.
Trivedi P, Subramanian K, Seshadri TR. Primordial magnetic field limits from cosmic microwave background bispectrum of magnetic passive scalar modes. Physical Review D. 2010; D82 :123006 - 45.
Durrer R, Kunz M. Cosmic microwave background anisotropies from scaling seeds: Generic properties of the correlation functions. Physical Review D. 1998; 57 :R3199-R3203 - 46.
Brown IA. Primordial magnetic fields in cosmology [PhD thesis]; 2008 - 47.
Brown I, Crittenden R. Non-gaussianity from cosmic magnetic fields. Physical Review D. 2005; 72 (6):063002 - 48.
Caprini C, Durrer R, Kahniashvili T. Cosmic microwave background and helical magnetic fields: The tensor mode. Physical Review D. 2004; 69 (6):063006 - 49.
Martín-García JM. xAct: Efficient Tensor Computer Algebra for Mathematica; 2002 - 50.
Pogosian L, Vachaspati T, Winitzki S. Signatures of kinetic and magnetic helicity in the cosmic microwave background radiation. Physical Review D. 2002; 65 (083502) - 51.
Paoletti D, Finelli F, Paci F. The scalar, vector and tensor contributions of a stochastic background of magnetic fields to cosmic microwave background anisotropies. Monthly Notices of the Royal Astronomical Society. 2009; 396 :523-534 - 52.
Finelli F, Paci F, Paoletti D. Impact of stochastic primordial magnetic fields on the scalar contribution to cosmic microwave background anisotropies. Physical Review D. 2008; 78 (2):023510 - 53.
Giovannini M, Kunze KE. Magnetized cmb observables: A dedicated numerical approach. Physical Review D. 2008; 77 (063003) - 54.
Lewis A, Challinor A, Lasenby A. Efficient computation of cosmic microwave background anisotropies in closed Friedmann-Robertson-Walker models. The Astrophysical Journal. 2000; 538 :473-476 - 55.
Doran M. CMBEASY: An object oriented code for the cosmic microwave background. Journal of Cosmology and Astroparticle Physics. 2005;(10):011 - 56.
Kahniashvili T, Kosowsky A, Mack A, Durrer R. CMB signatures of a primordial magnetic field. In: Durrer R, Garcia-Bellido J, Shaposhnikov M, editors. Journal of Cosmology and Astroparticle Physics, Volume 555 of American Institute of Physics Conference Series. 2001. pp. 451-456 - 57.
Hortúa HJ, Casta Neda L. Effects of primordial magnetic fields on CMB. In: Heavens A, Starck J-L, Krone-Martins A, editors. Statistical Challenges in 21st Century Cosmology, Volume 306 of IAU Symposium. 2014. pp. 159-161 - 58.
Lesgourgues J. The Cosmic Linear Anisotropy Solving System (CLASS) I: Overview; 2011. ArXiv e-prints - 59.
Durrer R. The Cosmic Microwave Background. Cambridge University Press; 2008 - 60.
Lesgourgues J, Pastor S. Massive neutrinos and cosmology. Physics Reports. 2006; 429 (6):307-379 - 61.
Audren B, Lesgourgues J, Benabed K, Prunet S. Conservative constraints on early cosmology: An illustration of the Monte Python cosmological parameter inference code. Journal of Cosmology and Astroparticle Physics. 2013; 1302 :001 - 62.
Yamazaki DG, Ichiki K, Kajino T, Mathews GJ. Effects of the primordial magnetic field on the CMB. In: American Institute of Physics Conference Series. 2007. pp. 449-452 - 63.
Kahniashvili T, Lavrelashvili G, Ratra B. CMB temperature anisotropy from broken spatial isotropy due to a homogeneous cosmological magnetic field. Physical Review D. 2008; 78 (6):063012 - 64.
Paoletti D. Thesis: Small scale CMB anisotropies with Planck: Constraints on primordial magnetic fields and the impact of foreground/secondary anisotropy residuals. The International Union of Soil Sciences. 2010; 4 (1):276 - 65.
Shaw JR, Lewis A. Massive neutrinos and magnetic fields in the early universe. Physical Review D. 2010; 81 (4):043517 - 66.
Shaw JR, Lewis A. Constraining primordial magnetism. Physical Review D. 2012; 86 (4):043510 - 67.
Hu W, White M. CMB anisotropies: Total angular momentum method. Physical Review D. 1997; 56 :596-615 - 68.
Yamazaki DG, Ichiki K, Umezu K-i, Hanayama H. Effect of primordial magnetic field on seeds for large scale structure. Physical Review D. 2006; 74 (123518) - 69.
Jedamzik K, Katalinic V, Olinto A. Limit on primordial small-scale magnetic fields from cosmic microwave background distortions. Physical Review Letters. 2000; 85 :700-703
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 ρ γ .