In
mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
, a constant function is a
function whose (output) value is the same for every input value. For example, the function is a constant function because the value of is 4 regardless of the input value (see image).
Basic properties
As a real-valued function of a real-valued argument, a constant function has the general form or just
:Example: The function or just is the specific constant function where the output value is The
domain of this function is the set of all real numbers R. The
codomain of this function is just . The independent variable ''x'' does not appear on the right side of the function expression and so its value is "vacuously substituted". Namely and so on. No matter what value of ''x'' is input, the output is "2".
:Real-world example: A store where every item is sold for the price of 1 dollar.
The graph of the constant function is a horizontal line in the
plane that passes through the point
In the context of a
polynomial
In mathematics, a polynomial is an expression consisting of indeterminates (also called variables) and coefficients, that involves only the operations of addition, subtraction, multiplication, and positive-integer powers of variables. An exampl ...
in one variable ''x'', the non-zero constant function is a polynomial of degree 0 and its general form is where is nonzero. This function has no intersection point with the ''x''-axis, that is, it has no
root (zero). On the other hand, the polynomial is the identically zero function. It is the (trivial) constant function and every ''x'' is a root. Its graph is the ''x''-axis in the plane.
A constant function is an
even function
In mathematics, even functions and odd functions are functions which satisfy particular symmetry relations, with respect to taking additive inverses. They are important in many areas of mathematical analysis, especially the theory of power se ...
, i.e. the graph of a constant function is symmetric with respect to the ''y''-axis.
In the context where it is defined, the
derivative
In mathematics, the derivative of a function of a real variable measures the sensitivity to change of the function value (output value) with respect to a change in its argument (input value). Derivatives are a fundamental tool of calculus. ...
of a function is a measure of the rate of change of function values with respect to change in input values. Because a constant function does not change, its derivative is 0. This is often written:
. The converse is also true. Namely, if for all real numbers ''x'', then ''y'' is a constant function.
:Example: Given the constant function The derivative of ''y'' is the identically zero function
Other properties
For functions between
preordered sets, constant functions are both
order-preserving and
order-reversing; conversely, if ''f'' is both order-preserving and order-reversing, and if the
domain
Domain may refer to:
Mathematics
*Domain of a function, the set of input values for which the (total) function is defined
** Domain of definition of a partial function
** Natural domain of a partial function
**Domain of holomorphy of a function
* ...
of ''f'' is a
lattice, then ''f'' must be constant.
* Every constant function whose
domain
Domain may refer to:
Mathematics
*Domain of a function, the set of input values for which the (total) function is defined
** Domain of definition of a partial function
** Natural domain of a partial function
**Domain of holomorphy of a function
* ...
and
codomain are the same set ''X'' is a
left zero In mathematics, an absorbing element (or annihilating element) is a special type of element of a set with respect to a binary operation on that set. The result of combining an absorbing element with any element of the set is the absorbing element ...
of the
full transformation monoid on ''X'', which implies that it is also
idempotent.
* It has zero slope/
gradient
In vector calculus, the gradient of a scalar-valued differentiable function of several variables is the vector field (or vector-valued function) \nabla f whose value at a point p is the "direction and rate of fastest increase". If the gr ...
.
* Every constant function between
topological space
In mathematics, a topological space is, roughly speaking, a geometrical space in which closeness is defined but cannot necessarily be measured by a numeric distance. More specifically, a topological space is a set whose elements are called poin ...
s is
continuous
Continuity or continuous may refer to:
Mathematics
* Continuity (mathematics), the opposing concept to discreteness; common examples include
** Continuous probability distribution or random variable in probability and statistics
** Continuous g ...
.
* A constant function factors through the
one-point set, the
terminal object in the
category of sets. This observation is instrumental for
F. William Lawvere
Francis William Lawvere (; born February 9, 1937) is a mathematician known for his work in category theory, topos theory and the philosophy of mathematics.
Biography
Lawvere studied continuum mechanics as an undergraduate with Clifford Truesdell ...
's axiomatization of set theory, the Elementary Theory of the Category of Sets (ETCS).
* For any non-empty ''Y'', every set ''X'' is
isomorphic
In mathematics, an isomorphism is a structure-preserving mapping between two structures of the same type that can be reversed by an inverse mapping. Two mathematical structures are isomorphic if an isomorphism exists between them. The word i ...
to the set of constant functions in
. For any ''Y'' and each element ''x'' in ''X'', there is a unique function
such that
for all
. Conversely, if a function
satisfies
for all
,
is by definition a constant function.
** As a corollary, the one-point set is a
generator in the category of sets.
** Every set
is canonically isomorphic to the function set
, or
hom set in the category of sets, where 1 is the one-point set. Because of this, and the adjunction between Cartesian products and hom in the category of sets (so there is a canonical isomorphism between functions of two variables and functions of one variable valued in functions of another (single) variable,
) the category of sets is a
closed monoidal category with the
Cartesian product
In mathematics, specifically set theory, the Cartesian product of two sets ''A'' and ''B'', denoted ''A''×''B'', is the set of all ordered pairs where ''a'' is in ''A'' and ''b'' is in ''B''. In terms of set-builder notation, that is
: A\t ...
of sets as tensor product and the one-point set as tensor unit. In the isomorphisms
natural in X, the left and right unitors are the projections
and
the
ordered pair
In mathematics, an ordered pair (''a'', ''b'') is a pair of objects. The order in which the objects appear in the pair is significant: the ordered pair (''a'', ''b'') is different from the ordered pair (''b'', ''a'') unless ''a'' = ''b''. (In con ...
s
and
respectively to the element
, where
is the unique
point in the one-point set.
A function on a
connected set
In topology and related branches of mathematics, a connected space is a topological space that cannot be represented as the union of two or more disjoint non-empty open subsets. Connectedness is one of the principal topological properties ...
is
locally constant if and only if it is constant.
References
*Herrlich, Horst and Strecker, George E., ''Category Theory'', Heldermann Verlag (2007).
External links
*
*
{{polynomials
Elementary mathematics
Elementary special functions
Polynomial functions