Constant function: Difference between revisions

Content deleted Content added
In a connected set, the function is locally constant if and only if it is constant.; right?
 
(188 intermediate revisions by more than 100 users not shown)
Line 1:
{{Short description|Type of mathematical function}}
In [[mathematics]] a '''constant function''' is a [[function (mathematics)|function]] whose values do not vary and thus are [[constant]]. For example, if we have the function ''f''(''x'') = 4, then ''f'' is constant since f maps any value to 4. More formally, a function ''f'' : ''A'' → ''B'', is a constant function if ''f''(''x'') = ''f''(''y'') for all ''x'' and ''y'' in ''A''.
{{distinguish|function constant}}
{{Functions}}
 
In [[mathematics]], a '''constant function''' is a [[Function (mathematics)|function]] whose (output) value is the same for every input value.
Notice that every [[empty function]], that is, any function whose [[___domain]] equals the [[empty set]], is included in the above definition [[vacuous truth|vacuously]], since there are no ''x'' and ''y'' in ''A'' for which ''f''(''x'') and ''f''(''y'') are different. However some find it more convenient to define constant function so as to exclude empty functions.
 
== Basic properties ==
For [[polynomial]] functions, a non-zero constant function is called a polynomial of degree zero.
[[Image:wiki constant function 175 200.png|270px|right|thumb|An example of a constant function is {{math|1=''y''(''x'') = 4}}, because the value of {{math|''y''(''x'')}} is 4 regardless of the input value {{mvar|x}}.]]
As a real-valued function of a real-valued argument, a constant function has the general form {{math|1=''y''(''x'') = ''c''}} or just {{nowrap|{{math|1=''y'' = ''c''}}.}} For example, the function {{math|1=''y''(''x'') = 4}} is the specific constant function where the output value is {{math|1=''c'' = 4}}. The [[___domain of a function|___domain of this function]] is the set of all [[real number]]s. The [[Image (mathematics)|image]] of this function is the [[Singleton (mathematics)|singleton]] set {{math|{{mset|4}}}}. The independent variable {{nowrap|1=''x''}} does not appear on the right side of the function expression and so its value is "vacuously substituted"; namely {{math|1=''y''(0) = 4}}, {{math|1=''y''(−2.7) = 4}}, {{math|1=''y''(π) = 4}}, and so on. No matter what value of {{math|''x''}} is input, the output is {{math|4}}.<ref>{{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
}}</ref>
 
The graph of the constant function {{math|1=''y'' = ''c''}} is a ''horizontal line'' in the [[plane (geometry)|plane]] that passes through the point {{math|(0, ''c'')}}.<ref>{{cite web|title=College Algebra| last1=Dawkins|first1=Paul| year=2007| publisher= Lamar University|url=http://tutorial.math.lamar.edu/Classes/Alg/Alg.aspx| page=224|access-date=January 12, 2014}}</ref> In the context of a [[polynomial]] in one variable {{math|''x''}}, the constant function is called ''non-zero constant function'' because it is a polynomial of degree 0, and its general form is {{math|1=''f''(''x'') = ''c''}}, where {{mvar|c}} is nonzero. This function has no intersection point with the {{nowrap|1={{math|1=''x''}}-}}axis, meaning it has no [[zero of a function|root (zero)]]. On the other hand, the polynomial {{math|1=''f''(''x'') = 0}} is the ''identically zero function''. It is the (trivial) constant function and every {{math|''x''}} is a root. Its graph is the {{nowrap|1={{math|1=''x''}}-}}axis in the plane.<ref>{{cite book|title=Advanced Mathematical Concepts - Pre-calculus with Applications, Student Edition|last1=Carter|first1=John A.|last4=Marks|first4=Daniel|last2=Cuevas|first2=Gilbert J.|last3=Holliday|first3=Berchie|last5=McClure|first5=Melissa S. |publisher=Glencoe/McGraw-Hill School Pub Co|year=2005|isbn=978-0078682278|chapter=1|edition=1|page=22}}</ref> Its graph is symmetric with respect to the {{nowrap|1={{math|1=''y''}}-}}axis, and therefore a constant function is an [[Even and odd functions|even function]].<ref>{{cite book
==Properties==
| last = Young | first = Cynthia Y. | authorlink = Cynthia Y. Young
Constant functions can be characterized with respect to [[function composition]] in two ways.
| 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 }}</ref>
 
In contextsthe context where it is defined, the [[derivative]] of a function measuresis howa thatmeasure of the rate of change of function variesvalues with respect to thechange variation ofin someinput argumentvalues. It follows that, sinceBecause a constant function does not varychange, it'sits derivative(s), whereis defined, will be zero0.<ref>{{cite Thus for example:book
The following are equivalent:
| last1 = Varberg | first1 = Dale E.
# ''f''&nbsp;:&nbsp;''A'' &rarr; ''B'', is a constant function.
| last2 = Purcell | first2 = Edwin J.
# For all functions ''g'', ''h''&nbsp;:&nbsp;''C'' &rarr; ''A'', ''f'' <small> o </small> ''g'' = ''f'' <small> o </small> ''h'', (where "<small>o</small>" denotes [[function composition]]).
| last3 = Rigdon | first3 = Steven E.
# The composition of ''f'' with any other function is also a constant function.
| title = Calculus
| year = 2007
| publisher = [[Pearson Prentice Hall]]
| page = 107
| edition = 9th
| isbn = 978-0131469686
}}</ref> This is often written: <math>(x \mapsto c)' = 0</math>. The converse is also true. Namely, if {{math|''y''′(''x'') {{=}} 0}} for all real numbers {{math|''x''}}, then {{math|''y''}} is a constant function.<ref>{{cite web|url=http://www.proofwiki.org/wiki/Zero_Derivative_implies_Constant_Function|title=Zero Derivative implies Constant Function|access-date=January 12, 2014}}</ref> For example, given the constant function {{nowrap|<math>y(x) = -\sqrt{2}</math>.}} The derivative of {{math|''y''}} is the identically zero function {{nowrap|<math>y'(x) = \left(x \mapsto -\sqrt{2}\right)' = 0</math>.}}
 
== Other properties ==
The first characterization of constant functions given above, is taken as the motivating and defining property for the more general notion of [[constant morphism]] in [[Category theory]].
For functions between [[preorder|preordered sets]], constant functions are both [[order-preserving]] and [[order-reversing]]; conversely, if {{math|''f''}} is both order-preserving and order-reversing, and if the [[Domain of a function|___domain]] of {{math|''f''}} is a [[lattice (order)|lattice]], then {{math|''f''}} must be constant.
 
* Every constant function whose [[Domain of a function|___domain]] and [[codomain]] are the same set {{math|''X''}} is a [[left zero]] of the [[full transformation monoid]] on {{math|''X''}}, which implies that it is also [[idempotent]].
In contexts where it is defined, the [[derivative]] of a function measures how that function varies with respect to the variation of some argument. It follows that, since a constant function does not vary, it's derivative(s), where defined, will be zero. Thus for example:
* It has zero [[slope]] or [[gradient]].
* Every constant function between [[topological space]]s is [[continuous function (topology)|continuous]].
* A constant function factors through the [[singleton (mathematics)|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).<ref>{{cite arXiv|last1=Leinster|first1=Tom|title=An informal introduction to topos theory|date=27 Jun 2011|eprint=1012.5647|class=math.CT}}</ref>
* For any non-empty {{math|''X''}}, every set {{math|''Y''}} is [[isomorphic]] to the set of constant functions in <math>X \to Y</math>. For any {{math|''X''}} and each element {{math|''y''}} in {{math|''Y''}}, there is a unique function <math>\tilde{y}: X \to Y</math> such that <math>\tilde{y}(x) = y</math> for all <math>x \in X</math>. Conversely, if a function <math>f: X \to Y</math> satisfies <math>f(x) = f(x')</math> for all <math>x, x' \in X</math>, <math>f</math> is by definition a constant function.
** As a corollary, the one-point set is a [[generator (category theory)|generator]] in the category of sets.
** Every set <math>X</math> is canonically isomorphic to the function set <math>X^1</math>, or [[hom set]] <math>\operatorname{hom}(1,X)</math> 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, <math>\operatorname{hom}(X \times Y, Z) \cong \operatorname{hom}(X(\operatorname{hom}(Y, Z))</math>) 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 <math>\lambda: 1 \times X \cong X \cong X \times 1: \rho</math> [[natural transformation|natural in {{math|''X''}}]], the left and right unitors are the projections <math>p_1</math> and <math>p_2</math> the [[ordered pair]]s <math>(*, x)</math> and <math>(x, *)</math> respectively to the element <math>x</math>, where <math>*</math> is the unique [[point (mathematics)|point]] in the one-point set.
 
InA function on a [[connected set]], the function is [[locally constant]] if and only if it is constant.
*If ''f'' is a [[real number|real-valued]] function of a real [[variable]], defined on some [[interval]], then ''f'' is constant if and only if the [[derivative]] of ''f'' is everywhere zero.
<!--Lfahlberg 01.2014: Perhaps needs information contained in: http://mathworld.wolfram.com/ConstantMap.html, http://www.proofwiki.org/wiki/Definition:Constant_Mapping, http://math.stackexchange.com/questions/133257/show-that-a-constant-mapping-between-metric-spaces-is-continuous and programming http://www.w3schools.com/php/func_misc_constant.asp, http://www2.math.uu.se/research/telecom/software/stcounting.html -->
 
For functions between [[preorder|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 (order)|lattice]], then ''f'' must be constant.
 
Other properties of constant functions include:
* Every constant function whose [[___domain]] and [[codomain]] are the same is [[idempotent]].
* Every constant function between [[topological space]]s is [[continuous function (topology)|continuous]].
 
== References ==
In a [[connected set]], the function is [[locally constant]] if and only if it is constant.
{{reflist}}
* Herrlich, Horst and Strecker, George E., ''Category Theory'', AllenHeldermann andVerlag Bacon, Inc. Boston (19732007).
 
== External links ==
==References==
{{commons category|Constant functions}}
*Herrlich, Horst and Strecker, George E., ''Category Theory'', Allen and Bacon, Inc. Boston (1973)
* {{planetmathMathWorld reference|id=4727|title=Constant functionFunction |id=ConstantFunction}}
* {{planetmath reference |urlname=ConstantFunction |title=Constant function}}
 
{{polynomials}} {{Functions navbox}}
[[Category:Elementary mathematics]]
[[Category:Elementary special functions]]
[[Category:Polynomial functions]]