# Kähler–Einstein metric on Calabi–Yau manifold

I am reading "Complex geometry" by D. Huybrecht. On p.223 the books says that "If $c_{1}(X)=0$, e.g. if the canonical bundle $K_{X}$ is trivial, and $g$ is Kähler–Einstein metric, then $\operatorname{Ric}(X,g)=0$. Indeed in this case the scalar factor $\lambda$ is necessarily trivial and hence $\operatorname{Ric}(X,g)=\lambda\omega=0$, i.e. the Kähler metric $g$ is Ricci-flat."

Remember that we say a metric $g$ is Kähler–Einstein if $\operatorname{Ric}(X,g)=\lambda \omega$ for some constant $\lambda\in \mathbb{R}$. Here $\omega$ is the Kähler form associated to $g$.

My question is, why does Kähler–Einstein mean $\lambda=0$ in $c_{1}(X)=0$ case? If this is true, any Kähler–Einstein metric on Calabi–Yau manifold is Ricci-flat?

I now understand why; the scalar factor $\lambda$ can be explicitly computed as $$\lambda=\frac{2\pi \int_{X}c_{1}(X)\wedge \omega^{n-1}}{\int_{X}\omega^n}.$$ So Kähler–Einstein metric on Calabi–Yau manifold is necessarily Ricci flat metric!
Suppose $$X$$ is a compact complex manifold with $$c_1(X)=0$$, i.e., $$c_1(-K_X)=0$$, where $$-K_X$$ denotes the dual of the canonical bundle. Suppose $$X$$ admits a Kähler-Einstein metric $$\omega$$ with $$\text{Ric}(\omega) = \lambda \omega$$. We want to show that $$\lambda =0$$.
By Chern-Weil theory, the de Rham cohomology class represented by the Ricci form of a Kähler metric represents $$2\pi c_1(-K_X)$$. Hence, $$2\pi c_1(-K_X) = \{ \text{Ric}(\omega) \} = \lambda \{ \omega \},$$ and this implies $$\lambda =0$$ if $$\{ \omega \} \neq 0$$. To verify that $$\{ \omega \} \neq 0$$, proceed by contradiction and suppose that $$\{ \omega \} =0$$ in $$H_{\text{DR}}^2(X, \mathbf{R})$$. The $$\partial \bar{\partial}$$-lemma then implies that $$\omega = \sqrt{-1} \partial \bar{\partial} \varphi$$ for some $$\varphi \in \mathcal{C}^{\infty}(X, \mathbf{R})$$. Taking the trace with respect to the metric $$\omega$$, we see that $$\Delta_{\omega} \varphi : = \text{tr}_{\omega}(\sqrt{-1} \partial \bar{\partial} \varphi) = \text{tr}_{\omega}(\omega) = \dim_{\mathbf{C}} X >0$$. By the maximum principle, $$\varphi =0$$ and this contradicts the non-degeneracy of $$\omega$$.