What is a function?
NOTE: This is a translation of the original post in Spanish: ¿Qué es una función?.
Imagine the following situation:
While you are ordering your closet, a family member sneaks up to surprise you. What is your reaction?
The described situation is composed of three parts:
- An stimulus: The surprise (caused by your family member).
- The response: your reaction.
- The surprised person.
Interestingly, that is described in our situation is known in mathematical language as a function.
If you want, a function is the way to relate (or associate) a response to a given stimulus. Such notion can be applied to non-mathematical situations, as the one we describe above, or you might think in the reaction of a system (initially at equilibrium) under an exerted perturbation.
Why are functions important in mathematics?
Mathematics, built as a self-consistent corpus of knowledge standing on a set of axioms, provide the structural language of science. Within this language, functions allow us to build quantitative models to explain the responses of systems to certain stimuli.
Nowadays, Deep Neural Networks (abbreviated DNNs), which are a fundamental component of Artificial Intelligence models like ChatGPT, Gemini or DeepSeek, are nothing but huge (and complex) functions that enable us to retrieve concrete answers to the questions they are asked.