So, what is a function? (ENG / SPA)

So, what is a function?

Perhaps when a person hears the word “function”, the first thing that comes to mind has to do with a theatrical performance, a biological operation, or even the “functioning” of a device. But for anyone who spent a few years in elementary school, it will also likely recall certain mathematical things that used to be graphed and for which one had to solve for “x”—something that could be quite difficult. And in the relatively recent times of COVID lockdowns, many surely heard scientists on television talk about functions or about “flattening the curve,” referring to the curve of a function.

Well, the word function is not used in mathematics today in the same way it was used in the past; like many others, it has undergone semantic shifts. Until the beginning of the nineteenth century, function referred to an arithmetic expression and, in general, to the solution of algebraic equations. The broad concept of a function as an arbitrary correspondence between two variables was given by Dirichlet, explicitly, in 1854, in a sense broader than the current one. Until the middle of the last century, mathematicians spoke of uniform and multiform functions, but today only those previously considered uniform are regarded as functions.

A Function Is a Law of Assignment

A function is a law of assignment or relation by which a variable “y” is determined by (depends on) another variable “x” (the independent variable), provided that to each value of “x” within a certain set, called the domain, there corresponds a single, well-defined value of “y”.

More simply, functions are matchmaking formulas for pairs of numbers. I give a number to a function and it returns another specific number. One possible source of confusion is that the word function is used both for the dependent variable itself and for the relation between the independent and dependent variables.

Thus, we have the parabolic function y =x^2, which means that a number “x” is multiplied by itself (that is, squared) to obtain another number “y”.

The graphical result is the following:

image.png

Now, in order to mark the difference between what is a function and what is not, let us see what happens when, in the same coordinate system, we propose the assignment rule y^2 = x

We obtain a horizontal parabola.

image.png

Here we see that to each number “x” there correspond two numbers “y”. According to the modern definition of function, this disqualifies it as such: each number “x” must have only one number “y”. The values of “y” may be repeated, as in the first parabola, but not the values of “x”. Graphically, this can be expressed by the vertical line test: a graph does not represent a function if, when a vertical line (parallel to the y-axis) is passed through it, the line intersects the graph more than once. This happens with the horizontal parabola but not with the vertical one; therefore, the former is not a function, whereas the latter is.

Incidentally, note that this multiform function—the horizontal parabola—can be split into two uniform functions, both starting at zero, one taking the negative values and the other the positive values of the graph.

Another example is the identity function, so called because the correspondence between the values of “x” and those of “y” is identical:

𝑦 = 𝑥

When x equals 1, y also equals 1; when x equals 97, y also equals 97, and so on for every number considered (that is, for the entire domain). It is a linear function because it produces a straight line, as can be seen in the graph.

image.png

Have you seen functions of more than the two variables “x” and “y”? Of course there are such functions. For example, the area of a rectangle is written as

y = l * h;

l is a side and h is the height (a convention in Spanish that comes from the English word height). What matters is not the variables themselves or the symbols themselves, but the fact that to each element of the domain there corresponds exactly one element of the codomain or image—that for each input there is a unique output. Moreover,
𝑙 * ℎ yields a number that we may call x, or we may define x as 𝑙 * ℎ; there is no problem with that.

There are also constants, such as the famous pi,
π ≈ 3.14 which always has the same value—though it could just as well be any other number.

And where are those “f’s”? The notation f(x), conventionally pronounced “f of x,” is simply a shorthand way of expressing, for example,

y = x^3 + x^2 + x

It expresses all of that, but it is usually used as a replacement for y, so that
𝑦 = 𝑓(𝑥).

Finally, I leave you with another definition of function, taken from Michael Spivak’s Calculus:

A function is a collection of pairs of numbers with the following property: if (𝑎, 𝑏) and (𝑎,𝑐) both belong to the collection, then b = c; in other words, the collection must not contain two distinct pairs with the same first element. [Spivak, Calculus, p60, 2° ed, 4° reprint 1998]

Sources

Spivak, Michael. Calculus. Editorial Reverté 2° ed, 4° reprint 1998
Tarski, Alfred. Introducción a la lógica y a la metodología de las ciencias deductivas. Espasa-Calpe Argentina, 1°ed 1951
Rey Pastor; Pi Calleja; Trejo. Análisis matemático; volumen 1. Editorial Kapelusz, 7°ed 1963

Translated from Spanish with ChatGPT
Graphics done by me with Desmos




¿Y qué es una función?

Quizá cuando una persona escucha la palabra “función”, lo primero que le venga a la mente tenga que ver con un espectáculo teatral, una operación biológica o incluso el “funcionamiento” de un artefacto. Pero para todos los que hayan ido a la escuela primaria unos años, seguramente también les recordará a unas cosas matemáticas que solían graficarse y que había que despejar “equis”, lo que podía ser difícil. Y, en los relativamente recientes tiempos de cuarentenas covidianas, seguramente escucharon hablar a algunos científicos por televisión de funciones o de “aplanar la curva”, refiriéndose a la curva de una función.

Bueno, la palabra “función” no se usa hoy en matemáticas como se usaba antes; como tantas otras, también ha sufrido sus deslizamientos semánticos. Hasta comienzos del siglo 19, “función” refería a una expresión aritmética y, en general, a la resolución de ecuaciones algebraicas. El concepto de función como correspondencia arbitraria entre dos variables fue dado explícitamente por Dirichlet en 1854, todavía de un modo más amplio que el actual: hasta mediados del siglo pasado, se hablaba de funciones uniformes y multiformes, pero ahora sólo las consideradas previamente como uniformes son consideradas funciones.

Una función es una ley de asignación

Una función es una ley de asignación o relación por la que una variable “y” es determinada (depende de) por otra variable “x” (independiente) siempre que a cada valor de “x” dentro de un cierto conjunto, llamado “dominio”, le corresponde un valor determinado de “y” único.

Más simplemente, las funciones son fórmulas de casamiento para parejas o pares de números. Le doy un número a una función y esta me devuelve otro en específico. Una posible confusión es que se llama función tanto a la variable dependiente por sí sola como a la relación entre las variables independiente y dependiente.

Así, tenemos la función de parábola y = x^2, que significa que a un número “x” lo multiplico por sí mismo (eso es elevar al cuadrado) y obtengo otro número “y”.
El resultado gráfico es el siguiente:

image.png

Ahora bien, y para marcar la diferencia entre lo que es una función y lo que no lo es, veamos lo que pasa cuando, para el mismo sistema gráfico, planteamos la ley de asignación y^2 = x.
Obtenemos una parábola horizontal:

image.png

Aquí se ve que a cada número de “x” le corresponden dos números de “y”. Eso, por la moderna definición de función, la descalifica como tal: cada número “x” debe tener un sólo número “y”. Los números “y” pueden estar repetidos, como en la primera parábola, pero no los números “x”.

Gráficamente, esto puede expresarse como el criterio de la regla vertical: una gráfica no es de una función si al pasar una regla verticalmente por ella (paralelamente al eje de los números “y”), la regla toca a la función dos veces. Esto pasa en la parábola horizontal pero no en la vertical, por lo que la horizontal no es función y la vertical sí.

Por cierto, obsérvese que esto que se llamaba una función multiforme y ahora está en el grupo de relación o correspondencia no funcional, la parábola horizontal, puede partirse en dos funciones uniformes, ambas comenzando en cero pero una tomando los valores negativos (debajo del eje horizontal) y la otra los positivos de la gráfica. Dicho de otro modo, las funciones son relaciones unívocas, un tipo de relación entre otras posibles, como las de orden y las de inclusión y las multivariables.

Otro ejemplo: la función identidad, llamada así porque la correspondencia entre los valores de “x” y los de “y” es la correspondencia idéntica: y = x.

Cuando x vale 1, también y vale 1; cuando x vale 97, también y vale 97 y así para todo número considerado (o sea, para todo el dominio). Es una función lineal porque da una línea recta, como se ve en el gráfico.

image.png

¿Has visto funciones de más de dos variables “x” e “y”? Claro que las hay. Por ejemplo, el área del rectángulo se escribe así:

y = l * h;

"l" es un lado y "h" es la altura (costumbre que hay en el español que viene del inglés “height”). Si bien esta se llama función de dos variables porque se consideran, al nombrar así, las variables independientes; en cambio, a la variable dependiente “y” se la nombra simplemente función. Así, se dice de este área que es una función de dos variables (la variable “y” es función de otras dos).

Bueno, lo importante no son las variables en sí, los símbolos en sí, sino que a cada elemento del dominio le corresponde exactamente un elemento del codominio o imagen; que por cada entrada hay una salida única. Y además, l * h da un número que podemos llamar x, o a x podemos definirla como l * h. No hay problema.

Y también hay constantes, como el famoso pi: ϖ = 3,14… que siempre tienen el mismo valor, pero también puede ser cualquier número.

¿Y dónde están esas “efes”? f(x), pronunciado convencionalmente “efe de equis” es simplemente una forma abreviada para expresar, por ejemplo, y= x^3 + x^2 + x. Expresa todo eso pero habitualmente se la usa en “reemplazo” de la y, tal que y = f(x).

Finalmente, les dejo otra definición de función, tomada del libro Calculus de Michael Spivak:

Una función es una colección de pares de números con la siguiente propiedad: Si (a, b) y (a, c) pertenecen ambos a la colección, entonces b = c; en otras palabras, la colección no debe contener dos pares distintos con el mismo primer elemento [Spivak, Calculus, p60, 2° ed, 4° reprint 1998]

Fuentes

Spivak, Michael. Calculus. Editorial Reverté 2° ed, 4° reprint 1998
Tarski, Alfred. Introducción a la lógica y a la metodología de las ciencias deductivas. Espasa-Calpe Argentina, 1°ed 1951
Rey Pastor; Pi Calleja; Trejo. Análisis matemático; volumen 1. Editorial Kapelusz, 7°ed 1963

Gráficos hechos por mí con Desmos