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.

https://media.geeksforgeeks.org/wp-content/uploads/20231010191233/Constant-Function.png

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\).

  1. Assume \(A\) is the domain. Show there exists some fixed element \(c \in B\) such that for every \(x \in A\), \(f(x) = c\).

  2. Let \(x\) be an arbitrary element in \(A\).

  3. Apply the explicit definition or formula of \(f(x)\).

  4. Demonstrate through algebra or logic that the result simplifies to a fixed value \(c\) that does not depend on \(x\).

  5. 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.

  1. Simplify the expression.

    For any real number \(x\), subtract the floor of \(x\) from the floor of \(x\):

\[f(x) = |x| - |x| = 0\]
Result

For any input \(x\), the output is always \(0\). Thus, \(c = 0\), proving it is a constant function.