girgit.org

Relations and Functions

Different inputs, different outputs: one-one (injective) functions

The big ideaA function is one-one (injective) when different inputs always give different outputs; if two different inputs ever share an output, it is many-one.

In simple words

In a cinema, every person gets a seat. If no two people are ever given the same seat, the seating is fair: each seat has at most one person. If two people are sent to the same seat, there is a fight. A one-one rule is a seating plan with no fights. Some seats may stay empty; that is fine.

In Class 11 you met many functions: identity, constant, polynomial, rational, modulus, signum, greatest integer, and how to add, subtract, multiply and divide them. Now we sort functions by how their arrows land.

Arrow diagrams, in words

Draw the domain X as an oval on the left and the co-domain Y as an oval on the right. Each element of X sends exactly one arrow to Y (that is what makes it a function). Two pictures with X = {1, 2, 3} and Y = {p, q, r, s}:

  • f: 1 → p, 2 → q, 3 → s. No two arrows land on the same point. Point r gets no arrow. This f is one-one.
  • g: 1 → p, 2 → p, 3 → q. Two arrows land on p. This g is many-one.

So in an arrow diagram, one-one means no point on the right is hit twice. Points on the right that are never hit don't matter here.

Try it: guess first, then rewire the arrows yourself and watch the counts on the right.

The definition and the test

A function f : X → Y is one-one (or injective) if the images of distinct elements are distinct. In symbols, for all \( x_1, x_2 \in X \):

\[ f(x_1) = f(x_2) \implies x_1 = x_2 \]

Otherwise f is many-one. The symbol form is the one you use in proofs: assume two outputs are equal, and show the inputs must be equal. To show f is many-one, find two different inputs with the same output.

Worked examples

  1. f : \( \mathbf{R} \to \mathbf{R} \), f(x) = 3x − 5. Suppose \( 3x_1 - 5 = 3x_2 - 5 \). Add 5 and divide by 3: \( x_1 = x_2 \). One-one.
  2. f : \( \mathbf{R} \to \mathbf{R} \), f(x) = x². f(2) = 4 = f(−2), but 2 ≠ −2. Many-one.
  3. f : \( \mathbf{N} \to \mathbf{N} \), f(x) = x². Now inputs are only 1, 2, 3, …. If \( x_1^2 = x_2^2 \) then \( x_1 = \pm x_2 \), and since both are positive, \( x_1 = x_2 \). One-one. The same formula changed its type when the domain changed.
  4. f : \( \mathbf{R} \to \mathbf{R} \), f(x) = x³. If \( x_1^3 = x_2^3 \) then \( (x_1 - x_2)(x_1^2 + x_1 x_2 + x_2^2) = 0 \). The second bracket is \( \left(x_1 + \frac{x_2}{2}\right)^2 + \frac{3x_2^2}{4} \), which is 0 only when both are 0. Either way \( x_1 = x_2 \). One-one.
  5. Modulus, signum and greatest integer on \( \mathbf{R} \) are all many-one: |−3| = |3|; sgn(2) = sgn(7) = 1; [1.2] = [1.9] = 1.

The horizontal-line idea

For a real function, draw its graph and slide a horizontal line y = c up and down. A horizontal line meets the graph at the points where f(x) = c. So:

  • if some horizontal line cuts the graph twice or more, two inputs share the output c, and f is many-one;
  • if every horizontal line cuts the graph at most once, f is one-one.

The parabola y = x² fails: the line y = 4 cuts it at x = 2 and x = −2. The straight line y = 3x − 5 and the S-shaped y = x³ pass. A graph that keeps rising (or keeps falling) all the way, a strictly increasing or strictly decreasing function, always passes.

Try it: slide the line through each graph, then turn on every line at once.

Don't mix these up

  • Every function sends each input to one output; that is not what "one-one" means. One-one is about the outputs: no output is shared.
  • One-one depends on the domain: x² is many-one on \( \mathbf{R} \) and \( \mathbf{Z} \), but one-one on \( \mathbf{N} \) and on [0, ∞).
  • Checking a few values can show a function is many-one, never that it is one-one. For one-one you need the general argument.

Try it. Is f : \( \mathbf{R} - \{0\} \to \mathbf{R} \), \( f(x) = \frac{1}{x} \), one-one? Is g : \( \mathbf{R} \to \mathbf{R} \), g(x) = x² − 4x, one-one?

Answer
f: if \( \frac{1}{x_1} = \frac{1}{x_2} \), cross-multiply to get \( x_2 = x_1 \). One-one. g: g(0) = 0 and g(4) = 16 − 16 = 0, so it is many-one. (Its graph is a parabola with its lowest point at x = 2, so any line just above the bottom cuts it twice.)

Words to know

One-one (injective)
Different inputs always give different outputs.
Many-one
At least two different inputs give the same output.
Image
The output f(x) that an input x is sent to.
Horizontal-line test
One-one if no horizontal line cuts the graph more than once.
Strictly increasing
A bigger input always gives a bigger output.

Which function from \( \mathbf{Z} \) to \( \mathbf{Z} \) is one-one?

  1. f(x) = x²
  2. f(x) = 2x + 7
  3. f(x) = |x|

The line y = 1 cuts the graph of a function f : \( \mathbf{R} \to \mathbf{R} \) at three points. What follows?

  1. f is not a function
  2. f is many-one
  3. f is one-one

In an arrow diagram of f : X → Y, one point of Y receives no arrow. Can f still be one-one?

  1. Yes
  2. No, never
  3. Only if X and Y have the same number of elements