At this point, we know how to evaluate functions in function notation, but sometimes you will need to be able to write the function in the first place. To do this, we will need information, which is usually provided by an illustration or a scenario.
Illustration: Ordered pairs, mapping diagrams, tables, and graphs can all be used to supply data. In the example below, we are given a data table, and we need to determine a relationship between the x- and y-values so that we can write an equation. To determine the relationship, decide how you got from an x-value to its corresponding y-value. The first one went from 1 to 3. How could you go from 1 to 3 mathematically? You could either add 2 or multiply by 3. Which one of those (+2 or x3) works for all the other values? In this example, we can take any of the x-values and multiply them by 3 to get the corresponding y-value. This can be expressed as an equation: y=3x
Scenario: Sometimes we are given a situation, and we need to express it in function notation. Consider the following scenario: "A math tutor charges $35 per hour." To write this in function notation, it's helpful to first identify the independent and dependent variables. The amount the tutor charges depends on the number of hours. So the amount is the dependent variable, and the hours is the independent variable. Let's have h represent the number of hours for tutoring. So, in function notation, this would be f(h) = 35h.