5
$\begingroup$

My high-school textbook states the following definition:

Two functions $f(x)$ and $g(x)$ are said to be identical iff:

  1. $D_f$ = $D_g$

  2. $f(x) = g(x), \forall x \in D $

By this definition functions $f: \mathbb{R} \rightarrow \mathbb{R}, f(x) = x^2$ and $g: \mathbb{R} \rightarrow [0, \infty), g(x) = x^2$ are identical. However, the second one is surjective while the first one is not. So, how can the two functions be called identical if one is surjective while the other one is not?

Is this the correct definition of identical functions or is this an oversimplification for the high-school level?

My instructor said that the most accurate definition should be:

Two functions $f(x)$ and $g(x)$ are said to be identical iff:

  1. $D_f$ = $D_g$

  2. $f(x) = g(x), \forall x \in D $

  3. Codomain of $f$ = Codomain of $g$

I want to ask which definition is more accepted and followed at higher levels like in real analysis.

$\endgroup$
1
  • $\begingroup$ Comments have been moved to chat; please do not continue the discussion here. Before posting a comment below this one, please review the purposes of comments. Comments that do not request clarification or suggest improvements usually belong as an answer, on Mathematics Meta, or in Mathematics Chat. Comments continuing discussion may be removed. $\endgroup$ Commented Apr 12 at 9:31

2 Answers 2

10
$\begingroup$

Your instructor is correct (or at least likely has the most appropriate answer for the class you're in); a function is defined by a domain, a codomain, and a rule, and for two functions to be identical, each of these three components should be equal.

The typical formalisation of this concept is the definition of a function $f$ as a triple of sets $(X, Y, R)$, where $X$ is the domain of $f$, $Y$, is the codomain, and $R \subseteq X\times Y$ is such that for each $x \in X$ there is a unique $y \in Y$ such that $(x, y) \in R$; we denote this $y$ by $f(x)$.

In this way, it's clear that two functions $f = (X_f, Y_f, R_f)$ and $g = (X_g, Y_g, R_g)$ should be called identical if $X_f = X_g$, $Y_f = Y_g$, and $R_f = R_g$.

$\endgroup$
5
  • 1
    $\begingroup$ Sorry, I downvoted because I disagree: there are many contexts where it is convenient to work with a definition of "function" that does not require them to have codomains: material set theory being one, and arguably real analysis being another. I think algebraists and category theorists prefer functions to have codomains, but as I argue in my answer, I think that ultimately the difference is just cosmetic. $\endgroup$ Commented Apr 10 at 14:05
  • 4
    $\begingroup$ (I removed my downvote because I think it was too much, but I still do have reservations about saying one of the definitions is "correct" and the other is "incorrect".) $\endgroup$ Commented Apr 10 at 14:08
  • $\begingroup$ Fair enough - there is always ambiguity in these kinds of context-dependent definitions and perhaps correct/incorrect was insufficiently nuanced. I'm going to leave this answer here because I believe this formalisation of a function is by far the most common one, including in real analysis, where the analytic concepts (eg. open/closed maps) can rely on a specific codomain. I also think this definition is the one that most closely matches OP's level $\endgroup$ Commented Apr 10 at 16:01
  • $\begingroup$ Yes, I think the definition of "function" here is the more common one nowadays, and probably better matches how people think about functions in practice. But just to point out: you can still talk about open maps in the "codomain-free" formalism. You would just need to say that $f$ is an open map from the space $X$ to the space $Y$, rather than simply saying $f$ is an open map. $\endgroup$ Commented Apr 10 at 16:13
  • $\begingroup$ Please do not answer 10x duplicates since this is against the site guidelines. $\endgroup$ Commented Apr 11 at 7:11
6
$\begingroup$

I would like to argue that the difference between the two approaches is essentially cosmetic, and which definition of "function" you choose matters very rarely. In the first approach, it does not make sense to ask whether a function $f$ is surjective; after all, if $f$ is a function $X\to Y$, then given any set $Z$ such that $Y\subseteq Z$, it is also the case that $f$ is a function $X\to Z$. This is only a minor inconvenience, though: you can still say that $f$ surjects onto the set $Y$, rather than simply saying $f$ is surjective. Meanwhile, the first approach has the minor convenience that if we identify functions with their graphs (as is standard in axiomatic set theory), then we can talk about unions of functions – this is rather common in the context of axiomatic set theory, but less so elsewhere in mathematics.

$\endgroup$
1
  • $\begingroup$ Please do not answer 10x duplicates since this is against the site guidelines. $\endgroup$ Commented Apr 11 at 7:11

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.