Class 12 Maths, Worked in Full Past papersGet updates
Chapter 1 · Relations and Functions

Exercise 1.2 · Q10: f(x)=x−2x−3f(x)=\frac{x-2}{x-3} from R−{3}\R-\{3\} to R−{1}\R-\{1\}

Exercise 1.2Types of functions · Exercise 1.2
The question

Let A=R−{3}A = \R - \{3\} and B=R−{1}B = \R - \{1\}⁠. Consider the function f:A→Bf : A \to B defined by f(x)=(x−2x−3).f(x) = \left(\frac{x-2}{x-3}\right). Is ff one-one and onto? Justify your answer.

Exam answer

One-one: Let x1,x2∈Ax_1, x_2 \in A with f(x1)=f(x2)f(x_1) = f(x_2)⁠. Then

x1−2x1−3=x2−2x2−3⇒ (x1−2)(x2−3)=(x2−2)(x1−3)\begin{aligned} & \frac{x_1 - 2}{x_1 - 3} = \frac{x_2 - 2}{x_2 - 3} \\ \Rightarrow\ & (x_1 - 2)(x_2 - 3) \\ & \quad = (x_2 - 2)(x_1 - 3) \end{aligned}

Expanding and cancelling x1x2+6x_1x_2 + 6 on both sides,

−3x1−2x2=−2x1−3x2⇒ x1=x2\begin{aligned} & -3x_1 - 2x_2 = -2x_1 - 3x_2 \\ \Rightarrow\ & x_1 = x_2 \end{aligned}

Thus ff is one-one.

Onto: Let y∈By \in B⁠, so y≠1y \ne 1⁠. Put f(x)=yf(x) = y⁠:

x−2=y(x−3)⇒ x(1−y)=2−3y⇒ x=3y−2y−1\begin{aligned} & x - 2 = y(x - 3) \\ \Rightarrow\ & x(1 - y) = 2 - 3y \\ \Rightarrow\ & x = \frac{3y - 2}{y - 1} \end{aligned}

Here x≠3x \ne 3⁠, since x=3x = 3 gives 3y−2=3y−33y - 2 = 3y - 3⁠, which is false. So x∈Ax \in A⁠. Also x−2=yy−1x - 2 = \frac{y}{y - 1} and x−3=1y−1x - 3 = \frac{1}{y - 1}⁠, so f(x)=yf(x) = y⁠. Thus ff is onto.

Yes, ff is one-one and onto.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

The two excluded numbers are not arbitrary. 33 is removed from the domain because it makes the denominator zero. 11 is removed from the codomain because f(x)f(x) can never equal 1: the top x−2x-2 and the bottom x−3x-3 always differ by exactly 1, so they are never equal. A useful way to see everything is to rewrite f(x)=(x−3)+1x−3=1+1x−3.f(x) = \frac{(x-3)+1}{x-3} = 1 + \frac{1}{x-3}. The term 1x−3\frac{1}{x-3} is never 0, so f(x)≠1f(x)\ne1⁠; and solving f(x)=yf(x)=y gives exactly one xx for each y≠1y\ne1⁠. So ff is both one-one and onto.

Given, to find, and the plan
Given
f(x)=x−2x−3f(x) = \dfrac{x-2}{x-3} with domain A=R−{3}A = \R-\{3\} (all reals except 3) and codomain B=R−{1}B = \R-\{1\} (all reals except 1).
To find
Whether ff is one-one and whether it is onto, with justification.
Plan
(1) Check ff is defined on all of AA and never takes the value 1, so it really maps AA into BB⁠. (2) One-one: assume f(x1)=f(x2)f(x_1) = f(x_2)⁠, cross-multiply, and deduce x1=x2x_1 = x_2⁠. (3) Onto: for an arbitrary y≠1y\ne1⁠, solve f(x)=yf(x) = y⁠; show the solution is in AA and check it. (4) Explain why y=1y = 1 has no preimage, so the codomain must exclude it. (5) Conclude.

Basics you need

1Domain and codomain with points removed

R−{3}\R - \{3\} means every real number except 3. For f:A→Bf : A\to B to make sense, f(x)f(x) must be defined for every x∈Ax\in A and must land in BB⁠. Basics: what a function is

2Cross-multiplying

If q≠0q\ne0 and s≠0s\ne0⁠, then pq=rs  ⟺  ps=rq\dfrac{p}{q} = \dfrac{r}{s} \iff ps = rq⁠. It is only valid because the denominators are non-zero.

3One-one and onto

One-one: f(x1)=f(x2)⇒x1=x2f(x_1)=f(x_2) \Rightarrow x_1=x_2 (Definition 5). Onto: for every y∈By\in B there is x∈Ax\in A with f(x)=yf(x)=y (Definition 6). When proving onto, the xx you find must lie in the domain AA⁠. Basics: one-one and onto

4Proof by contradiction for "never"

To show an equation has no solution, assume it has one and derive something false, such as −2=−3-2 = -3⁠. Basics: proving and disproving

Solution

  1. ff is defined on all of AA and never equals 1

    Defined on AA⁠: for x∈Ax\in A we have x≠3x\ne3⁠, so the denominator x−3≠0x - 3 \ne 0⁠, and f(x)f(x) is a real number.

    Never equal to 1: suppose some x∈Ax\in A had f(x)=1f(x) = 1⁠. Multiplying both sides by x−3x-3 (non-zero):

    x−2x−3=1 ⟹ x−2=x−3 ⟹ −2=−3,\frac{x-2}{x-3} = 1 \ \Longrightarrow\ x - 2 = x - 3 \ \Longrightarrow\ -2 = -3,

    which is false. So f(x)≠1f(x) \ne 1 for every x∈Ax\in A, and ff really maps AA into B=R−{1}B = \R-\{1\}⁠.

    The same fact in one line: f(x)=(x−3)+1x−3=1+1x−3f(x) = \dfrac{(x-3)+1}{x-3} = 1 + \dfrac{1}{x-3}⁠, and a fraction with numerator 1 is never 0.

    The question declares the codomain to be R−{1}\R-\{1\}⁠. That is only legitimate if no output equals 1, so we prove it. The contradiction argument covers every xx at once: whatever xx is, x−2x-2 and x−3x-3 differ by 1, so they cannot be equal. This step also explains, before we even start, why the question removed 1 from BB⁠.
    To show an equation has no solution, assume a solution and reach a false statement (Basic 4). Multiplying both sides by a non-zero quantity keeps an equation equivalent.
  2. One-one: cross-multiply and simplify

    Let x1,x2∈Ax_1, x_2 \in A with f(x1)=f(x2)f(x_1) = f(x_2)⁠:

    x1−2x1−3=x2−2x2−3.\frac{x_1-2}{x_1-3} = \frac{x_2-2}{x_2-3}.

    Both denominators are non-zero (since x1,x2≠3x_1, x_2 \ne 3⁠), so we may cross-multiply:

    (x1−2)(x2−3)=(x2−2)(x1−3)x1x2−3x1−2x2+6=x1x2−2x1−3x2+6−3x1−2x2=−2x1−3x2(cancel x1x2 and 6)−x1=−x2(add 2x1+2x2)x1=x2(multiply by −1).\begin{aligned} (x_1-2)(x_2-3) &= (x_2-2)(x_1-3)\\ x_1x_2 - 3x_1 - 2x_2 + 6 &= x_1x_2 - 2x_1 - 3x_2 + 6\\ -3x_1 - 2x_2 &= -2x_1 - 3x_2 &&\text{(cancel } x_1x_2 \text{ and } 6\text{)}\\ -x_1 &= -x_2 &&\text{(add } 2x_1 + 2x_2\text{)}\\ x_1 &= x_2 &&\text{(multiply by } -1\text{)}. \end{aligned}

    So ff is one-one.

    Cross-multiplying clears the fractions so we can compare polynomials. It is legal only because x1−3x_1 - 3 and x2−3x_2 - 3 are non-zero, which is guaranteed by x1,x2∈Ax_1, x_2 \in A⁠. After expanding, the product x1x2x_1x_2 and the constant 6 appear on both sides and cancel, leaving a linear equation whose only solution is x1=x2x_1 = x_2⁠. The form f(x)=1+1x−3f(x) = 1 + \frac{1}{x-3} gives a quicker check: equal values give 1x1−3=1x2−3\frac{1}{x_1-3} = \frac{1}{x_2-3}⁠, so x1−3=x2−3x_1 - 3 = x_2 - 3⁠.
    Cross-multiplication with non-zero denominators (Basic 2). One-one: f(x1)=f(x2)⇒x1=x2f(x_1)=f(x_2)\Rightarrow x_1=x_2 (Definition 5).
  3. Onto: solve f(x)=yf(x) = y for any y≠1y\ne1

    Take an arbitrary y∈By\in B⁠, so yy is real and y≠1y \ne 1⁠. We look for x∈Ax\in A with x−2x−3=y\dfrac{x-2}{x-3} = y⁠. Multiply both sides by x−3x - 3 and collect the xx-terms:

    x−2=y(x−3)=yx−3yx−yx=2−3yx(1−y)=2−3yx=2−3y1−y=3y−2y−1.\begin{aligned} x - 2 &= y(x - 3) = yx - 3y\\ x - yx &= 2 - 3y\\ x(1 - y) &= 2 - 3y\\ x &= \frac{2-3y}{1-y} = \frac{3y-2}{y-1}. \end{aligned}

    The last division is allowed because y≠1y\ne1⁠, so 1−y≠01 - y \ne 0⁠. Now two checks.

    (a) The solution lies in the domain AA⁠, that is, x≠3x\ne3⁠. Suppose 3y−2y−1=3\dfrac{3y-2}{y-1} = 3⁠. Then 3y−2=3(y−1)=3y−33y - 2 = 3(y-1) = 3y - 3⁠, so −2=−3-2 = -3⁠, which is false. Hence x≠3x \ne 3 and x∈Ax\in A⁠.

    (b) It really maps to yy⁠. With x=3y−2y−1x = \frac{3y-2}{y-1}⁠:

    x−2=3y−2−2(y−1)y−1=yy−1,x−3=3y−2−3(y−1)y−1=1y−1,f(x)=x−2x−3=y/(y−1)1/(y−1)=y. ✓\begin{aligned} x - 2 &= \frac{3y-2-2(y-1)}{y-1} = \frac{y}{y-1},\\ x - 3 &= \frac{3y-2-3(y-1)}{y-1} = \frac{1}{y-1},\\ f(x) &= \frac{x-2}{x-3} = \frac{y/(y-1)}{1/(y-1)} = y. \ ✓ \end{aligned}

    So every y∈By\in B is the image of some x∈Ax\in A⁠: ff is onto.

    −2−145678 −3−2−112345 x y (4, 2) (2, 0) x = 3 (not in A) y = 1 (never reached) left branch: y < 1 right branch: y > 1
    The graph of y=x−2x−3=1+1x−3y = \frac{x-2}{x-3} = 1 + \frac{1}{x-3} is a hyperbola with two branches. The dashed vertical line x=3x = 3 is the excluded input (the graph never touches it), and the dashed horizontal line y=1y = 1 is the excluded output (the graph approaches it but never meets it). Every other horizontal line, such as y=2y = 2⁠, meets the graph exactly once, here at (4,2)(4, 2)⁠.
    Solving the equation finds the only candidate; it does not by itself prove the candidate is valid. Check (a) is essential because the domain has a hole at 3: if the formula had produced x=3x = 3 for some yy⁠, that yy would have no preimage in AA⁠. Check (b) confirms the algebra. Notice that x−3=1y−1x - 3 = \frac{1}{y-1} is never zero, which is another way of seeing check (a).
    Onto: for an arbitrary yy in the codomain, find xx in the domain with f(x)=yf(x)=y (Definition 6, Basic 3). Basics: one-one and onto
  4. Why the codomain had to exclude 1

    The formula x=3y−2y−1x = \frac{3y-2}{y-1} breaks down at exactly one value, y=1y = 1⁠, where it divides by zero. Step 1 showed this is not an accident of the method: no x∈Ax\in A gives f(x)=1f(x) = 1⁠. So the range of ff is exactly R−{1}\R - \{1\}⁠.

    Consequently, if the codomain had been all of R\R⁠, then 11 would be an element of the codomain with no preimage, and ff would not be onto. Removing 1 from the codomain makes the codomain equal to the range, which is exactly what onto requires.

    Whether a function is onto depends on the codomain chosen, not only on the formula. The textbook's Remark after Definition 6 says ff is onto if and only if its range equals the codomain. Here the range is R−{1}\R-\{1\}⁠, and the question chose B=R−{1}B = \R-\{1\}⁠, so the two match.
    Onto ⇔ range = codomain (Remark after Definition 6). Lesson: types of functions
  5. Conclude

    ff is one-one (Step 2) and onto (Step 3). So the answer is yes: ff is one-one and onto, that is, bijective. Its inverse is the formula from Step 3:

    f−1(y)=3y−2y−1,y∈R−{1}.f^{-1}(y) = \frac{3y-2}{y-1}, \qquad y \in \R - \{1\}.
    The onto step did more than prove existence: it found the unique input for each output, which is the inverse function. The inverse swaps the roles of the excluded points: it is undefined at y=1y = 1 and never takes the value 3.
    A function is invertible exactly when it is one-one and onto. Lesson: invertible functions
Result

Yes. f(x)=x−2x−3f(x) = \frac{x-2}{x-3} is one-one, because cross-multiplying f(x1)=f(x2)f(x_1) = f(x_2) reduces to x1=x2x_1 = x_2⁠. It is onto R−{1}\R - \{1\}⁠, because every y≠1y \ne 1 is the image of x=3y−2y−1x = \frac{3y-2}{y-1}⁠, which is never 3 and so lies in AA⁠. The value 1 is correctly excluded from the codomain, since f(x)=1f(x) = 1 would force −2=−3-2 = -3⁠. (Textbook answer: "Yes".)

Check it with numbers

Forward: f(4)=21=2f(4) = \frac{2}{1} = 2⁠, f(2)=0−1=0f(2) = \frac{0}{-1} = 0⁠, f(5)=32f(5) = \frac{3}{2}⁠, f(0)=−2−3=23f(0) = \frac{-2}{-3} = \frac23⁠. Back with x=3y−2y−1x = \frac{3y-2}{y-1}⁠: y=2y = 2 gives 41=4\frac{4}{1} = 4 ✓; y=0y = 0 gives −2−1=2\frac{-2}{-1} = 2 ✓; y=32y = \frac32 gives 5/21/2=5\frac{5/2}{1/2} = 5 ✓; y=23y = \frac23 gives 0−1/3=0\frac{0}{-1/3} = 0 ✓. Near the hole: f(3.01)=1.010.01=101f(3.01) = \frac{1.01}{0.01} = 101 and f(1000)=998997≈1.001f(1000) = \frac{998}{997} \approx 1.001⁠, close to 1 but not equal to it.

Common mistakes
  1. Cross-multiplying without saying why it is allowed. It needs x1−3≠0x_1 - 3 \ne 0 and x2−3≠0x_2 - 3 \ne 0⁠, which come from the domain AA⁠.
  2. Skipping the check that the preimage is not 3. Onto needs x∈Ax\in A⁠; without check (a) the proof has a gap.
  3. Thinking the excluded 1 is "just given". It must be justified: ff never takes the value 1, and if it did, BB would not be a valid codomain.
  4. Answering "not onto because y=1y = 1 has no preimage". 1 is not in the codomain BB⁠, so it does not need a preimage.
What to take away
  1. For a rational function, rewrite it as "constant + simple fraction" (here 1+1x−31 + \frac{1}{x-3}⁠) to see at a glance which value it misses.
  2. In an onto proof, always check that the solved xx lies in the domain, especially when the domain has holes.
  3. The value missing from the range is exactly where the inverse formula divides by zero, and the codomain must exclude it for ff to be onto.

Every fact used, and where it comes from

FactUsed inSource
x−2x−3=1+1x−3\frac{x-2}{x-3} = 1 + \frac{1}{x-3}⁠, and 1x−3≠0\frac{1}{x-3} \ne 0Idea, Steps 1, 2Algebra of fractions
Cross-multiplication needs non-zero denominatorsStep 2Algebra of equations
Definitions of one-one, ontoSteps 2, 3Definitions 5, 6, Section 1.3 (Lesson: types of functions)
Onto ⇔ range = codomainStep 4Remark after Definition 6, Section 1.3
One-one and onto = bijective; bijective ⇔ invertibleStep 5Definition 7 (Section 1.3); Definition 9 and Section 1.4
Preimage formula and all numerical valuesStep 3, CheckSolved symbolically and recomputed exactly in the site's verification script
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →