1. What a Constant Function Means
A constant function is a function where every input gives the same output. No matter what value you plug in, the result does not change.
The output is a fixed number (or fixed element) throughout.
2. Formal Definition
If f: A → B is a constant function, there exists a single element c in B such that:
2.1. Definition
f(a) = c \quad \text{for all } a \in A
3. Examples of Constant Functions
Here are some common examples:
3.1. Example 1
f(x) = 5 for all real x
No matter the input, the output is always 5.
3.2. Example 2
f(x) = -2
Outputs remain fixed at -2.
3.3. Example 3 (Ordered Pairs)
f = \{(1,4),(2,4),(3,4),(7,4)\}
Every input maps to 4 → constant.
4. Graph of a Constant Function
The graph of a constant function is a horizontal line because the y-value stays the same regardless of x.
4.1. Illustration
f(x) = c
The graph is y = c, a perfectly horizontal line.
5. Is a Constant Function One-One?
No. Because every input shares the same output, a constant function is never one-one unless the domain has just a single element.
6. Is a Constant Function Onto?
It depends on the codomain. A constant function is onto only if the codomain is the single value the function outputs.
6.1. Example
If the codomain is {5}, then f(x)=5 is onto. But if the codomain is {1,5}, then output 1 is missing → not onto.
7. Why Constant Functions Are Useful
Constant functions appear in piecewise definitions, step functions, and many situations where an output does not depend on the input. They also help illustrate why certain properties, like injectivity, fail.