# What does it mean for a relation to be a function?

The relation that defines the set of inputs to the set of outputs is called the functions.

## Answer: It can be easily concluded that a function is a relation when each input has a single output.

**Explanation:**

A relation from a set A to a set B is called a function when every element of A is exactly related to one element in B. That is, given an element x in A, there is only one element in B that x is related to.

For example, consider the following sets A and B. I'll provide you with a relation between A and B, for both cases, one that is not a function and the other that is.

A = {1, 2, 3}

B = {a, b, c, d}

Relation from A to B: {(1,a), (2,b), (2,c), (3,d)}

This relation is not a function from A to B because the element 2 in A is related to two different elements, b and c.

Relation from A to B that is a function: {(1,d) , (2,d) , (3, a)}

This is a function since each element from X is related to only one element in Y. Note that it is okay for two different elements in X to be related to the same element in Y. It's still a function, it's just not a one-to-one function.