What are Functions?

In fields of mathematics such as algebra, calculus and trigonometry, a function is defined as a relation of any given set of domains, and another set of co-domains that associate with exactly one codomain.