(a) Suppose f(x1)=f(x2) with x1,x2∈R−{1}:
x1−1x1+1=x2−1x2+1.
Neither denominator is zero, so we may cross-multiply:
(x1+1)(x2−1)=(x2+1)(x1−1).
Expand both sides:
x1x2−x1+x2−1=x1x2−x2+x1−1.
Cancel x1x2 and −1:
−x1+x2=−x2+x1 ⟹ 2x2=2x1 ⟹ x1=x2.
So f is one-one.

(b) Let y be any element of the codomain R−{1}, and solve f(x)=y for x:
y=x−1x+1 ⟹ y(x−1)=x+1 ⟹ xy−y=x+1 ⟹ xy−x=y+1,
x(y−1)=y+1 ⟹ x=y−1y+1.
Two things must now be checked, and the second is the one usually skipped.
- x is a real number. Since y=1, we have y−1=0, so the fraction is defined.
- x lies in the domain R−{1}. If y−1y+1 were equal to 1, then y+1=y−1, giving 1=−1, which is impossible. So x=1.
Finally confirm that this x really is sent to y:
f(y−1y+1)=y−1y+1−1y−1y+1+1=y−1(y+1)−(y−1)y−1(y+1)+(y−1)=22y=y.
Every y∈R−{1} therefore has a pre-image inside R−{1}, so f is onto. Without check 2 the argument would only produce a real number, not an element of the stated domain, and "onto" would not be established.
(c) f is one-one and onto, hence invertible, and part (b) has already produced the pre-image of a general y:
f−1(y)=y−1y+1,y∈R−{1}.
This is the same formula as f itself, so f−1=f: the function is its own inverse. On the graph this shows up as symmetry about the line y=x.
(d) For x∈R−{1}, part (b)'s check 2 guarantees f(x)=1, so f may legitimately be applied a second time. Now
(f∘f)(x)=f(x−1x+1)=x−1x+1−1x−1x+1+1.
Deal with numerator and denominator separately:
x−1x+1+1=x−1(x+1)+(x−1)=x−12x,x−1x+1−1=x−1(x+1)−(x−1)=x−12.
Dividing, the factors x−11 cancel:
(f∘f)(x)=2/(x−1)2x/(x−1)=22x=x.
So f∘f is the identity on R−{1}. This is the same fact as part (c): saying f−1=f and saying f∘f=identity are two ways of writing one statement.
(e)
g is one-one. Suppose g(x1)=g(x2) with x1,x2=−cd, so neither denominator vanishes. Cross-multiply:
(ax1+b)(cx2+d)=(ax2+b)(cx1+d).
Expand:
acx1x2+adx1+bcx2+bd=acx1x2+adx2+bcx1+bd.
Cancel acx1x2 and bd, then gather terms:
adx1−bcx1=adx2−bcx2 ⟹ (ad−bc)(x1−x2)=0.
This is where ad−bc=0 is used: it lets us divide by ad−bc and conclude x1=x2. Without the condition the identity gives no information at all — and indeed if ad=bc then b=cad and
g(x)=cx+dax+cad=cx+dca(cx+d)=ca,
a constant function, which is as far from one-one as possible.
Why ca is removed from the codomain. If g(x)=ca for some x, then c(ax+b)=a(cx+d), so acx+bc=acx+ad and hence bc=ad — contradicting ad−bc=0. So the value ca is never attained, and it must be excluded if g is to be onto.
g is onto R−{ca}. Take any y=ca and solve g(x)=y:
y(cx+d)=ax+b ⟹ cxy+dy=ax+b ⟹ x(cy−a)=b−dy,
x=cy−ab−dy=a−cydy−b.
Two checks again:
- cy−a=0, because y=ca — so x is a real number.
- x=−cd: if cy−ab−dy=−cd then c(b−dy)=−d(cy−a), so bc−cdy=−cdy+ad and hence bc=ad — again contradicting ad−bc=0. So x lies in the domain.
Conclusion. g is one-one and onto, therefore invertible, with
g−1(y)=a−cydy−b,y∈R−{ca}.
Consistency check with parts (a)–(c). The function f is the case a=1, b=1, c=1, d=−1. Then ad−bc=(1)(−1)−(1)(1)=−2=0, and −cd=1, ca=1, so g becomes exactly f:R−{1}→R−{1}. The general formula gives
g−1(y)=1−y(−1)y−1=−(y−1)−(y+1)=y−1y+1,
which is the f−1 found in part (c). The two agree.
A footnote on the excluded case c=0. Then ad=0, so a=0 and d=0, and g(x)=dax+b is an ordinary straight-line function from R to R. It is a bijection with g−1(y)=ady−b — which is what the formula above becomes when c=0. Nothing needs to be removed from the domain or codomain in that case, which is why the stem assumes c=0.