Constant function

Type of mathematical function


title: "Constant function" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["elementary-mathematics", "elementary-special-functions", "polynomial-functions"] description: "Type of mathematical function" topic_path: "science/mathematics" source: "https://en.wikipedia.org/wiki/Constant_function" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0

::summary Type of mathematical function ::

In mathematics, a constant function is a function whose (output) value is the same for every input value.

Basic properties

::figure[src="https://upload.wikimedia.org/wikipedia/commons/2/2e/wiki_constant_function_175_200.png" caption="x}}."] ::

As a real-valued function of a real-valued argument, a constant function has the general form or just For example, the function is the specific constant function where the output value is . The domain of this function is the set of all real numbers. The image of this function is the singleton set . The independent variable 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 4.{{cite book | last = Tanton | first = James | year = 2005 | title = Encyclopedia of Mathematics | publisher = Facts on File, New York | isbn = 0-8160-5124-0 | page = 94 | url = https://archive.org/details/encyclopedia-of-mathematics_202206/page/94/mode/1up?view=theater

The graph of the constant function is a horizontal line in the plane that passes through the point (0, c). In the context of a polynomial in one variable x, the constant function is called non-zero constant function because it is a polynomial of degree 0, and its general form is , where c is nonzero. This function has no intersection point with the axis, meaning 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 axis in the plane. Its graph is symmetric with respect to the axis, and therefore a constant function is an even function.{{cite book | last = Young | first = Cynthia Y. | authorlink = Cynthia Y. Young | year = 2021 | title = Precalculus | edition = 3rd | url = https://books.google.com/books?id=BOBDEAAAQBAJ&pg=PA122 | page = 122 | publisher = John Wiley & Sons | isbn = 978-1-119-58294-6 }}

In the context where it is defined, the derivative 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.{{cite book | last1 = Varberg | first1 = Dale E. | last2 = Purcell | first2 = Edwin J. | last3 = Rigdon | first3 = Steven E. | title = Calculus | year = 2007 | publisher = Pearson Prentice Hall | page = 107 | edition = 9th | isbn = 978-0131469686

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 of f is a lattice, then f must be constant.

  • Every constant function whose domain and codomain are the same set X is a left zero of the full transformation monoid on X, which implies that it is also idempotent.
  • It has zero slope or gradient.
  • Every constant function between topological spaces is continuous.
  • 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's axiomatization of set theory, the Elementary Theory of the Category of Sets (ETCS).
  • For any non-empty X, every set Y is isomorphic to the set of constant functions in X \to Y. For any X and each element y in Y, there is a unique function \tilde{y}: X \to Y such that \tilde{y}(x) = y for all x \in X. Conversely, if a function f: X \to Y satisfies f(x) = f(x') for all x, x' \in X, f is by definition a constant function.
    • As a corollary, the one-point set is a generator in the category of sets.
    • Every set X is canonically isomorphic to the function set X^1, or hom set \operatorname{hom}(1,X) 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, \operatorname{hom}(X \times Y, Z) \cong \operatorname{hom}(X(\operatorname{hom}(Y, Z))) the category of sets is a closed monoidal category with the Cartesian product of sets as tensor product and the one-point set as tensor unit. In the isomorphisms \lambda: 1 \times X \cong X \cong X \times 1: \rho natural in X, the left and right unitors are the projections p_1 and p_2 the ordered pairs (*, x) and (x, *) respectively to the element x, where * is the unique point in the one-point set.

A function on a connected set is locally constant if and only if it is constant.

References

  • Herrlich, Horst and Strecker, George E., Category Theory, Heldermann Verlag (2007).

References

  1. (2007). "College Algebra". Lamar University.
  2. (2005). "Advanced Mathematical Concepts - Pre-calculus with Applications, Student Edition". Glencoe/McGraw-Hill School Pub Co.
  3. "Zero Derivative implies Constant Function".
  4. (27 Jun 2011). "An informal introduction to topos theory".

::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::

elementary-mathematicselementary-special-functionspolynomial-functions