👉 A function is a mathematical relation between two sets of values, such that each input value has only one output value. It describes how to map inputs to outputs or vice versa, and it is typically used in mathematics, computer science, and other fields where there are rules for manipulating data or equations. Functions can be defined using variables, parameters, or both, and they often involve mathematical operations such as addition, subtraction, multiplication, division, exponentiation, and more.