Wolfram Research

Function Repository Resource:

FunctionJectivity (3.0.0) current version: 4.0.0 »

Source Notebook

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]:=
ResourceFunction["FunctionJectivity"][Sin[x], x, "Injective"]
Out[2]=

Test a rational function for injectivity:

In[3]:=
ResourceFunction["FunctionJectivity"][1/x, x, "Injective"]
Out[4]=

Test a polynomial function for surjectivity:

In[5]:=
ResourceFunction["FunctionJectivity"][x^2 - x, x, "Surjective"]
Out[5]=

Properties and Relations (4) 

Power functions are both injective and surjective for odd powers:

In[6]:=
func = x^3;
ResourceFunction["FunctionJectivity"][func, x, "Bijective"]
Out[7]=

Power functions are neither injective nor surjective for even powers:

In[8]:=
func = x^4;
ResourceFunction["FunctionJectivity"][func, x, "Injective"]
Out[9]=
In[10]:=
ResourceFunction["FunctionJectivity"][func, x, "Surjective"]
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]:=
func = x^3 - x;
ResourceFunction["FunctionJectivity"][func, x, "Surjective"]
Out[12]=

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

In[13]:=
ResourceFunction["FunctionJectivity"][{func, x > 0}, x, "Surjective"]
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]:=
func = x^2;
ResourceFunction["FunctionJectivity"][func, x, "Injective"]
Out[15]=

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

In[16]:=
ResourceFunction["FunctionJectivity"][{func, x > 0}, x, "Injective"]
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

Related Resources

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.

License Information