I'm really strict on definitions and when I was reading a linear algebra book, it briefly defines what the components of a function are:

Linear Algebra Function Screenshot

However, I've been taught (along with some other websites state) that a function is a rule that maps elements from a domain to a codomain, contradicting the first definition since the rule is only part of a function. Even Spivak's calculus textbook defines a function as:

Spivak Calculus Function Screenshot

In the linear algebra book that provided the first definition, the author says that people have become sloppy as to say that "a function $f$ maps elements from a domain to a codomain" even though a function doesn't do the mapping, only $f$ (a part of the function) does the mapping since it is the rule of the function. The author finds this actually beneficial, that using the same symbol to represent the function and the rule provides a more tractable way of speaking about functions. This is what I think happened, where people have talked about functions by saying that its a rule to provide a more "tractable" way.

So is this actually true, that the definition of "a function being a rule which maps..." is a result from people being sloppy and trying to create an easier way to define it or is this actually the correct definition?

  • 2
    $\begingroup$ Spivak's book says "provisional definition." And yes, the definition of a function is what is in your first screenshot. Namely, $f \subset A \times B$ is said to be a function if for all $a\in A$, there exists a unique $x \in A\times B$ such that $x_1 = a$. It is standard to use the notation $f:A\to B$ and $f(a) = b$ where $b = x_2$ (in the previous notation) $\endgroup$
    – Andrew
    Commented Sep 26, 2023 at 1:47

2 Answers 2


Really none of the definitions you have linked corresponds to the rigorous interpretation of a function used in most of modern mathematics.

We generally don't define a function in terms of rules or procedures or anything of the sort. A function $f\colon X\to Y$ is simply defined to be a subset of the cartesian product $\Gamma\subseteq X\times Y$ such that for every $x\in X$, there is a unique $y\in Y$ such that $(x,y)\in\Gamma$. Then "$f(x)$" can be defined as that unique $y$.

You can think of this as the "vertical line test" made formal. In other words, while informally we think of functions as rules or procedures for cooking up outputs from inputs, formally we identify a function with its graph.

This distinction becomes particularly important when we start using the axiom of choice, which asserts the existence of certain functions without giving any rule or procedure for getting the output from the input.

  • 1
    $\begingroup$ In practice we also often consider functions to "know about" their codomain, One way to formalize this is to say functions $X \to Y$ are triples $(X, Y, \Gamma)$ where $\Gamma \subset X \times Y$ satisfies ..., though this is rarely done explicitly. Of course including the domain $X$ is optional since you can recover it from $\Gamma$. $\endgroup$
    – ronno
    Commented Sep 26, 2023 at 2:30

I think the term is much better described in computer science but essentially it is a map:"Give me input(s) and I will give you a output".

  • 2
    $\begingroup$ As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center. $\endgroup$
    – Community Bot
    Commented Sep 26, 2023 at 2:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .