Function Repository Resource:

# FunctionJectivity (3.0.0)current version: 4.0.0 »

Determine the injectivity and surjectivity of a function

Contributed by: Wolfram|Alpha Math Team
 ResourceFunction["FunctionJectivity"][expr,x,"prop"] determines whether expr, viewed as a function of x, has the "jectivity" property "prop". ResourceFunction["FunctionJectivity"][{expr,cond},x,"prop"] determines whether expr has the given property when x is restricted to satisfy the condition cond.

## Details and Options

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.

## Examples

### Basic Examples (3)

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]=

### Properties and Relations (4)

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]=

## Publisher

Wolfram|Alpha Math Team

## Version History

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

## Author Notes

As a convenience, “prop" can also be among the set {"Injectivity", "Bijectivity", "Surjectivity"}.
It should be extended to give an Association of results when All is used as the property.