My book says that the Ricci curvature is defined as: $$\rho(X,Y)=\sum_{i=1}^{n}\langle R_{X E_m}E_m,Y \rangle $$ where {$E_1, ... ,E_n$} are orthonormal. Also $$s=\sum_{j=1}^{n}\rho(E_j,E_j)$$
I have to proof that $\rho(X,Y)=\frac{1}{2}s\langle X,Y\rangle$ for $n=2$
What I have is: $$\rho(X,Y)=\langle R_{X E_1}E_1,Y \rangle+\langle R_{X E_2}E_2,Y \rangle$$ $$\frac{1}{2}s\langle X,Y\rangle=\langle R_{E_1 E_2}E_2,E_1 \rangle\langle X,Y \rangle$$ Where I have used that $\langle R_{E_1 E_2}E_2,E_1 \rangle=\langle R_{E_2 E_1}E_1,E_2 \rangle$ and $\langle R_{E_1 E_1}E_1,E_1 \rangle=0$
Any idea about how can I continue?
It's very easy (although probably a bit tedious) to work this all out in coordinates. We consider the $(0,4)$-type Riemann curvature tensor, $R(X,Y,Z,W)=g(R(X,Y)Z,W)$, since the coordinate symmetries are a bit nicer. In local coordinates, we can write $$R=R_{ijkl}dx^i\otimes dx^j\otimes dx^k\otimes dx^l.$$ In these coordinates the symmetries of the curvature tensor give us $$R_{ijkl}=-R_{jikl},\quad R_{ijkl}=-R_{ijlk}.$$ In particular, we see that $R_{iikl}=R_{ijkk}=0$ for any indices $i,j,k,l$. In the case of $n=2$ we see that the indices can only take values $1$ or $2$ and we find that $R_{1212}$ is the only nonzero coefficient of the Riemann curvature tensor (and of course all of the other coefficients determined only from it). This is important since it tells us that in dimension 2 that the Riemann curvature tensor is determined entirely by the scalar curvature.
Since the Ricci curvature of $X,Y$ is just the trace of the map $Z\mapsto R(Z,X)Y$ it isn't hard to check that if $\rho=R_{ij}dx^i\otimes dx^j$ in coordinates then $$R_{ij}=g^{kl}R_{kilj},$$ where $g^{ij}$ are the coefficients of $g^{-1}$ in coordinates. Similarly, one has that the scalar curvature is $$s=g^{rs}R_{rs}=g^{rs}g^{kl}R_{krls}.$$ Since $n=2$ we have $$R_{ij}=g^{11}R_{1i1j}+g^{12}R_{1i2j}+g^{21}R_{2i1j}+g^{22}R_{2i2j},$$ and so using the fact that $R_{1212}$ is the only nonzero coefficient we find that \begin{align} R_{11}&=g^{22}R_{2121}=g^{22}R_{1212},&&\qquad R_{12}=g^{21}R_{2112}=-g^{21}R_{1212},\\ R_{21}&=g^{12}R_{1221}=-g^{12}R_{1212},&&\qquad R_{22}=g^{11}R_{1212}. \end{align} To make everything easier at the end, suppose we are working in normal coordinates, i.e. $g_{ij}=\delta_{ij}$. Then $$s=R_{11}+R_{22}=2R_{1212},$$ and for any vector fields $X=X^i\partial_i$ and $Y=Y^i\partial_i$ written in these coordinates, we have $$\rho(X,Y)=X^iY^jR_{ij}=(X^1Y^1+X^2Y^2)R_{1212} $$ and $$s\langle X,Y\rangle=2(X^1Y^1+X^2Y^2)R_{1212}.$$ So we have the desired relationship $$\rho(X,Y)=\frac{1}{2}s\langle X,Y\rangle.$$