Function, in mathematics, an expression, rule, or law that defines a relationship between one variable (the independent variable) and another variable (the dependent variable).
A function in maths is a special rule or relationship that assigns each input (usually called x) exactly one output (usually called y or f (x)). In other words, for every value you put into the function, you get only one value out.