← all notes

Unit 2 · Functions and Inverse Functions

Injective, surjective, bijective

A function from AA to BB assigns exactly one element of BB to each element of AA. The picture below is the whole story: the left set is the domain AA, the right set is the codomain BB, and each arrow is the rule.

ABNot a functionone A, many BABFunctionevery A has one BABInjectivedifferent A, different BABSurjectiveevery B is coveredABBijectiveone-to-one and onto

When is it even a function?

A mapping fails to be a function as soon as one input points to two outputs. In the first panel, one element of AA has two arrows leaving it, so it is not a function. Every other panel sends each AA to a single BB, so all of them are functions.

Injective (one-to-one)

A function is injective when no two inputs share an output:

f(x1)=f(x2)    x1=x2f(x_1) = f(x_2) \implies x_1 = x_2

Each element of BB gets at most one arrow. Some elements of BB can stay untouched, and that is fine. Because no output is reused, you can trace any arrow backwards, which is what lets an inverse exist.

Surjective (onto)

A function is surjective when every element of BB gets hit. The image covers the whole codomain:

f(A)=Bf(A) = B

Several inputs can share the same output; nothing in BB is left without an arrow.

Bijective

A function is bijective when it is injective and surjective at the same time: each AA pairs with one BB, and each BB with one AA. This perfect one-to-one pairing is exactly what a true inverse f1:BAf^{-1} : B \to A needs to exist.