Constant#
A constant function is a specific type of function where every input from the domain maps to the exact same single output in the codomain.
Key Characteristics
- Single Output Value
The range contains only one element \(\{c\}\) no matter how large the domain is.
- Independent of Input
The value of the output does not change or depend on the input variable \(x\).
- Many-to-One Mapping
If the domain has more than one element, multiple inputs point to the same single output.
- Not Injective
It fails injectivity unless the domain contains at most one element.
- Polynomial Degree
When dealing with real numbers, it acts as a polynomial of degree zero.
Source: GeeksforGeeks#
How to Prove#
To prove that a function \(f:A→B\) is a constant function, you must show that for all elements \(x\) in the domain \(A\), the output \(f(x)\) equals a single fixed element \(x\) in the codomain \(B\).
Assume \(A\) is the domain. Show there exists some fixed element \(c \in B\) such that for every \(x \in A\), \(f(x) = c\).
Let \(x\) be an arbitrary element in \(A\).
Apply the explicit definition or formula of \(f(x)\).
Demonstrate through algebra or logic that the result simplifies to a fixed value \(c\) that does not depend on \(x\).
State that because \(x\) was arbitrary, \(f(x) = c\) for all \(x \in A\).
Example
Prove that \(f:\mathbb{R} → \mathbb{R}\) defined by \(f(x) = |x| - |x|\) is a constant function.
- Simplify the expression.
For any real number \(x\), subtract the floor of \(x\) from the floor of \(x\):
- Result
For any input \(x\), the output is always \(0\). Thus, \(c = 0\), proving it is a constant function.