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$
14
  • 6
    $\begingroup$ Whether the codomain is considered depends on the context. In set theory, the codomain is not considered. In various other situations, the codomain is considered, and two functions with the same domain and graph but different codomains would be considered different. $\endgroup$ Commented yesterday
  • $\begingroup$ Concerning the role of the codomain and surjectivity see math.stackexchange.com/q/2324433/349785 $\endgroup$ Commented yesterday
  • 2
    $\begingroup$ I vote for "reopen". The question is not "What is a function?", the OP is aware that there are different interpretations and explicitly asks "Which definition is more accepted and followed at higher levels like in real analysis?" No answer was given so far - except repeating that there are different interpretations. $\endgroup$ Commented yesterday
  • 1
    $\begingroup$ @DermotCraddock: In set theory, the codomain is not considered. Source? $\endgroup$ Commented 17 hours ago
  • 2
    $\begingroup$ "Exotic"? Most set theory books I know define function as a special case of relation. In such case the codomain is a given. $\endgroup$ Commented 15 hours ago

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 yesterday
  • 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 yesterday
  • $\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 yesterday
  • $\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 yesterday
  • $\begingroup$ Please do not answer 10x duplicates since this is against the site guidelines. $\endgroup$ Commented 23 hours ago
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 23 hours ago

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.