8.25 min read
Constant Functions
The simplest scalar-valued function is a constant function: it outputs the same number regardless of the input . Written as for all . The graph of a constant function is a flat horizontal hyperplane at height .
Constant functions are degree 0 — no variables appear at all. They serve as the baseline case when classifying functions by their polynomial degree. A function that looks like is constant; a function like is not, because it changes as changes.
Formal View
Definition 8.2 — Constant Function
A function is constant if there exists such that for all . It has polynomial degree 0.
Why This Matters
Constant functions appear as trivial edge cases in classification theorems and as offsets in affine functions.
- A constant bias term in a neural network layer: has both a linear part and a constant part.
- Regularization penalties that add a fixed constant to a loss function.
- Lower bounds in optimization: proving a cost function is at least everywhere.
Quiz
Question 1
The function is a constant function on .
Question 2
What is the polynomial degree of a constant function?
Common Mistakes
- Calling a "constant" function — only the part is constant; the function itself varies with .
- Confusing a constant function with a zero function — a constant function outputs which may be nonzero, while the zero function outputs 0.