SOLVER7 Study. Nothing Else.
2026 Board Paper Q26(b)

Prove that the function \(f : N \rightarrow N,\ f(n)=(n^2+n+1)\) is one-one but not onto.

CBSE Class 12 Maths · Relations and Functions

Solution

👶 Simple Explanation

Simple Explanation

Imagine a machine that takes a natural number and gives back a bigger number. Two different numbers put into this machine always come out as two different results — that makes it one-one, like two keys that never open the same lock. But the machine can never produce small outputs like 1 or 2, because even the smallest input, which is 1, gives back 3. So some numbers in the codomain are never reached. A function that misses even one output value is not onto.

Answer: The function \( f(n)=n^2+n+1 \) is one-one because \( f(x_1)=f(x_2) \) forces \( x_1=x_2 \). It is not onto because natural numbers such as \( 1 \) and \( 2 \) are never obtained as outputs (the minimum value is \( f(1)=3 \)). Hence \( f \) is one-one but not onto.

📖 Proving f(n) = n² + n + 1 is One-One but Not Onto

Detailed Explanation

A function \( f:A \to B \) is called one-one (injective) if different inputs always give different outputs, that is, whenever \( f(x_1)=f(x_2) \) we must have \( x_1=x_2 \). A function is called onto (surjective) if every element of the codomain \( B \) is the image of at least one element of the domain \( A \); in other words the range equals the codomain. Here the domain and codomain are both the set of natural numbers \( N=\{1,2,3,\dots\} \). To prove one-one we assume two outputs are equal and show the inputs must be equal. To show a function is NOT onto, it is enough to find just one element of the codomain that is never obtained as an output.

Formula Used

\( f(n)=n^2+n+1 \); One-one: \( f(x_1)=f(x_2) \Rightarrow x_1=x_2 \); Onto: range \( = \) codomain.

Solution

  1. Step 1: Set up the one-one test. Let \( x_1, x_2 \in N \) be such that \( f(x_1)=f(x_2) \). Then \[ x_1^2+x_1+1 = x_2^2+x_2+1. \]
  2. Step 2: Simplify the equation. Cancel the \( +1 \) from both sides and rearrange: \[ x_1^2 - x_2^2 + x_1 - x_2 = 0. \] Factor each pair: \[ (x_1-x_2)(x_1+x_2) + (x_1-x_2) = 0. \] Take \( (x_1-x_2) \) common: \[ (x_1-x_2)(x_1+x_2+1) = 0. \]
  3. Step 3: Use that inputs are natural numbers. Since \( x_1, x_2 \in N \), we have \( x_1+x_2+1 \ge 3 \), so \( x_1+x_2+1 \ne 0 \). Therefore the other factor must be zero: \[ x_1 - x_2 = 0 \Rightarrow x_1 = x_2. \] This proves \( f \) is one-one.
  4. Step 4: Check whether f is onto by looking at the smallest output. For \( n=1 \), \[ f(1)=1^2+1+1=3. \] As \( n \) increases, \( f(n) \) increases, so the smallest value in the range is \( 3 \). Hence outputs like \( 1 \) and \( 2 \) can never appear.
  5. Step 5: Confirm a natural number is missed. Take \( 1 \in N \) in the codomain. If \( f(n)=1 \), then \( n^2+n+1=1 \Rightarrow n^2+n=0 \Rightarrow n(n+1)=0 \), giving \( n=0 \) or \( n=-1 \). Neither is a natural number, so no \( n \in N \) maps to \( 1 \). Thus the range is not all of \( N \), so \( f \) is not onto.

Final Answer

The function \( f(n)=n^2+n+1 \) is one-one because \( f(x_1)=f(x_2) \) forces \( x_1=x_2 \). It is not onto because natural numbers such as \( 1 \) and \( 2 \) are never obtained as outputs (the minimum value is \( f(1)=3 \)). Hence \( f \) is one-one but not onto.

Common Mistake

A common mistake is to conclude \( x_1=x_2 \) directly from \( (x_1-x_2)(x_1+x_2+1)=0 \) without justifying why \( x_1+x_2+1 \ne 0 \). You must state that since inputs are natural numbers, \( x_1+x_2+1 \ge 3 \), which rules out that factor being zero.

🪜 Step-by-step Solution

Step-by-step Solution

  1. Step 1: Assume two natural numbers \( x_1, x_2 \in \mathbb{N} \) give the same output, i.e., \( f(x_1) = f(x_2) \). Write this out explicitly: \[ x_1^2 + x_1 + 1 = x_2^2 + x_2 + 1. \] — Reason: This is the standard starting point for proving a function is one-one; we force equal outputs and then check if the inputs must also be equal.
  2. Step 2: Cancel the constant \( +1 \) appearing on both sides. Bring all terms to one side: \[ x_1^2 - x_2^2 + x_1 - x_2 = 0. \] — Reason: Subtracting \( x_2^2 + x_2 + 1 \) from both sides clears the constant and groups like-power terms together, preparing for factorisation.
  3. Step 3: Factor the expression in two stages. First apply the difference-of-squares identity to the quadratic terms, then factor out the common binomial: \[ (x_1 - x_2)(x_1 + x_2) + (x_1 - x_2) = 0 \] which becomes \[ (x_1 - x_2)(x_1 + x_2 + 1) = 0. \] — Reason: Factorising converts the equation into a product equal to zero, so we can analyse each factor separately using the zero-product property.
  4. Step 4: Examine the second factor. Since \( x_1, x_2 \in \mathbb{N} \), both are at least \( 1 \), so \( x_1 + x_2 + 1 \ge 3 \). Therefore \( x_1 + x_2 + 1 \ne 0 \), which forces \[ x_1 - x_2 = 0 \quad \Rightarrow \quad x_1 = x_2. \] — Reason: Because the second factor can never be zero for natural-number inputs, the first factor must carry all responsibility for making the product zero, directly proving injectivity.
  5. Step 5: Conclude the one-one part: since \( f(x_1) = f(x_2) \) always leads to \( x_1 = x_2 \), the function \( f \) is one-one. — Reason: This completes the logical chain required by the definition of an injective function.
  6. Step 6: Now check whether \( f \) is onto by computing the smallest possible output. For \( n = 1 \): \[ f(1) = 1^2 + 1 + 1 = 3. \] Since the domain is \( \mathbb{N} = \{1, 2, 3, \ldots\} \) and \( n \ge 1 \), the value \( f(n) \) is always at least \( 3 \). — Reason: Finding the minimum output value tells us immediately which codomain elements can never be hit.
  7. Step 7: Identify elements of the codomain that are never produced. The natural numbers \( 1 \) and \( 2 \) both lie below the minimum output of \( 3 \), so there is no \( n \in \mathbb{N} \) with \( f(n) = 1 \) or \( f(n) = 2 \). Hence the range does not equal \( \mathbb{N} \), and \( f \) is not onto. — Reason: A single counter-example — one codomain element with no pre-image — is sufficient to disprove surjectivity.

Final Answer

The function \( f(n)=n^2+n+1 \) is one-one because \( f(x_1)=f(x_2) \) forces \( x_1=x_2 \). It is not onto because natural numbers such as \( 1 \) and \( 2 \) are never obtained as outputs (the minimum value is \( f(1)=3 \)). Hence \( f \) is one-one but not onto.

Common Mistake

One common mistake: Students often stop after proving one-one and assume the function must also be onto, forgetting to verify that every element of the codomain \( \mathbb{N} \) is actually achieved as an output; here the outputs start at \( 3 \), so \( 1 \) and \( 2 \) are never reached.

✍️ Exam-ready Answer

Exam-ready Answer

  1. One-One Test: Assume \( f(x_1) = f(x_2) \), so \( x_1^2 + x_1 + 1 = x_2^2 + x_2 + 1 \). Rearranging: \[ (x_1 - x_2)(x_1 + x_2 + 1) = 0 \] Since \( x_1, x_2 \in N \), we have \( x_1 + x_2 + 1 \ge 3 \ne 0 \), so \( x_1 = x_2 \). Hence \( f \) is one-one.
  2. Onto Test: Minimum output: \( f(1) = 1 + 1 + 1 = 3 \). So \( 1, 2 \in N \) have no pre-image in \( N \). Hence \( f \) is not onto.

Answer: The function \( f(n)=n^2+n+1 \) is one-one because \( f(x_1)=f(x_2) \) forces \( x_1=x_2 \). It is not onto because natural numbers such as \( 1 \) and \( 2 \) are never obtained as outputs (the minimum value is \( f(1)=3 \)). Hence \( f \) is one-one but not onto.

➕ More Examples

More Examples

Example 1

Question: Prove that the function \( f : \mathbb{N} \to \mathbb{N} \) defined by \( f(n) = 2n^2 + 1 \) is one-one but not onto.

Solution: We need to show two things: (i) \( f \) is one-one, and (ii) \( f \) is not onto. Step 1 — Proving f is one-one: Let \( n_1, n_2 \in \mathbb{N} \) such that \( f(n_1) = f(n_2) \). Then \[ 2n_1^2 + 1 = 2n_2^2 + 1 \] which gives \[ 2n_1^2 = 2n_2^2 \] and so \[ n_1^2 = n_2^2. \] Since \( n_1, n_2 \in \mathbb{N} \), both are positive, so \( n_1 = n_2 \). Hence \( f \) is one-one. Step 2 — Proving f is NOT onto: Consider the element \( 2 \in \mathbb{N} \). For \( f \) to be onto, there must exist some \( n \in \mathbb{N} \) such that \( f(n) = 2 \), i.e., \[ 2n^2 + 1 = 2. \] This gives \[ 2n^2 = 1 \] and so \[ n^2 = \frac{1}{2}, \] which means \( n = \frac{1}{\sqrt{2}} \notin \mathbb{N} \). Since no natural number \( n \) satisfies \( f(n) = 2 \), the element \( 2 \in \mathbb{N} \) has no pre-image in \( \mathbb{N} \) under \( f \). Hence \( f \) is not onto. Conclusion: The function \( f(n) = 2n^2 + 1 \) is one-one but not onto.

Answer: f is one-one (injective) but not onto (surjective). The element 2 ∈ ℕ has no pre-image in ℕ.

Example 2

Question: Prove that the function \( f : \mathbb{N} \to \mathbb{N} \) defined by \( f(n) = n^2 + 3 \) is one-one but not onto.

Solution: We need to show two things: (i) \( f \) is one-one, and (ii) \( f \) is not onto. Step 1 — Proving f is one-one: Let \( n_1, n_2 \in \mathbb{N} \) such that \( f(n_1) = f(n_2) \). Then \[ n_1^2 + 3 = n_2^2 + 3 \] which gives \[ n_1^2 = n_2^2. \] Since \( n_1, n_2 \in \mathbb{N} \), both are positive integers, so we conclude \( n_1 = n_2 \). Hence \( f \) is one-one. Step 2 — Proving f is NOT onto: Note that for any \( n \in \mathbb{N} \), we have \( n \ge 1 \), so \[ f(n) = n^2 + 3 \ge 1 + 3 = 4. \] This means the range of \( f \) is \( \{4, 7, 12, 19, \ldots\} \), which is a proper subset of \( \mathbb{N} \). In particular, consider \( 1 \in \mathbb{N} \). For \( f \) to be onto, there must exist \( n \in \mathbb{N} \) such that \( f(n) = 1 \), i.e., \[ n^2 + 3 = 1 \] giving \[ n^2 = -2, \] which has no real solution, let alone a natural number solution. Also, consider \( 2 \in \mathbb{N} \). We need \[ n^2 + 3 = 2 \] giving \[ n^2 = -1, \] again impossible. Since the elements \( 1, 2, 3 \in \mathbb{N} \) have no pre-image in \( \mathbb{N} \) under \( f \), the function \( f \) is not onto. Conclusion: The function \( f(n) = n^2 + 3 \) is one-one but not onto.

Answer: f is one-one (injective) but not onto (surjective). Elements such as 1, 2, 3 ∈ ℕ have no pre-image in ℕ under f.

🎯 Try a Similar Question

Try a Similar Question

Question: Let \( f : \mathbb{N} \to \mathbb{N} \) be defined by \( f(n) = 2n^2 + 1 \), where \( \mathbb{N} \) is the set of natural numbers (i.e., \( \mathbb{N} = \{1, 2, 3, \ldots\} \)). Prove that \( f \) is one-one but not onto.

Solution

  1. Step 1: Check for One-One (Injectivity): Assume \( f(x_1) = f(x_2) \) for some \( x_1, x_2 \in \mathbb{N} \). Then: \[ 2x_1^2 + 1 = 2x_2^2 + 1 \] Subtracting 1 from both sides: \[ 2x_1^2 = 2x_2^2 \] Dividing both sides by 2: \[ x_1^2 = x_2^2 \] This gives \( (x_1 - x_2)(x_1 + x_2) = 0 \). Since \( x_1, x_2 \in \mathbb{N} \), we have \( x_1 + x_2 \ge 2 > 0 \), so \( x_1 + x_2 \ne 0 \). Therefore \( x_1 - x_2 = 0 \), i.e., \( x_1 = x_2 \). Hence \( f \) is one-one.
  2. Step 2: Find the Minimum Value of f: Since \( f \) is defined on \( \mathbb{N} = \{1, 2, 3, \ldots\} \), the smallest input is \( n = 1 \). The minimum output is: \[ f(1) = 2(1)^2 + 1 = 2 + 1 = 3 \] For \( n = 2 \): \[ f(2) = 2(4) + 1 = 9 \] The function is strictly increasing on \( \mathbb{N} \), so all outputs are of the form \( 2n^2 + 1 \ge 3 \).
  3. Step 3: Show f is NOT Onto: For \( f \) to be onto, every \( y \in \mathbb{N} \) must have a pre-image in \( \mathbb{N} \). Consider \( y = 1 \in \mathbb{N} \). We need \( n \in \mathbb{N} \) such that \( 2n^2 + 1 = 1 \), which gives \( 2n^2 = 0 \), i.e., \( n = 0 \). But \( 0 \notin \mathbb{N} \), so \( y = 1 \) has no pre-image. Similarly, consider \( y = 2 \in \mathbb{N} \). We need \( 2n^2 + 1 = 2 \), giving \( n^2 = \frac{1}{2} \), which has no natural number solution. Also, \( y = 4 \) would require \( 2n^2 = 3 \), so \( n^2 = \frac{3}{2} \), again not a natural number. Therefore, many natural numbers (such as 1, 2, 4, 5, ...) are not in the range of \( f \). Hence \( f \) is NOT onto.
  4. Step 4: Conclusion: The function \( f : \mathbb{N} \to \mathbb{N} \) defined by \( f(n) = 2n^2 + 1 \) is one-one (since \( f(x_1) = f(x_2) \) necessarily implies \( x_1 = x_2 \)) but is not onto (since elements such as \( 1, 2, 4 \in \mathbb{N} \) have no pre-image in \( \mathbb{N} \) under \( f \)).

Answer: The function \( f(n) = 2n^2 + 1 \) is one-one because \( f(x_1) = f(x_2) \) implies \( x_1 = x_2 \). It is not onto because the minimum value is \( f(1) = 3 \), and many natural numbers (such as \( 1 \), \( 2 \), and \( 4 \)) are never obtained as outputs. Hence \( f \) is one-one but not onto.

Everything you get with Solver7

More questions in Relations and Functions