---
title: The Friedmann Equations and Cosmic Dynamics
module: A Bridge to Cosmology
moduleNumber: 10
lessonNumber: 2
order: 1002
summary: >
  The Einstein equation applied to the FLRW metric with a perfect-fluid source
  yields the two Friedmann equations and the conservation law that ties them
  together. This lesson derives them, defines the critical density and the
  density parameters that fix the spatial geometry, works out how matter,
  radiation, and a cosmological constant dilute and drive the expansion, and
  hands off to a dedicated cosmology subject.
topics: [A Bridge to Cosmology]
draft: false
sources:
  - book: Hartle
    ref: "Gravity, Ch. 18–19 — Cosmological Models; Which Universe and Why?"
  - book: Carroll
    ref: "Lecture Notes on General Relativity, §8 — Cosmology, arXiv:gr-qc/9712019"
---

The FLRW metric leaves the scale factor $a(t)$ undetermined; symmetry fixes the
form of the metric but not its evolution. The Einstein equation supplies the
missing dynamics. With a homogeneous isotropic source — a perfect fluid whose
density and pressure depend only on cosmic time — the ten Einstein equations
collapse to two ordinary differential equations for $a(t)$, the Friedmann
equations. This lesson derives them, extracts the critical density that
separates the spatial geometries, and follows the expansion through the
radiation, matter, and vacuum-dominated eras.

## The perfect-fluid source

Homogeneity and isotropy constrain the stress–energy tensor as tightly as they
constrain the metric. The most general $T^{\mu\nu}$ compatible with isotropy in
the comoving frame is that of a **perfect fluid**,

$$
T^{\mu\nu} = \left(\rho + \frac{p}{c^2}\right)U^\mu U^\nu + p\,g^{\mu\nu},
$$

where $\rho$ is the mass-energy density (so $\rho c^2$ is the energy density),
$p$ is the pressure, and $U^\mu$ is the four-velocity of the comoving fluid. In
the comoving frame $U^\mu = (c, 0, 0, 0)$ and the tensor is diagonal,

$$
T^\mu{}_\nu = \operatorname{diag}\!\left(-\rho c^2,\ p,\ p,\ p\right).
$$

The single time–time component is the energy density; the three equal spatial
components are the isotropic pressure. No other structure survives isotropy: heat
flux would pick out a direction, and anisotropic stress would distinguish axes.

Conservation $\nabla_\mu T^{\mu\nu} = 0$ applied to this source, using the
Christoffel symbols of the FLRW metric, gives the $\nu = 0$ component

$$
\dot\rho + 3\,\frac{\dot a}{a}\left(\rho + \frac{p}{c^2}\right) = 0.
$$

This is the **fluid equation**. Its two terms have a thermodynamic reading:
$\dot\rho$ is the change in density, the $3(\dot a/a)\rho$ term is dilution by
the growth of proper volume $V \propto a^3$, and the pressure term is the work
$p\,\d V$ done by the fluid as the volume expands. The fluid equation is the
first law of thermodynamics for a comoving volume of the cosmic fluid.[^hartle-fluid]

## The Friedmann equations

Evaluating the Einstein equation $G_{\mu\nu} + \Lambda g_{\mu\nu} = \dfrac{8\pi
G}{c^4}T_{\mu\nu}$ on the FLRW metric requires the Einstein tensor of that
metric. The time–time component gives the first **Friedmann equation**,

$$
\left(\frac{\dot a}{a}\right)^2 = \frac{8\pi G}{3}\rho - \frac{k c^2}{a^2}
+ \frac{\Lambda c^2}{3},
$$

and any spatial diagonal component gives the second, the **acceleration
equation**,

$$
\frac{\ddot a}{a} = -\frac{4\pi G}{3}\left(\rho + \frac{3p}{c^2}\right)
+ \frac{\Lambda c^2}{3}.
$$

The three relations — the two Friedmann equations and the fluid equation — are
not independent: differentiating the first Friedmann equation and using the
fluid equation reproduces the acceleration equation. Any two of the three
determine the third. The standard practice is to take the first Friedmann
equation together with the fluid equation and an equation of state relating $p$
to $\rho$.

Two features of the acceleration equation deserve emphasis.

- **Pressure gravitates.** The source of deceleration is $\rho + 3p/c^2$, not
  $\rho$ alone. In general relativity pressure carries weight; a fluid with
  large positive pressure decelerates the expansion more than its energy density
  alone would suggest.
- **Negative pressure accelerates.** If $\rho + 3p/c^2 < 0$, that is $p < -\rho
  c^2/3$, the expansion accelerates even without the explicit $\Lambda$ term. A
  cosmological constant is one way to supply such a source.

The cosmological constant can be absorbed into the fluid as a component with
energy density and pressure

$$
\rho_\Lambda = \frac{\Lambda c^2}{8\pi G},
\qquad
p_\Lambda = -\rho_\Lambda c^2.
$$

This vacuum component has equation of state $p = -\rho c^2$ and satisfies
$\rho + 3p/c^2 = -2\rho_\Lambda c^2 < 0$, so it drives acceleration. From here on
$\Lambda$ is treated as one contribution to the total $\rho$ and $p$, and the
explicit $\Lambda$ terms are dropped from the Friedmann equations.[^carroll-friedmann]

## Critical density and the density parameters

Set $\Lambda$ into the fluid and evaluate the first Friedmann equation today, at
$H_0 = (\dot a/a)_0$. Solving for the density that would make the spatial
curvature vanish defines the **critical density**,

$$
\rho_c(t) = \frac{3 H^2}{8\pi G},
\qquad
\rho_{c,0} = \frac{3 H_0^2}{8\pi G}.
$$

Numerically $\rho_{c,0} \approx 9 \times 10^{-27}\ \text{kg}\,\text{m}^{-3}$, a
few hydrogen atoms per cubic metre. Express each density as a fraction of
critical with the **density parameter**

$$
\Omega_i = \frac{\rho_i}{\rho_c},
$$

one for each component: $\Omega_m$ for matter, $\Omega_r$ for radiation,
$\Omega_\Lambda$ for the cosmological constant. Divide the first Friedmann
equation by $H^2$ to write it as a sum rule,

$$
1 = \Omega_m + \Omega_r + \Omega_\Lambda - \frac{k c^2}{a^2 H^2}.
$$

Defining a curvature density parameter $\Omega_k = -kc^2/(a^2 H^2)$ makes the sum
exact,

$$
\Omega_m + \Omega_r + \Omega_\Lambda + \Omega_k = 1.
$$

The total matter-energy density parameter $\Omega = \Omega_m + \Omega_r +
\Omega_\Lambda$ fixes the spatial geometry directly:

- $\Omega > 1$: density above critical, $k = +1$, a **closed** universe.
- $\Omega = 1$: density exactly critical, $k = 0$, a **flat** universe.
- $\Omega < 1$: density below critical, $k = -1$, an **open** universe.

The connection between the density of the universe and its spatial curvature is
the content of the first Friedmann equation: geometry is not a free choice but is
set by how much the universe contains. Observations put the total $\Omega$ within
a few percent of unity, so the spatial geometry is close to flat.[^hartle-omega]

$$
% caption: The total density parameter Omega measured against unity fixes the
% spatial curvature: above critical density the space closes, exactly critical
% is flat, below critical the space is open.
\begin{tikzpicture}[>=stealth, font=\footnotesize, scale=1.0]
  \definecolor{acc}{HTML}{4A6FA5}
  % axis line for Omega
  \draw[black, thick, ->] (0,0) -- (7.2,0) node[anchor=north] {Omega};
  \foreach \x/\lab in {1.2/below, 3.6/one, 6.0/above} {
    \draw[black] (\x,0.08) -- (\x,-0.08);
  }
  \node[black, anchor=north] at (3.6,-0.12) {Omega = 1};
  \draw[acc, thick] (3.6,0) -- (3.6,2.4);
  \fill[acc] (3.6,2.4) circle (0.05);
  % markers
  \node[black, anchor=south] at (1.2,0.15) {open};
  \node[black, anchor=south] at (1.2,0.55) {k = -1};
  \node[acc, anchor=south] at (3.6,2.5) {Euclidean};
  \node[acc, anchor=north east] at (3.55,2.35) {k = 0};
  \node[black, anchor=south] at (6.0,0.15) {closed};
  \node[black, anchor=south] at (6.0,0.55) {k = +1};
\end{tikzpicture}
$$

## Equation of state and how densities dilute

Close the system with a linear **equation of state** $p = w\rho c^2$, with $w$ a
constant for each component. Substituting into the fluid equation,

$$
\dot\rho + 3\,\frac{\dot a}{a}\,(1 + w)\,\rho = 0
\quad\Longrightarrow\quad
\frac{\dot\rho}{\rho} = -3(1 + w)\,\frac{\dot a}{a},
$$

which integrates to a power law in the scale factor,

$$
\rho \propto a^{-3(1 + w)}.
$$

The three components of the standard model have different $w$ and therefore
dilute at different rates.

- **Matter** (pressureless dust: galaxies, dark matter), $w = 0$: $\rho_m
  \propto a^{-3}$. Density falls as the inverse proper volume; particle number is
  conserved and spread through a growing volume.
- **Radiation** (photons, relativistic particles), $w = \tfrac{1}{3}$: $\rho_r
  \propto a^{-4}$. Three powers from volume dilution plus one more from the
  redshift of each photon's energy, $E \propto 1/a$.
- **Vacuum** (cosmological constant), $w = -1$: $\rho_\Lambda \propto a^0 =
  \text{const}$. The vacuum energy density does not dilute as the universe
  expands; new volume comes with its own fixed energy density.

Because the exponents differ, the composition of the universe changes with
scale. Running the clock backward, radiation grows fastest and dominated the
earliest era; matter, diluting more slowly, took over next; the constant vacuum
term, negligible early, comes to dominate late. The crossovers are the
radiation–matter equality and the matter–$\Lambda$ equality.

$$
% caption: On log axes each component's density is a straight line in the scale
% factor: radiation falls as a to the fourth inverse power, matter as the third,
% vacuum stays flat, so radiation dominates early, matter next, vacuum last.
\begin{tikzpicture}[>=stealth, font=\footnotesize, scale=1.0]
  \definecolor{acc}{HTML}{4A6FA5}
  \draw[black, ->] (0,0) -- (7.4,0) node[anchor=north] {log a};
  \draw[black, ->] (0,0) -- (0,3.4) node[anchor=east] {log density};
  % radiation: steepest solid line, slope minus four
  \draw[very thick] (0.2,3.05) -- (6.2,0.3);
  \node[anchor=west] at (6.3,0.3) {radiation};
  % matter: shallower dashed line, slope minus three
  \draw[thick, dashed] (0.2,2.5) -- (6.2,0.75);
  \node[anchor=west] at (6.3,0.75) {matter};
  % vacuum: flat dotted line, slope zero
  \draw[black, thick, densely dotted] (0.2,1.15) -- (6.2,1.15);
  \node[black, anchor=west] at (6.3,1.18) {vacuum};
  % equality markers
  \draw[black] (3.5,0) -- (3.5,1.95);
  \node[black, anchor=south] at (3.5,2.0) {rad = matter};
  \draw[black] (4.83,0) -- (4.83,1.3);
  \node[black, anchor=south] at (4.83,1.35) {matter = vacuum};
\end{tikzpicture}
$$

## Expansion histories of the single-component eras

Within an era dominated by one component, the flat first Friedmann equation
$H^2 = \tfrac{8\pi G}{3}\rho$ with $\rho \propto a^{-3(1+w)}$ integrates to a
definite growth law. For $w \neq -1$,

$$
\left(\frac{\dot a}{a}\right)^2 \propto a^{-3(1+w)}
\quad\Longrightarrow\quad
a(t) \propto t^{\,2/[3(1 + w)]}.
$$

The three eras follow.

- **Radiation era** ($w = \tfrac{1}{3}$): $a(t) \propto t^{1/2}$. The expansion
  decelerates, $\ddot a < 0$, and the Hubble parameter falls as $H = 1/(2t)$.
- **Matter era** ($w = 0$): $a(t) \propto t^{2/3}$. Still decelerating, with
  $H = 2/(3t)$.
- **Vacuum era** ($w = -1$): the power law fails and the solution is
  exponential. With $\rho_\Lambda$ constant, $H = \sqrt{8\pi G\rho_\Lambda/3}$
  is constant and

$$
a(t) \propto e^{H t}.
$$

The vacuum-dominated phase is **de Sitter** expansion: constant $H$, accelerating
$a(t)$, never recollapsing. A universe that becomes vacuum-dominated expands
forever at an exponential rate. The present universe is entering this phase, with
$\Omega_\Lambda \approx 0.7$ already exceeding $\Omega_m$.[^carroll-eras]

$$
% caption: Single-component scale-factor histories: radiation grows as the square
% root of time and matter as the two-thirds power, both decelerating, while a
% vacuum-dominated universe grows exponentially and accelerates.
\begin{tikzpicture}[>=stealth, font=\footnotesize, scale=1.0]
  \definecolor{acc}{HTML}{4A6FA5}
  \draw[black, ->] (0,0) -- (5.0,0) node[anchor=north] {cosmic time t};
  \draw[black, ->] (0,0) -- (0,3.0) node[anchor=east] {scale factor a};
  % radiation t^1/2
  \draw[thick, dashed, domain=0.05:4.2, samples=60, variable=\t]
    plot ({\t},{0.82*(\t)^(0.5)});
  \node[anchor=west] at (4.25,1.6) {radiation};
  % matter t^2/3
  \draw[thick, domain=0.05:4.2, samples=60, variable=\t]
    plot ({\t},{0.72*(\t)^(0.6667)});
  \node[anchor=west] at (4.25,1.95) {matter};
  % vacuum exponential
  \draw[black, very thick, densely dotted, domain=0.05:3.6, samples=60, variable=\t]
    plot ({\t},{0.32*exp(0.55*\t)});
  \node[black, anchor=south west] at (3.0,2.55) {vacuum};
\end{tikzpicture}
$$

## The fate of the expansion

Whether the universe expands forever or recollapses depends on the balance
between the density content and the curvature term. Turning points of $a(t)$
occur where $\dot a = 0$, that is where the first Friedmann equation gives

$$
\frac{8\pi G}{3}\rho = \frac{k c^2}{a^2}.
$$

With no cosmological constant, only $k = +1$ (a closed, over-critical universe)
admits such a turning point: the density term falls off more slowly than
required and the right side catches up, halting the expansion and driving a
recollapse to a big crunch. Flat and open universes ($k = 0, -1$) with ordinary
matter expand forever, decelerating but never stopping.

A positive cosmological constant changes the ending. Because $\rho_\Lambda$ stays
constant while matter and radiation dilute, the vacuum term eventually dominates
the first Friedmann equation regardless of $k$, and the expansion tends to the de
Sitter exponential. A closed universe with sufficient $\Lambda$ expands forever
rather than recollapsing; the fate is no longer read off from the spatial
curvature alone. The observed universe, with $\Omega_m \approx 0.3$ and
$\Omega_\Lambda \approx 0.7$, is spatially near-flat and headed for eternal
accelerating expansion.

$$
% caption: Fate of the scale factor: a closed matter universe rises to a maximum
% and recollapses, flat and open matter universes expand forever while
% decelerating, and a vacuum-dominated universe turns upward into accelerating
% growth.
\begin{tikzpicture}[>=stealth, font=\footnotesize, scale=1.0]
  \definecolor{acc}{HTML}{4A6FA5}
  \draw[black, ->] (0,0) -- (6.4,0) node[anchor=north] {cosmic time t};
  \draw[black, ->] (0,0) -- (0,3.2) node[anchor=east] {scale factor a};
  % closed: rise and fall
  \draw[black, thick, dashed] (0,0) to[bend left=38] (3.6,0);
  \node[black, anchor=south] at (1.8,1.55) {closed, recollapse};
  % flat: decelerating rise
  \draw[thick] (0,0) .. controls (2.0,1.6) and (4.0,2.0) .. (6.2,2.35);
  \node[anchor=north west] at (4.6,2.05) {expands forever};
  % accelerating vacuum: upturn
  \draw[acc, very thick, densely dotted] (0,0) .. controls (2.6,0.7) and (4.2,1.6) .. (5.8,3.05);
  \node[acc, anchor=east] at (5.75,2.9) {accelerating};
\end{tikzpicture}
$$

## The hand-off to cosmology

The Friedmann equations turn the geometric scale factor into a dynamical
variable whose evolution is fixed by the matter content, and the density
parameters compress the whole model into a handful of numbers. This is the point
where relativity as a theory of spacetime geometry becomes cosmology as a
quantitative science. A dedicated cosmology subject develops what follows: the
thermal history of the hot early universe, primordial nucleosynthesis and the
origin of the light elements, the microwave background as a snapshot of the last
scattering surface, the growth of structure from small perturbations, and the
evidence for dark matter and dark energy that fixes the density parameters.

The FLRW metric and the Friedmann equations are the shared foundation of all of
it. The expanding-universe kinematics and cosmological dynamics carry directly
into a full treatment of
[the FRW metric and cosmological redshift](/astrophysics-cosmology/cosmology-expansion-and-dynamics/the-frw-metric-and-cosmological-redshift),
[the Friedmann equations and cosmic dynamics](/astrophysics-cosmology/cosmology-expansion-and-dynamics/the-friedmann-equations-and-cosmic-dynamics),
and
[dark energy and the accelerating universe](/astrophysics-cosmology/cosmology-expansion-and-dynamics/dark-energy-and-the-accelerating-universe),
where the same equations derived here from general relativity are matched
against the observations.

[^hartle-fluid]: **Hartle**, _Gravity_, Ch. 18 — the perfect-fluid stress–energy tensor for a homogeneous isotropic universe and the local energy-conservation (fluid) equation.

[^carroll-friedmann]: **Carroll**, _Lecture Notes on General Relativity_, §8 — the Friedmann equations from the Einstein equation on the Robertson–Walker metric, the acceleration equation, and the cosmological constant as vacuum energy. arXiv:gr-qc/9712019.

[^hartle-omega]: **Hartle**, _Gravity_, Ch. 18–19 — the critical density, the density parameters, and the relation between total density and spatial curvature.

[^carroll-eras]: **Carroll**, _Lecture Notes on General Relativity_, §8 — equations of state, the dilution of matter, radiation, and vacuum energy, and the corresponding expansion histories. arXiv:gr-qc/9712019.
