What is a Function? Mapping Inputs to Outputs

Category: Foundational Algebra & Set Mapping

1. The Mathematical Machine

In algebra, a function is a strict relation that assigns each input value from a set called the Domain to exactly one unique output value in a set called the Codomain (or Range). You can think of a function like a computer program or a machine: you feed it a raw parameter x, it executes a specific arithmetic rule, and it spits out a predictable output f(x).

2. The Vertical Line Test

Not every mathematical equation or graph qualifies as a function. The absolute rule of functions states that one input cannot lead to multiple different outputs. To test a graph visually, we utilize the Vertical Line Test: if you can draw a vertical line anywhere through a graph and intersect the curve more than once, the relation fails to be a function (like the equation of a circle).

3. Mathematical Proof of Composition Invariance

When you feed the output of one function directly into another, you perform a Composition of Functions, written as (g ∘ f)(x) = g(f(x)). Let us prove mathematically that function compositions are generally non-commutative, meaning that the sequential order of operations fundamentally changes the final output.

Let f(x) = x² and g(x) = 2x + 3

Step 1: Compute the composed function (g ∘ f)(x), which means plugging f(x) inside g:
(g ∘ f)(x) = g( f(x) )
Substitute f(x): g( x² )
Apply the rule for g(x): 2(x²) + 3 = 2x² + 3

Step 2: Compute the reversed composed function (f ∘ g)(x), plugging g(x) inside f:
(f ∘ g)(x) = f( g(x) )
Substitute g(x): f( 2x + 3 )
Apply the rule for f(x): (2x + 3)²

Step 3: Expand the binomial squaring operation:
(2x + 3)(2x + 3) = 4x² + 6x + 6x + 9 = 4x² + 12x + 9

Conclusion: Compare the two results:
2x² + 3 ≠ 4x² + 12x + 9
Therefore, (g ∘ f)(x) ≠ (f ∘ g)(x).

This algebraic proof reveals why order of execution matters. This is a crucial concept for video game programming, where tracking whether you multiply a player's speed before or after applying a slowdown debuff completely changes the player's movement physics.

Ready for the Next Level?

Now that you understand standard algebraic input mapping, you are ready to see how functions behave when inputs get infinitely close to a value. Check out our entry on Limits to Infinity and Mathematical Continuity!

← Back to Wiki Index