Defining Linear Functions
@BootstrapWorld
Defining Linear Functions
A function definition is a way of summarizing a relationship. You've seen how a linear relationship can be expressed as a table or graph. But what do these kinds of relationships look like as a definition?
Linear functions are defined by their slope and y-intercept.
Defining Linear Functions
Here we see a function definition written using pyret notation and using function notation.
The slope-intercept form of the line includes the slope as the coefficient of x and the y-intercept as the numerical term. You will hear people describe this form as y = mx + b, where m stands for slope and b stands for the y-intercept.
Defining Linear Functions
While it is common to write the x-term first and the y-intercept second, they can be written in any order!
Function Notation | Pyret Code |
f(x) = 6x - 10 | fun f(x): (6 * x) - 10 end |
f(x) = -10 + 6x | fun f(x): -10 + (6 * x) end |
Defining Linear Functions
When the slope is zero (and the line is horizontal)... we may choose whether or not to write the slope term.
"Visible" Slope | "Invisible" Slope |
f(x) = 0x + 22 | f(x) = 22 |
Defining Linear Functions
When the y-intercept is 0 (and the line crosses the y-axis at the origin)... we may choose whether or not to write the slope term.
"Visible" y-intercept | "Invisible" y-intercept |
f(x) = 3.2x + 0 | f(x) = 3.2x |
Defining Linear Functions
To check our work, we can apply the function to the x-value in each Row in the table, it produces the y-value! Instead of writing endless rows repeating the rule or drawing an entire graph, we can just declare the rule itself by defining the function.
As with tables and graphs, a function definition can also reveal whether or not the function is linear. Functions that are not linear will follow other forms, for example they may include exponents or absolute values.
Defining Linear Functions
Let's start by identifying the slope and y-intercept from function definitions.
For more practice:
Defining Linear Functions
Let's connect definitions to tables and graphs. Writing down the slope and y-intercept beneath each representation will help!
For more practice:
What strategies did you use?
Defining Linear Functions
Let's write our own definitions from tables and graphs!
What strategies did you use?
Defining Linear Functions
Let's connect all three function representations!
What strategies did you use?
Defining Linear Functions
Function definitions are a way of talking about relationships between quantities: milk costs $0.59/gallon, a stone falls at 9.8m/s2, or there are 30 students for every teacher at a school.
If we can figure out the relationship between a small sample of data, we can make predictions about what happens next. We can see these relationships as tables, graphs, or symbols in a definition. We can even think about them as a mapping between Domain and Range!
When we talk about functions, it's helpful to be able to switch between representations, and see the connections between them.
Defining Linear Functions