Ma · Mathematics

If g∘f Is Bijective, Is f Injective and g Surjective?

Published By the 9to5Science editorial team

At a glance

  1. 1. Set the function types

    Write f:A→B and g:B→C, so g∘f maps A to C.

  2. 2. Prove f is injective

    Equal f-values give equal composite values; injectivity of the composite then makes the inputs equal.

  3. 3. Prove g is surjective

    For each output in C, surjectivity of the composite supplies an input whose f-value maps to it under g.

  4. 4. Check what does not follow

    The result does not require f to be surjective or g to be injective.

Suppose f:A→Bf:A\to B and g:B→Cg:B\to C, so the composition g∘f:A→Cg\circ f:A\to C is defined. If g∘fg\circ f is bijective, then ff is injective and gg is surjective. The two conclusions follow directly from the injectivity and surjectivity parts of bijectivity.

The function types matter: the codomain of ff must fit the domain of gg, and the composite is considered as a map into CC. In particular, saying the composite is bijective means it is onto all of CC, not merely onto its image.

Why f is injective

A function is injective if equal outputs can only come from equal inputs. Take any x1,x2∈Ax_1,x_2\in A and suppose

f(x1)=f(x2).f(x_1)=f(x_2).

Applying gg to both sides gives

g(f(x1))=g(f(x2)),g(f(x_1))=g(f(x_2)),

or equivalently,

(g∘f)(x1)=(g∘f)(x2).(g\circ f)(x_1)=(g\circ f)(x_2).

Because g∘fg\circ f is injective, this equality implies x1=x2x_1=x_2. That is exactly the definition of injectivity for ff.

Another way to see the idea is that if ff sent two distinct inputs to the same element of BB, no later function gg could separate them again. Their composite outputs would also be equal, contradicting the composite’s injectivity.

Why g is surjective

A function g:B→Cg:B\to C is surjective if every element of CC is the output of at least one element of BB. Choose any c∈Cc\in C. Since g∘fg\circ f is surjective onto CC, there is some a∈Aa\in A such that

(g∘f)(a)=c.(g\circ f)(a)=c.

By the definition of composition, this says g(f(a))=cg(f(a))=c. The value f(a)f(a) belongs to BB, so we have found an element of BB that gg maps to cc. Since this works for every c∈Cc\in C, gg is surjective.

A finite example

Let

A={1,2},B={a,b,c},C={X,Y}.A=\{1,2\},\qquad B=\{a,b,c\},\qquad C=\{X,Y\}.

Define f:A→Bf:A\to B and g:B→Cg:B\to C by

f(1)=a,f(2)=b,f(1)=a,\quad f(2)=b,

and

g(a)=X,g(b)=Y,g(c)=X.g(a)=X,\quad g(b)=Y,\quad g(c)=X.

Then the composite sends 11 to XX and 22 to YY. It is a bijection from AA to CC. Here, ff is injective but not surjective, because cc is not an output of ff. Also, gg is surjective but not injective, because both aa and cc map to XX. This illustrates exactly what the theorem guarantees—and what it does not.

What the theorem does not say

The composite being bijective does not imply that ff is surjective or that gg is injective. The finite example above is a counterexample to both extra claims.

The reverse implication also fails: knowing only that ff is injective and gg is surjective does not ensure that g∘fg\circ f is bijective. For example, let A={1}A=\{1\}, B={a,b}B=\{a,b\}, and C={X,Y}C=\{X,Y\}, with f(1)=af(1)=a, g(a)=Xg(a)=X, and g(b)=Yg(b)=Y. The function ff is injective and gg is surjective, but the composite never reaches YY, so it is not bijective.

Common mistakes

  • Reversing the roles: For g∘fg\circ f, the conclusion is that the first function ff is injective and the second function gg is surjective. The order follows from tracing inputs through the composition.
  • Claiming both functions are bijective: The composite can be bijective even when ff misses elements of BB and gg sends multiple elements of BB to the same value.
  • Ignoring the codomain: Surjectivity depends on the stated codomain. The proof that gg is onto uses the fact that the composite is onto CC.
  • Using the wrong composition: The result is about g∘fg\circ f, which means apply ff first and then gg. The function types and conclusions must be checked against that order.

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.