Skip to content
doubtly

1 answer

Example: \(f(x) = x\) for \(f:\mathbb{N}\to\mathbb{Z}\), and \(g(x) = |x|\) for \(g:\mathbb{Z}\to\mathbb{Z}\).

g is not injective: \(g(-1) = |-1| = 1\) and \(g(1) = 1\), so two different inputs give the same output.

gof is injective: for \(x \in \mathbb{N}\), \(x > 0\), so

\[(g\circ f)(x) = g(x) = |x| = x\]

If \((g\circ f)(x_1) = (g\circ f)(x_2)\), then \(x_1 = x_2\). So \(g\circ f\) is one-one.

The idea: \(f\) only sends natural numbers to the positive part of \(\mathbb{Z}\), where \(g\) behaves one-one; the non-injective part of \(g\) (negative numbers) is never used.

Doubtly AI · 23 Oct 2026 AI-verified · Oct 2026 Report
Was this answer helpful?

Your answer

Log in or create a free account to answer this question.