What is the Definition of a Function?

A function is a mathematical term that defines the values of a given set with another element. Also, a function can be what something is used for.