FunctionSurjective[f,x]
tests whether
has at least one solution
for each y∈Reals.
FunctionSurjective[f,x,dom]
tests whether
has at least one solution x∈dom for each y∈dom.
FunctionSurjective[{f1,f2,…},{x1,x2,…},dom]
tests whether
has at least one solution x1,x2,…∈dom for each y1,y2,…∈dom.
FunctionSurjective[{funs,xcons,ycons},xvars,yvars,dom]
tests whether
has at least one solution with xvars∈dom restricted by the constraints xcons for each yvars∈dom restricted by the constraints ycons.
FunctionSurjective
FunctionSurjective[f,x]
tests whether
has at least one solution
for each y∈Reals.
FunctionSurjective[f,x,dom]
tests whether
has at least one solution x∈dom for each y∈dom.
FunctionSurjective[{f1,f2,…},{x1,x2,…},dom]
tests whether
has at least one solution x1,x2,…∈dom for each y1,y2,…∈dom.
FunctionSurjective[{funs,xcons,ycons},xvars,yvars,dom]
tests whether
has at least one solution with xvars∈dom restricted by the constraints xcons for each yvars∈dom restricted by the constraints ycons.
Details and Options
- A surjective function is also known as onto or an onto mapping.
- A function
is surjective if for every
there is at least one
such that
. - If funs contains parameters other than xvars, the result is typically a ConditionalExpression.
- Possible values for dom are Reals and Complexes. If dom is Reals, then all variables, parameters, constants and function values are restricted to be real.
- The domain of funs is restricted by the condition given by FunctionDomain.
- xcons and ycons can contain equations, inequalities or logical combinations of these.
- FunctionSurjective[{funs,xcons,ycons},xvars,yvars,dom] returns True if the mapping
is surjective, where
is the solution set of xcons and
is the solution set of ycons. - The following options can be given:
-
Assumptions $Assumptions assumptions on parameters GenerateConditions True whether to generate conditions on parameters PerformanceGoal $PerformanceGoal whether to prioritize speed or quality - Possible settings for GenerateConditions include:
-
Automatic nongeneric conditions only True all conditions False no conditions None return unevaluated if conditions are needed - Possible settings for PerformanceGoal are "Speed" and "Quality".
Examples
open all close allBasic Examples (4)
Test surjectivity of a univariate function over the reals:
FunctionSurjective[Tan[x], x]Test surjectivity over the complexes:
FunctionSurjective[Tan[x], x, Complexes]Test surjectivity of a polynomial mapping over the reals:
FunctionSurjective[{x + y ^ 3, y - x ^ 5}, {x, y}]Test surjectivity of a polynomial with symbolic coefficients:
FunctionSurjective[a x ^ 2 + b x y + c y ^ 2, {x, y}]Scope (12)
FunctionSurjective[x ^ 3 - x, x]Each value is attained at least once:
Plot[{x ^ 3 - x, 1 / 4}, {x, -2, 2}]Surjectivity over a subset of the reals:
FunctionSurjective[{x ^ 3 - x, x > 0}, x]For positive
, some values are not attained:
Plot[{x ^ 3 - x, -1}, {x, 0, 2}]Surjectivity onto a subset of the reals:
FunctionSurjective[{x ^ 3 - x, x > 0, y > 0}, x, y]Each positive value
is for some positive
:
Plot[{x ^ 3 - x, 1}, {x, 0, 2}]Surjectivity over the complexes:
FunctionSurjective[E ^ x, x, Complexes]The value zero is not attained:
Reduce[E ^ x == 0, x]Surjectivity onto a subset of complexes:
FunctionSurjective[{E ^ x, True, y ≠ 0}, x, y, Complexes]Surjectivity over the integers:
FunctionSurjective[{x / 2 + 1, Element[x, Integers], Element[y, Integers]}, x, y]Surjectivity of linear mappings:
A = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};FunctionSurjective[A.{x, y, z}, {x, y, z}]B = {{1, 2, 3}, {4, 5, 6}, {7, 8, 0}};FunctionSurjective[B.{x, y, z}, {x, y, z}]A linear mapping is surjective iff the rank of its matrix is equal to the dimension of its codomain:
{MatrixRank[A], MatrixRank[B]}Surjectivity of polynomial mappings
:
FunctionSurjective[x ^ 2 + x y - y ^ 2, {x, y}]Each value is attained at least once:
Plot3D[{x ^ 2 + x y - y ^ 2, -1}, {x, -3, 3}, {y, -3, 3}]This mapping is not surjective:
FunctionSurjective[x ^ 2 + x y + y ^ 2, {x, y}]Plot3D[{x ^ 2 + x y + y ^ 2, -1}, {x, -3, 3}, {y, -3, 3}]Surjectivity of polynomial mappings
:
FunctionSurjective[{x + y ^ 2, y - x ^ 2}, {x, y}]Surjectivity of polynomial mappings
:
FunctionSurjective[{x + y ^ 2, y - x ^ 2}, {x, y}, Complexes]Surjectivity of a real polynomial with symbolic parameters:
FunctionSurjective[a x ^ 2 + b x + c, x]Surjectivity of a real polynomial mapping with symbolic parameters:
FunctionSurjective[{x ^ 2 + 2 x y, y ^ 2 + a x y}, {x, y}]Options (4)
Assumptions (1)
FunctionSurjective gives a conditional answer here:
FunctionSurjective[{x ^ 2 + 2 x y, y ^ 2 + a x y}, {x, y}]This checks the surjectivity for the remaining real values of
:
FunctionSurjective[{x ^ 2 + 2 x y, y ^ 2 + a x y}, {x, y}, Assumptions -> a ≤ 1 / 2]GenerateConditions (2)
By default, FunctionSurjective may generate conditions on symbolic parameters:
FunctionSurjective[a x ^ 2 + b x y + c y ^ 2, {x, y}]With GenerateConditionsNone, FunctionSurjective fails instead of giving a conditional result:
FunctionSurjective[a x ^ 2 + b x y + c y ^ 2, {x, y}, GenerateConditions -> None]This returns a conditionally valid result without stating the condition:
FunctionSurjective[a x ^ 2 + b x y + c y ^ 2, {x, y}, GenerateConditions -> False]By default, all conditions are reported:
FunctionSurjective[a x ^ 2 + b x + c, x]With GenerateConditionsAutomatic, conditions that are generically true are not reported:
FunctionSurjective[a x ^ 2 + b x + c, x, GenerateConditions -> Automatic]PerformanceGoal (1)
Use PerformanceGoal to avoid potentially expensive computations:
FunctionSurjective[x ^ 2 + y ^ 2 + a x y, {x, y}, PerformanceGoal -> "Speed"]The default setting uses all available techniques to try to produce a result:
FunctionSurjective[x ^ 2 + y ^ 2 + a x y, {x, y}]Applications (11)
Basic Applications (7)
FunctionSurjective[Log[x ^ 2], x]
is surjective because it attains each value at least once:
Plot[{Log[x ^ 2], -1, 1}, {x, -3, 3}]FunctionSurjective[Csch[x], x]
is not surjective because the value
is not attained:
Plot[{Csch[x], 0}, {x, -2, 2}]
is not surjective because it does not attain negative values:
FunctionSurjective[Sqrt[x], x]Plot[{Sqrt[x], -1}, {x, -2, 2}]
is surjective as a function from
to
:
FunctionSurjective[{Sqrt[x], x ≥ 0, y ≥ 0}, x, y]Each non-negative value is attained:
Plot[{Sqrt[x], 1}, {x, 0, 4}, PlotRange -> All]FunctionSurjective[CatalanNumber[x], x]Each value is attained at least once:
Plot[{CatalanNumber[x], -1, 1 / 2, 2}, {x, -2.5, 2.5}]FunctionSurjective[CosIntegral[x], x]Some values, e.g.
, are not attained:
Plot[{CosIntegral[x], 3 / 4}, {x, -1, 10}]A function is surjective if any horizontal line intersects its graph at least once:
FunctionSurjective[RiemannSiegelTheta[x], x]Manipulate[Plot[{RiemannSiegelTheta[x], a}, ...], {{a, 2}, -5, 5}]If a horizontal line does not intersect the graph, the function is not surjective:
FunctionSurjective[FresnelS[x], x]Manipulate[Plot[{FresnelS[x], a}, ...], {{a, 0.8}, -1, 1}]MaxValue[Abs[Sin[x]], x]Bounded functions are not surjective:
FunctionSurjective[Sin[x], x]If
is continuous on
and
, then
is surjective onto
:
f[x_] := x ^ 4 - 2x ^ 2 + x / 2 + 1f[-3 / 2] < f[3 / 2]Use FunctionContinuous to check that
is continuous in
:
FunctionContinuous[{f[x], -3 / 2 ≤ x ≤ 3 / 2}, x]By the intermediate value theorem,
restricted to
is surjective onto
:
FunctionSurjective[{f[x], -3 / 2 ≤ x ≤ 3 / 2, f[-3 / 2] ≤ y ≤ f[3 / 2]}, x, y]Plot[{f[x], f[-3 / 2], f[3 / 2]}, {x, -3 / 2, 3 / 2}, Rule[...]]An affine mapping
is surjective if the rank of
is equal to the number of rows of
:
Subscript[A, 1] = {{1, 2, 3}, {4, 5, 6}};MatrixRank[Subscript[A, 1]]FunctionSurjective[Subscript[A, 1].{x, y, z} + {7, 8}, {x, y, z}]Subscript[A, 2] = {{1, 2, 3}, {2, 4, 6}};MatrixRank[Subscript[A, 2]]FunctionSurjective[Subscript[A, 2].{x, y, z} + {7, 8}, {x, y, z}]Solving Equations and Inequalities (1)
A function
is surjective if the equation
has at least one solution for any
:
f[x_] := x / (x ^ 2 - 1)FunctionSurjective[f[x], x]For each real
, there is at least one real solution for
:
Reduce[f[x] == y, x, Reals]Use Resolve to check the condition expressed using quantifiers:
Resolve[ForAll[y, Exists[x, f[x] == y]], Reals]Plot[f[x], {x, -3, 3}]Probability & Statistics (3)
A CDF for a continuous distribution is surjective onto the interval of probabilities (0,1) over its domain:
cdf = CDF[NormalDistribution[0, 1], x]Plot[cdf, {x, -3, 3}]FunctionSurjective[{cdf, True, 0 < y < 1}, x, y]A SurvivalFunction for a continuous distribution is surjective onto the interval of probabilities (0,1) over its domain:
sf = SurvivalFunction[NormalDistribution[0, 1], x]Plot[sf, {x, -3, 3}]FunctionSurjective[{sf, True, 0 < y < 1}, x, y]The quantile function Quantile for a distribution is surjective onto the domain of the distribution:
qf = Quantile[NormalDistribution[0, 1], q]Plot[qf, {q, 0, 1}]FunctionSurjective[{qf, 0 < q < 1}, q]Properties & Relations (3)
is surjective iff the equation
has at least one solution for each
:
FunctionSurjective[x ^ 2 + x + 1, x]FunctionSurjective[x ^ 3 + x + 1, x]Use Solve to find the solutions:
Solve[x ^ 2 + x + 1 == y, x, Reals]Solve[x ^ 3 + x + 1 == y, x, Reals]A real continuous function on an interval is surjective iff the limits at endpoints are
and
:
FunctionSurjective[{Sec[x], -Pi / 2 < x < Pi / 2}, x]FunctionSurjective[{Tan[x], -Pi / 2 < x < Pi / 2}, x]Plot[{Sec[x], Tan[x]}, {x, -Pi / 2, Pi / 2}]Use Limit to compute the limits:
Limit[{Sec[x], Tan[x]}, x -> -Pi / 2, Direction -> "FromAbove"]Limit[{Sec[x], Tan[x]}, x -> Pi / 2, Direction -> "FromBelow"]A function is surjective if its FunctionRange is True:
FunctionRange[x Sin[x], x, y]FunctionSurjective[x Sin[x], x]Possible Issues (1)
FunctionSurjective determines the real domain of functions using FunctionDomain:
FunctionSurjective[{Cosh[Sqrt[x]], True, y ≥ 0}, x, y]
is not surjective onto
in the real domain reported by FunctionDomain:
FunctionDomain[Cosh[Sqrt[x]], x]Plot[{Cosh[Sqrt[x]], 1 / 2}, {x, 0, 10}]
is real valued over the whole reals and is surjective onto
:
Plot[{Cosh[Sqrt[x]], 1 / 2}, {x, -10, 10}]All subexpressions of
need to be real valued for a point to belong to the real domain of
:
Refine[Element[Sqrt[x], Reals], x < 0]Related Guides
History
Text
Wolfram Research (2020), FunctionSurjective, Wolfram Language function, https://reference.wolfram.com/language/ref/FunctionSurjective.html.
CMS
Wolfram Language. 2020. "FunctionSurjective." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FunctionSurjective.html.
APA
Wolfram Language. (2020). FunctionSurjective. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FunctionSurjective.html
BibTeX
@misc{reference.wolfram_2026_functionsurjective, author="Wolfram Research", title="{FunctionSurjective}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/FunctionSurjective.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_functionsurjective, organization={Wolfram Research}, title={FunctionSurjective}, year={2020}, url={https://reference.wolfram.com/language/ref/FunctionSurjective.html}, note=[Accessed: 13-June-2026]}