# Critical density as a function of scale factor

I am trying to do some cosmology problems. In an exercise given by my teacher he wrote the following: $$\Omega_m(a) = \frac{\rho_M(a)}{\rho_{crit}(a)} = \frac{\rho_{M,0}/a^3}{\rho_{crit}(0)(H/H_0)^2}.$$ I understand that the mass density changes with respect to the scale factor: $$\rho_M(a) \equiv \frac{\rho_{M,0}}{a^3}.$$ But what I thought was that the critical density was equal to the following: $$\rho_{crit}(a)\equiv\frac{H^2}{H_0^2}.$$

But aparently this is musguided.

Why was my teacher able to do the substitution on the denominator of the first equation?

### edit

After looking at it I might have the mass density definition be wrong: $$\rho_M(a) \equiv \frac{\rho_{M,0}}{a^3 \rho_{crit}(0)}.$$ Is this the right conclusion?

The Hubble parameter is defined in terms of the critical density, at any time (or scale factor $a$) as \begin{equation}H^2(a)=\frac{8\pi G}{3}\rho_c(a).\end{equation} Then, evaluating the expression at $a=a_0$, you get \begin{equation} H_0^2=\frac{8\pi G}{3}\rho_{c,0},\end{equation} and combining both expressions \begin{equation}\rho_c(a)=\left(\frac{H(a)}{H_0}\right)^2\rho_{c,0},\end{equation} which is the expression used in the denominator of your first equation.
Two comments: Regarding your edit, the first expression you wrote was right ($\rho_M(a)=\rho_{M,0}/a^3$).
Regarding the notation, you should have clear that to evaluate the "sub zero" quantities (such as $\rho_{M,0}$ or $H_0$), you are evaluating them at $a=a_0$, not at $a=0$, which would be the origin of the universe. In your first equation you wrote $\rho_{crit}(0)$ while you meant $\rho_{crit}(a_0)$. Usually, one defines, without any loss of generality, $a_0=1$, as you did in your expression for $\rho_M(a)$.