In the context of mathematics , the link that develops between two sets is called a function , through which each element of a set is assigned a single element of another set or none at all. The idea of injective , on the other hand, refers to the property that indicates that two different elements of a first set correspond to two different elements of a second set.
An injective function , therefore, is one that, to different elements of the initial set (the domain ), correspond to different elements of the final set (the codomain). This means that each element of the codomain has no more than one preimage in the domain: or, expressed another way, that each element of the domain cannot have more than one image in the codomain .
Example of an injective function
The expression of an injective function is f : x -> y . Take the case of a set X formed by Argentina , Switzerland and Nigeria , and a set Y composed of America , Europe and Africa . If we wanted to establish a relationship between each country and its corresponding continent, we would obtain an injective function, since the links would be the following:
Argentina -> America
Switzerland -> Europe
Nigeria -> Africa
With the sets mentioned and the relationship indicated, the elements of the first set (the countries ) could never correspond to more than one image in the second set (the continents). Argentina belongs to America , and not to Europe or Africa . Switzerland , for its part, is only in Europe (not in America or Africa ). Nigeria , finally, is only part of Africa , without being in America or Europe . In this case, ultimately, both sets are linked by an injective function.
Other kinds of relationships
Let's see below an example in which the requirements for the function to be considered injective are not met. Such is the case of the function that admits all real numbers and is defined as f(x) = xx : since it is possible to use both negative and positive numbers to replace the variable x , each result (which by convention is represented with the variable y ) can be obtained with any number and its opposite, such as 8 and -8 (for both, the result is 64 ).
This is not possible with examples such as the one involving countries and their continents, but this does not mean that outside of mathematics there are not less strict or, so to speak, more flexible relationships . If we think of a set in which the names of ten people are listed and another, their co-domain, in which some of their friends are, it would be possible that for each element of the second there would be more than one of the domain.
Returning to the field of numbers, if we wanted to alter the previous function so that it became injective we would only have to restrict the domain to positive real numbers: in this way, an element of one of the sets would never be related to more than one of the other.
Formal definition of injective function
The formal definition of an injective function is the following: f : X -> Y is injective only if for the elements of the set In other words, the function is also injective if when the elements are different, so are their images .
On the other hand, if we have two sets between which there is an injective function, we speak of cardinality when the elements of the first are less than or equal to their images. If a second function related the sets in the inverse sense, then it would be said that there is a bijective application between the sets.