3
$\begingroup$

Let $f: \mathbb{R} \to \mathbb{R}, f(x) = x^2$, and $g: \mathbb{R} \to [0, \infty), g(x) = x^2$

From my understanding, functions are relations, therefore sets. So $f = \{(0, 0), (.32, .1024), (2, 4), \ldots \}.$ But also $g = \{(0, 0), (.32, .1024), (2, 4), \ldots \}.$ It seems to me like $f \subseteq g$ and $g \subseteq f$. So why don't we say $f = g?$

2 Answers 2

3

It's true that a function is a relation, but it's Very Convenient to be more specific, and agree that a function $f:X \to Y$ is a relation "from $X$ to $Y$", with both sets explicitly given as part of the definition (in the sense of Fred's answer). If the codomain is not explicitly specified in advance, for example,

  • The concept of "surjectivity" loses its usefulness: Every function is surjective to its image.

  • Families of functions "do not live in" (i.e., are not subsets of) a single universe $X \times Y$.

2

Two fuctions $f:A \to B$ and $g:C \to D$ are equal

iff

$A=C, B=D$ and $f(x)=g(x)$ for each $x \in A$.

In your above example we have $B \ne D$.

  • 0
    And what if the effective codomains are the same, even though the declared codomains differ?2017-01-19
  • 0
    (+1) Fully agree. A function is not only a set $G$ of pairs $(x,y)$, but a triplet $(G,A,B)$ such that &c.2017-01-19
  • 0
    @abiessu: The functions are different.2017-01-19
  • 0
    @Bernard: if it's a matter of convention, then okay. But is there an axiom-based argument for why this would be so?2017-01-19
  • 0
    @Bernard: to me the question comes down to whether the codomain is defined by what I say it should be or else it is defined by what the domain plus the function map make it to be.2017-01-19
  • 0
    It's also for a matter of consistency. In one case a function (or, rather, a map) will have an inverse, in the other it will not. This has been fixed since the beginnings of Bourbaki (~1935!)2017-01-19
  • 0
    @Bernard: now I'm missing something. How can $x^2$ have an inverse when any positive-to-negative interval is in the domain?2017-01-19
  • 0
    I was speaking in general. Suppose the domain of $x^2$ is $\mathbf R^+$, and the codomain is $\mathbf R$: this function won't have an inverse, whereas if the codomain is $\mathbf R^+$ it will.2017-01-19