Relation : Cartision product of sets
Function : If unique element in A is joined to any element in B 

     example : Find relation and function between A and B
                     A = (1,2,3) B = (A,B,C)
             ans :
Relation : (1,A) (2,A) (3,A) (1,B) (2,B) (3,B) (1,C) (2,C) (3,C)
                     Function : (1,A) (2,A) (3,C)
In the old "Schoolhouse Rock" song, "Conjunction junction, what's yourfunction?," the word function means, "What does a conjunction do?" The famous design dictum "form followsfunction" tells us that an object's design should reflect what it does.Function is one of those words that gets used a lot and means lots of different things. It means what something does, but also what a person does, whether something or someone is doing what they should, and crazily enough, a big party. "Your function is to bring the senator coffee at the political function. He cannot function without it."

Relation is a word that can describe a connection — between relatives or any two entities. You might consider your cousin as your relation, and you might have strained relations with him over your grandmother's estate.
The way that one thing affects another is their relation like the relation between childhood poverty and poor nutrition, for example. You can also call your relative a relation, as when you describe your great-grandfather as your oldest living relation. The phrase no relation means that even though two people share the same last name, they are not related — or aren't relations.

Hope this helps:)