# Is this expression even a function?

This is from Discrete Mathematics and its Applications My question is on 22c. From the book, I inferred from the question that all of the listed mathematical expressions are functions. Is the mathematical expression $(x + 1)/(x + 2)$ even a function though? What I got from my other question, Why is this not a function? was that a function needs to have exactly one output from every possible input in the domain. However this function doesn't have an output for $x = -2$, which is the domain of $\mathbb{R}$.

• the misconception here is that the function is a triple; it has domain, it has range and it has a rule that says what happens to each element in the domain. usual one only sees the rule given prominent place and other two are not mentioned at all. – abel Jan 17 '15 at 12:40
• There are three parts to the definition of a function? I thought it was just map one element of a set to one element of another set. – committedandroider Jan 27 '15 at 20:04
• @committedandroider—which sets? – wchargin Jul 19 '15 at 22:44

## 2 Answers

You are essentially correct. While $f(x)=\frac{x+1}{x+2}$ is actually a function, its domain is not $\mathbb{R}$ since $f$ is not defined for $x=-2$. Thus it cannot be a function from $\mathbb{R}$ to $\mathbb{R}$, much less a bijection.

• I am so confused. The book's definition of function from A to B is an assignment of exactly one element of B to each element of B. Basically, each element of A can be assigned exactly one element of B. If it doesn't meet this definition of function, how can it be a function? – committedandroider Jan 17 '15 at 3:25
• If you assume that $A=B=\mathbb{R}$, then $f$ is not a function from $A$ to $B$, which is what is important for your problem. But $f$ is still a function on domains not containing $-2$, since $f$ takes on a exactly one value for every other real number. – AMPerrine Jan 17 '15 at 3:31
• so overall definition of function is one output for one input. But on a specific domain, function must be able to produce an output for every input in the domain? – committedandroider Jan 17 '15 at 3:34
• Yes, that's right. If you ask, "Is this a function?" without specifying a domain, we assume the domain is everything for which the expression is defined and only consider the uniqueness condition. Once you include the domain $A$ in the question, you can ask whether $f(x)$ even makes sense for every $x$ in $A$. A couple more examples: $f(x)=\pm x$ is not a function on $\mathbb{R}$. But it is a function on the set $\{0\}$. $g(x)=\frac{1}{x}$ is not a function on $\mathbb{R}$. But it is a function on $\mathbb{R}\setminus \{0\}$. – AMPerrine Jan 17 '15 at 3:47

You're correct that $f$ is not defined at $-2$. It is still a function, though; its domain is $\mathbb R \setminus \{ -2 \}$, and its range is $\mathbb R \setminus \{ 1 \}$.

So we have, say, $f : \mathbb R \setminus \{ -2 \} \to \mathbb R \setminus \{ 1 \}$. Is this function a bijection? Yes, it is; its inverse is $$f^{-1}(y) = \frac{1 - 2y}{y - 1},$$ which is defined everywhere on the codomain of $f$. But is this function a bijection from $\mathbb R$ to $\mathbb R$, as the question asks? Clearly not.

• What definition of function are you using? The one I am using says that a function from A to B means that every element of A must be assigned exactly one element of B. If it doesn't meet this requirement, how can this still be a function? – committedandroider Jan 17 '15 at 3:31
• @committedandroider But in this answer, $A = \mathbb R\setminus \{-2\}$. So why doesn't the function meet the requirements? You would have a fair point if you meant that we shouldn't use $f$ to refer to a function on a different domain than the one originally described, but this kind of equivocation is pretty common in undergraduate math. (And it probably contributes to misconceptions that students have about what a function is.) – Erick Wong Jan 17 '15 at 3:52
• oh so definition of function depends on what domain you define – committedandroider Jan 17 '15 at 3:58
• @committedandroider Right. Part of the definition of any function is its domain and its codomain. If I let $f : \mathbb{R} \to \mathbb{R}$ and $g : \mathbb{Z} \to \mathbb{Z}$, the functions are different, even if, say, $f(x) = x$ and $g(x) = x$. – wchargin Jan 17 '15 at 4:00