In mathematics, a function represents a relationship where each input has a unique output. Let's look at two real-life situations that illustrate functions, including one that shows a piece-wise function.
Linear Function: Pay Based on Hours Worked
Imagine a part-time job at a coffee shop where employees are paid hourly. If an employee earns $10 per hour, the total pay () depends on the number of hours (h) worked. This scenario represents a linear function, which can be expressed as:
f ( h ) = 10 h
Here, every additional hour worked increases the total pay by $10, and each input (hours) has exactly one output (total pay).
Piece-wise Function: Subscription Pricing Model
Consider a gym membership where the monthly price depends on the type of membership chosen. The gym offers the following pricing model:
Basic membership: $30 per month
Premium membership: $50 per month
Student membership: $20 per month
This scenario can be represented as a piece-wise function, where different conditions result in different outputs. We can write this as:
[f(m) =
\begin{cases} 30, & \text{if } m = \text{Basic} \
50, & \text{if } m = \text{Premium} \
20, & \text{if } m = \text{Student} \end{cases}]
Here, "\text{m}" is the type of membership chosen, and each input (membership type) yields a specific, unique monthly price.
Both examples demonstrate functions where a specific input uniquely determines an output. The piece-wise function further illustrates how different rules can apply based on conditions within one function.