I need help to get started with proving the 'only if' part of the following claim:

Let r be a relation. Define ~ to be the intersection of all equivalence relations containing r (So ~ is an equivalence relation.)

Show that x~y if and only if one of the following holds:

i) x=y

ii) (x,y) r'

iii) there exist such that where (x,y) r' means (x,y) r or (y,x) r and i=1,...,n-1