[guided]The modular function measures how a left Haar measure changes under right translation. To compute this infinitesimally, we express the left Haar measure locally using a left-invariant volume form.
Choose a nonzero alternating form
\begin{align*}
\omega_e:\Lambda^{\dim G}\mathfrak g\to \mathbb R.
\end{align*}
There is a unique left-invariant smooth volume form $\omega$ on $G$ with value $\omega_e$ at the identity. Explicitly, for $a\in G$ and $v_1,\dots,v_{\dim G}\in T_aG$,
\begin{align*}
\omega_a(v_1,\dots,v_{\dim G})
=
\omega_e(d(L_{a^{-1}})_a v_1,\dots,d(L_{a^{-1}})_a v_{\dim G}).
\end{align*}
Now fix $g\in G$. Since right translations commute with left translations, $(R_g)^*\omega$ is also left invariant. Therefore it is enough to compute its value at $e$. For $X_1,\dots,X_{\dim G}\in\mathfrak g$,
\begin{align*}
((R_g)^*\omega)_e(X_1,\dots,X_{\dim G})
=
\omega_g(d(R_g)_eX_1,\dots,d(R_g)_eX_{\dim G}).
\end{align*}
By the definition of the left-invariant form at the point $g$, this equals
\begin{align*}
\omega_e(d(L_{g^{-1}})_g d(R_g)_eX_1,\dots,d(L_{g^{-1}})_g d(R_g)_eX_{\dim G}).
\end{align*}
The composition $L_{g^{-1}}\circ R_g$ is the conjugation map $C_{g^{-1}}:h\mapsto g^{-1}hg$, so its differential at $e$ is $\operatorname{Ad}_{g^{-1}}$. Hence
\begin{align*}
((R_g)^*\omega)_e(X_1,\dots,X_{\dim G})
=
\omega_e(\operatorname{Ad}_{g^{-1}}X_1,\dots,\operatorname{Ad}_{g^{-1}}X_{\dim G}).
\end{align*}
By the defining property of the determinant on top exterior powers,
\begin{align*}
(R_g)^*\omega=\det(\operatorname{Ad}_{g^{-1}})\omega.
\end{align*}
The left-invariant measure associated to $|\omega|$ is a left Haar measure. With the convention
\begin{align*}
(R_g)_*\mu=\Delta(g)\mu,
\end{align*}
the preceding scaling formula gives
\begin{align*}
\Delta(g)=\left|\det(\operatorname{Ad}_{g^{-1}})\right|.
\end{align*}
Because $G$ is connected, the [continuous function](/page/Continuous%20Function) $g\mapsto \det(\operatorname{Ad}_{g^{-1}})$ cannot change sign, and it equals $1$ at $g=e$. Thus it is positive everywhere, so
\begin{align*}
\Delta(g)=\det(\operatorname{Ad}_{g^{-1}}).
\end{align*}
Finally take $g=\exp(tX)$ for $X\in\mathfrak g$. The adjoint representation differentiates to the infinitesimal adjoint action, so
\begin{align*}
\operatorname{Ad}_{\exp(-tX)}=\exp(-t\,\operatorname{ad}_X).
\end{align*}
Applying the determinant-trace formula for finite-dimensional endomorphisms,
\begin{align*}
\det(\exp A)=\exp(\operatorname{tr}A),
\end{align*}
with $A=-t\,\operatorname{ad}_X$, gives
\begin{align*}
\Delta(\exp(tX))
=
\exp(-t\,\operatorname{tr}(\operatorname{ad}_X)).
\end{align*}
Taking the derivative at $t=0$ after applying $\log$ yields
\begin{align*}
d(\log\Delta)_e(X)=-\operatorname{tr}(\operatorname{ad}_X).
\end{align*}
This is the infinitesimal modular character.[/guided]