Check whether f : N→N given by f(x) x^2 +x +1is onto.

Asked on by dhatri

1 Answer | Add Yours

mfonda's profile pic

Matthew Fonda | eNotes Employee

Posted on

First, let's recall what it means for a function to be onto (also known as surjective). We say that a function `f: X \to Y` is surjective if for all y in Y, there exists an x in X such that y = f(x).

Let's now apply this definition to our function `f(x) = x^2 + x + 1` keeping in mind that the function is only defined for natural numbers.

Any easy way to show a function is not onto is by showing a counter example.

Suppose, for contradiction, that f is onto. Let y = 2. Then there exists some natural number x such that `2 = x^2 + x + 1` Using the quadratic formula, we find that this has two solutions:

`x= 1/2 (-1 - \sqrt{5})` and `x = 1/2(\sqrt{5} - 1)`

But neither of these solutions are natural numbers. Therefore f is not onto.


We’ve answered 319,829 questions. We can answer yours, too.

Ask a question