Functions

When Do We Use Functions?
We use functions whenever one variable depends on another. For example, the cost per product (let’s call it \(y\)) usually varies depending on the quantity produced (denoted as \(x\)). In this scenario, we say that cost is a “function of” quantity. We write this symbolically as:
$$
y = f(x)
$$
We read this as “\(y\) equals \(f\) of \(x\).”
Here, the symbol \(f\) represents the relationship or rule, \(x\) is the independent variable (the input), and \(y\) is the dependent variable (the output).
- Domain: All possible values that \(x\) can take. In our production example, the domain is \(x \geq 0\), because you cannot manufacture a negative quantity of goods.
- Range: All possible values that \(y\) can take. Similarly, the range is likely \(y \geq 0\), as cost cannot be negative.
Defining Functions with Formal Symbols
Let’s refine our understanding using formal mathematical notation. A standard definition found in many calculus textbooks, such as Thomas’ Calculus, offers a precise way to view this relationship:
DEFINITION: A function \(f\) from a set \(D\) to a set \(Y\) is a rule that assigns a unique (single) element \(f(x) \in Y\) to each element \(x \in D\).
(Note: The symbol \(\in\) means “belongs to” or “is an element of.”)
This definition highlights a critical rule: consistency. A function cannot give you two different costs for the exact same production quantity. If you input \(x\), you must get exactly one \(y\).
Understanding Mapping: One-to-One and Onto
Let’s apply this definition to a concrete example to see how inputs map to outputs—and introduce two crucial concepts: One-to-One and Onto.
Assume our Domain is \(D = {a, b, c, d}\) and our target set (called the Codomain) is \(Y = {E, F, G, H}\).
Let’s define a function \(f(x)\) with these mappings:
- \(f(a) = E\)
- \(f(b) = E\)
- \(f(c) = G\)
- \(f(d) = H\)
1. Is this a valid function?
Yes. Every element in the domain (\(a, b, c, d\)) is assigned to a result. It is perfectly acceptable that both \(a\) and \(b\) result in \(E\). In a business context, this is like two different products (\(a\) and \(b\)) having the same price (\(E\)). As long as one product doesn’t have two different prices simultaneously, the function holds.
2. Is this “One-to-One”?
No.
A function is One-to-One (or injective) if every \(x\) has a distinct \(y\). In other words, no two inputs share the same output.
- In our example: Since \(a\) and \(b\) both map to \(E\), this function is not one-to-one.
- Business implication: A Social Security Number system must be one-to-one; two different people cannot share the same ID.
3. Is this “Onto”?
No.
A function is Onto (or surjective) if every element in the target set \(Y\) is used at least once.
- In our example: Look at the set \(Y = {E, F, G, H}\). The value \(F\) is never used as an output. Because \(F\) is “left out,” the function is not onto.
- Business implication: Imagine a warehouse with slots \(E, F, G, H\). If you have no products assigned to slot \(F\), your storage mapping is not “onto”—there is wasted space.
Taking It Further: Composite and Invertible Functions
Now that we understand the basic rules of mapping, we can look at two advanced ways to manipulate these functions: chaining them together (Composition) and reversing them (Inversion).
Composite Functions: The “Chain Reaction”
In business, processes rarely happen in isolation. Usually, the output of one process becomes the input for the next. In mathematics, this chaining of processes is called a Composite Function.
Let \(A, B,\) and \(C\) be sets. If we have a function \(f\) that maps \(A \to B\), and another function \(g\) that maps \(B \to C\), we can combine them.
- We write this as \(g \circ f\) (read as “g composed with f”).
- Mathematically, this is defined as \((g \circ f)(x) = g(f(x))\).
Business Example:
Imagine you are manufacturing a product.
- Function \(f(x)\): Takes “Labor Hours” (\(x\)) and calculates the “Number of Units Produced.”
- Function \(g(u)\): Takes “Units Produced” (\(u\)) and calculates “Total Revenue.”
By composing them into \((g \circ f)(x)\), you create a direct link that calculates Revenue directly from Labor Hours, skipping the middle step in your final calculation.
Invertible Functions: “Reverse Engineering”
Finally, let’s answer a critical question: Can we go backward?
If we know the “Total Cost,” can we calculate exactly how many items were produced? This process is called finding the Inverse Function, denoted as \(f^{-1}\).
A function is said to be invertible if there is a way to reverse the mapping perfectly—meaning if you input the result back into the inverse function, you return to the original starting value.
The Critical Link to One-to-One and Onto:
This is where our previous definitions become vital. A function is invertible if and only if it is both one-to-one and onto.
- Why One-to-One? If your function wasn’t one-to-one (e.g., two different production levels cost the same amount), you wouldn’t know which production level to return to when you reverse the cost.
- Why Onto? If your function wasn’t onto (e.g., there are “impossible” costs that the function never produces), the inverse function would have gaps where it doesn’t work.
The Inverse is Unique
The Intuition: The “Return Ticket” Analogy
Imagine you take a flight from New York (\(A\)) to London (\(B\)). This is function \(f\).
An inverse function \(f^{-1}\) is your return ticket. It must take you from London (\(B\)) back to New York (\(A\)).
If the inverse were not unique, it would mean you have two valid return tickets that take you to different places.
- Ticket 1 takes you back to New York.
- Ticket 2 takes you to… Paris?
If “Ticket 2” takes you to Paris, it didn’t truly reverse your original trip. To be a true inverse, it must undo the action perfectly and bring you back to exactly where you started. Therefore, logically, there can be only one specific return path that creates a perfect loop.
The Formal Proof (optional)
For those interested in the mathematical logic, we can prove this using the properties of function composition.
The Setup:
Let \(f: A \to B\) be an invertible function.
Suppose, for the sake of argument, that \(f\) has two different inverses, let’s call them \(g\) and \(h\). We want to prove that \(g\) and \(h\) are actually the same (\(g = h\)).
Given:
Since \(g\) is an inverse of \(f\):
$$
g(f(x)) = x \quad \text{and} \quad f(g(y)) = y
$$
Since \(h\) is also an inverse of \(f\):
$$
h(f(x)) = x \quad \text{and} \quad f(h(y)) = y
$$
The Proof Steps:
We start with the function \(g\) and use the definition of the “Identity Function” (where \(I(y) = y\)).
- Start with \(g\). We can say \(g = g \circ I_B\) (where \(I_B\) is the identity function on set \(B\)). $$
g = g \circ I_B
$$ - Since \(h\) is an inverse of \(f\), we know that \(f \circ h = I_B\) (composing \(f\) and \(h\) equals the identity). We can substitute this into our equation: $$
g = g \circ (f \circ h)
$$ - Use the Associative Property of functions. We can regroup the parentheses: $$
g = (g \circ f) \circ h
$$ - Look at the first part: \((g \circ f)\). Since \(g\) is an inverse of \(f\), \((g \circ f)\) equals the identity function on set \(A\) (\(I_A\)). $$
g = I_A \circ h
$$ - Anything composed with the identity function is just itself. So: $$
g = h
$$