I am having difficulties proving the relation IS an equivalence relation.

Let $f: X\longrightarrow Y$ be a function from a set $X$ onto a set $Y$. Let $R$ be the subset of $X \times X$ consisting of those pairs $(x, x')$such that $f(x)= f(x')$. Prove that $R $ is an equivalence relation . Let $ \pi: X\longrightarrow X/R$ be a projection. Verify that, if $ \alpha \in X/R$ is an equivalence class, to define $F(\alpha) = F(a)$, whenever $\alpha = \pi (a)$, establishes a well-defined function $F: X/R \longrightarrow Y$ which is one-to-one and onto.