Math function classes (injection, surjection, bijection)

Let’s start with the definition first:

(1) In mathematicsinjectionssurjections and bijections are classes of functions distinguished by the manner in which arguments (input expressions from the domain) and images (output expressions from the codomain) are related or mapped to each other (taken from Wikipedia:,_injection_and_surjection).

Now let’s simplify the definition:

In mathematics injectionssurjections and bijections are classes of functions which tell us how functions behave. By applying a class we can easily distinguish a function’s order in most cases (f(x)= x, f(x)=x2 etc.)

(2) Domain and codomain simplified

Domain is a set where x values are stored and the codomain is a set where y values are stored.

(3) Injection: the injection class means that each x value/element of the 2d coordinate system has a corresponding y value of the coordinate system, in other words every x value in a set (this set is called the domain) is connected to an appropriate/corresponding y value in the other set (this set is called the codomain). In order for a function to be injective all of the values from x must be connected to all of the appropriate/corresponding values to y. Injection is also called one to one relationship since every x value MUST match the corresponding y value. If a value remains without a connection in any of the sets (domain & codomain) or if there are multiple connections for example from the x values/elements from the domain to one y value from the codomain (vice versa) then the function is NOT injective.

Proof formula:


Example picture:


(4) Surjection: the surjection class means that each x value/element in the domain of the 2d coordinate system has AT LEAST ONE (but can have multiple, most often two) corresponding values/elements in the codomain. It is important to say that all y values of the coordinate system must be used in order for a function to be surjective. This means that when you look at the function and decide to draw numerous horizontal lines (both negative and positive sections of the coordinate system, y0) the horizontal line that you have drawn will have to touch AT LEAST ONCE the given function. If this is not the case then the function is not surjective.

Proof formula:


Example picture:


(5) Bijection: the bijection function class represents the injection and surjection combined, both of these two criteria’s have to be met in order for a function to be bijective. We write the bijection in the following way, Bijection=Injection AND Surjection.

(6) If a function is neither injective, surjective nor bijective, then the function is just called: General function

Example picture:



(7) A function is not defined if for one value in the domain there exists multiple values in the codomain. For example, if we have one x value on the coordinate system (let x be 3) and for that SAME x we have 2 or more y values, then the given graph is not a function because we don’t know which y values should we use and there must only exist one y value for one x value (surjection principal). See the horizontal and vertical test below (9).

Example picture (not a function):

(8) Note: When defining a function it is important to limit the function (set x border values) because borders depend on the surjectivness, injectivness, bijectivness.

(9) Vertical and Horizontal test lines,

Vertical lines are used to evaluate the existence of a function. This means that they determine if the graph inside a coordinate system is really a function or  isn’t.

Example picture (taken from:


The picture says it all but let’s add a few words: If a vertical line crosses the graph MORE THAN ONCE, then the graph is NOT A FUNCTION.

Horizontal lines are used to evaluate the function classHorizontal lines actually tell us which class does NOT BELONG TO THE FUNCTION (injection, surjection)

Example picture (taken from:

Screen Shot 2014-08-28 at 10.40.11 AM