# Equivalence Relation and a Function

## Homework Statement

Suppose that A is a nonempty set and R is an equivalence relation on A. PROVE that there is a function f with A as its domain such that for x and y in A, xRy (x is related to y) if and only if f(x)=f(y)

## Homework Equations

Equivalence relations are relations that are reflexive, symmetric, and transitive.

Theorem: If R is an equivalence relation on a set A. Then, the equivalence classes of R form a partition of A. (The converse is also true).

## The Attempt at a Solution

My guess on this is that we are supposed to use the theorem with relations, and partitions that I stated above. Where I get confused is where do these functions tie in, and I am completely clueless on where to get started here. Any ideas would be great. Thanks.