# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

Determine the injectivity and surjectivity of a function

Contributed by:
Wolfram|Alpha Math Team

ResourceFunction["FunctionJectivity"][ determines whether | |

ResourceFunction["FunctionJectivity"][{ determines whether |

For the purposes of determining injectivity and surjectivity, *expr* is viewed as a mapping from to .

The string argument "*prop*" can take the values "Injective", "Surjective" or "Bijective".

An injective function is also known as "one-to-one" and a surjective function is also known as "onto". A function is called bijective if it is both injective and surjective.

Test a trigonometric function for injectivity:

In[1]:= |

Out[2]= |

Test a rational function for injectivity:

In[3]:= |

Out[4]= |

Test a polynomial function for surjectivity:

In[5]:= |

Out[5]= |

Power functions are both injective and surjective for odd powers:

In[6]:= |

Out[7]= |

Power functions are neither injective nor surjective for even powers:

In[8]:= |

Out[9]= |

In[10]:= |

Out[10]= |

A function that is surjective (whose image is the set of reals) may not be so when the domain is restricted:

In[11]:= |

Out[12]= |

Restricting to the domain of positive *x*, the function is no longer surjective:

In[13]:= |

Out[13]= |

A function that is not injective (one-to-one) across the full set of reals may become so when the domain is restricted:

In[14]:= |

Out[15]= |

Test a power function for injectivity when restricted to the domain of positive *x*:

In[16]:= |

Out[16]= |

- 4.0.0 – 23 March 2023
- 3.0.0 – 24 April 2020
- 2.0.0 – 24 January 2020
- 1.0.0 – 17 September 2019

This work is licensed under a Creative Commons Attribution 4.0 International License