A relation is an equation that shows how variables are related. For example. y=x^2 is a relation. A function is something that has exactly one value for any value in its domain. So for a function similar to the relation y=x^2, you can define a function f(x)=x^2 because any value of x gives you exactly one value for f(x). However, you can't define a function that gives you all the pairs of numbers that work in the relation above in a way that for any y you will get only one x=f(y), because if y=4, x can be 2 or -2.Another example is temperature. Let's say there is a formula that determines the temperature of a place. Any place then has exactly one temperature. But it is possible that a temperature is at many places. So temperature can be a function of place, but place cannot be a function of temperature.