6

My discrete mathematics book has the following problem:

22. Determine whether each of these functions is a bijection from $\mathbb{R} \to \mathbb{R}.$

c) $f (x) = \frac{x + 1}{x + 2}$


Since one element of the domain doesn't have an image, namely when $x = -2$, is $f(x) = \frac{x + 1}{x + 2}$ even a function?

  • We can define its domain to not include that point. Does your book have another example that is similar that is worked out? – abiessu Oct 15 '15 at 00:10
  • 1
    A function is a special relationship where each input has a single output. It does not have to be continuous for all points. if you can find at least 1 point where $f(x1)= v1$ and $f(x1)=v2$ where $v1$ is not equal to $v2$, then the relation is not a function. – NoChance Oct 15 '15 at 00:27
  • 6
    But a bijection from R to R must be defined on every R (this isn't) and every y in R must be y = f(x) for some x. This isn't a bijection from R to R. But it is a function. A function of a subset of R to a subset of R. – fleablood Oct 15 '15 at 00:35
  • Which discrete mathematics book? – Rodrigo de Azevedo Aug 14 '22 at 13:53
  • @RodrigodeAzevedo Please don't make nonsubstantive edits to old questions. That moves them to the active queue, which wastes the time of folks like me who watch that queue for new things. – Ethan Bolker Aug 14 '22 at 13:56

2 Answers2

14

The mapping you specify cannot be a function $\mathbb{R}\rightarrow\mathbb{R}$ since is it not defined for $x=-2$ It is injective on its domain but not onto since the equation $f(x) = 1$ is insoluable. It is, however a bijection from $\mathbb{R}-\{2\}$ to $\mathbb{R}-\{1\}$.

Specification of a function must include a domain and codomain. This example here shows why you must do that.

Noah Schweber
  • 245,398
ncmathsadist
  • 49,383
  • 2
    It's still a function from f:R/{2} -> R. The OP asked if it was "even a function". The answer is yes. Just not on all of R. – fleablood Oct 15 '15 at 00:19
  • 1
    Actually, since domain and codomain are not specified, a function here has not been properly defined. – ncmathsadist Oct 15 '15 at 00:21
  • I'm not 100% sure stating f:R -> R, nescessarily implies that f is defined on all R. I think it just means the domain is a subset of R. But I could be mistaken. – fleablood Oct 15 '15 at 00:21
  • 2
    I don't make that assumption. You must specify domain and codomain. – ncmathsadist Oct 15 '15 at 00:23
  • "Actually, since domain and codomain are not specified, a function here has not been properly defined." Isn't it acceptable to simply state the function maps real values to real values without specifying the exact domain and codomain? I think we can safely call these functions. – fleablood Oct 15 '15 at 00:25
  • 1
    f: R->R means that R is both the domain and the codomain, no? – Carefullcars Oct 15 '15 at 00:26
  • No. This function fails to admit $2$ to its domain. How you specify domain and range is critical to telling if a function is injective or surjective. – ncmathsadist Oct 15 '15 at 00:27
  • Every function is a bijection if you restrict its domain and codomain to the right points. – ncmathsadist Oct 15 '15 at 00:28
  • "I don't make that assumption. You must specify domain and codomain" Who must? The teacher or the student? I've never seen the codomain explicitly stated for non-surjective functions. That's always been left to be determined. I'll give you that the domain must/should be specified. Although I seen a blanket "All these functions map space X to Y" and leave the precise domain to be determined. – fleablood Oct 15 '15 at 00:29
  • "Every function is a bijection if you restrict its domain and codomain to the right points" true. But if you claim you have to specify the domain and codomain and it's not acceptable to say "from all reals where it works" we'd have to throw out nearly every calculus textbook I've ever seen. – fleablood Oct 15 '15 at 00:32
  • If you must define the domain and codomain, then by definition all functions are surjective as the codomain must be specified not to have any points not mapped to it. – fleablood Oct 15 '15 at 00:45
  • 3
    No. Consider the mapping $x\mapsto x^2$. This is a bijection of $[0,\infty)$ onto itself but it is not a bijection $[0,\infty)\rightarrow \mathbb{R}$. – ncmathsadist Oct 15 '15 at 01:03
  • @fleablood: That's not true. There is no requirement that a function's codomain equal its range. (That said, in most situations it doesn't really matter what codomain you define a function with, as long as it's a superset of the range, where the latter is the image of the domain you define it with. The domain, by contrast, usually does matter, though it's usually obvious from context without needing to be specified explicitly.) – ruakh Oct 15 '15 at 05:46
  • 1
    That sort of is my point. This is a function and it was properly defined. That it's domain is not the entire reals was not explicitly stated but can be determined by observation. For the purpose of the textbook I'm sure there's a blanket "unless stated otherwise all functions are from real to real". It'd be very misleading to say, especially to a student, "this isn't a function" or it isn't a properly defined function of the reals, even if that can be technically argued. – fleablood Oct 15 '15 at 06:12
  • @fleablood I agree with you that in many applications the domain and codomain are left somewhat vague (eg f is a function from some reals to some other set of reals...but we'll leave it to you to figure it out). However, I think that since this is a textbook question specifically about this fundamental concept, they are likely to be more pedantic about the domain/codomain definition, just so the student can demonstrate they understand these basic definitions. –  Oct 15 '15 at 08:28
  • 1
    I'll grant that. In this case the real concept is to determined if its a bijection from R to R which it isn't as not all points of R are mapped. However I think we'd be leading the student astray if we said the it isn't a function at all. It is. And it's a real valued function from some reals to some other reals. – fleablood Oct 15 '15 at 08:39
  • 1
    In mathematics abuse of notation is so common that I think it's essential to admit that when most mathematicians talk about $f(x)=(x-1)/(x+2)$ they will consider it a function with the correspondingly shrunk domain. – DRF Oct 15 '15 at 09:18
4

What is a function?

A popular definition, which can be directly mapped to set theory, is that a function is a set of input / output pairs. E.g.:

$f(x) = \frac{x + 1}{x + 2}$

could represent the set of pairs:

  • (-1, 0)
  • (0, 1/2)
  • (1, 2/3)

But it could also represent the set of pairs:

  • (0, 1/2)
  • (1, 2/3)
  • (2, 3/4)

Both of these are two completely different functions.

Morale: a formula like $f(x) = \frac{x + 1}{x + 2}$ is not a function.

A formula + a domain ($\mathbb{R}-\{2\}$ here) may represent a function if the formula is well defined over the domain.

But what a function really is, is the a set of pairs. You just have to come up with method that clearly describes that set of pairs.

For your specific case, you could take the domain as $\mathbb{R}-\{2\}$ and the set of points is specified.

Furthermore, you could also add a new pair (-2, 1234) to the function, and you'd have a function defined over $\mathbb{R}$.

Also worth noting: in this case we cannot make the function continuous by choosing any value at -2, but in some cases we can. E.g.:

$f(x) = \frac{x}{x}$

can be made continuous at 0 by adding the pair (0, 1).

The big advantage of such a set theoretical definition is that it can be used easily in formal proof systems: What does "formal" mean?