Grade 8
Functions and their graphs
The correspondence between inputs and outputs, and its visual representation as a graph.
IntuitionA Machine That Turns Inputs Into Outputs
Picture a vending machine: you put in a code (the input), and out comes exactly one snack (the output) — never two different snacks for the same code. A function is the mathematical version of this idea: a rule that assigns to each input exactly one output, written . For instance the rule "double the input, then subtract one" is the function : feeding in produces , and feeding in the same again always produces the same — that reliability is exactly what makes it a function.
SchoolDomain, Graph, and the Linear Function
Definition: Graph of a function
The graph of a function is the set of every point obtained by letting range over all valid inputs (the domain). Plotting these points in the coordinate plane turns the abstract rule into a picture we can read at a glance.
A linear function has the form where is the slope (rate of change of per unit of ) and is the -intercept. Its graph is always a straight (non-vertical) line, and conversely every non-vertical straight line is the graph of exactly one linear function — a fact we prove below.
| Sign of in | Behavior as increases |
|---|---|
| increases (line rises) | |
| decreases (line falls) | |
| stays constant |
UndergraduateTwo Fundamental Theorems
A curve in the coordinate plane is the graph of some function of if and only if every vertical line meets in at most one point.
Why is it true?
A function assigns exactly one output to each input, so a graph that hits a given vertical line twice would be assigning two different values to the same , breaking the "exactly one output" rule.
Proof
() Suppose is the graph of a function , so every point of has the form for some input . Fix any vertical line ; the only points of that can lie on it are those with first coordinate , and there is only one such point, , because assigns a single value to . So the line meets in at most one point.
() Conversely, suppose every vertical line meets in at most one point. Define by: for each that has a point of above it, let be the -coordinate of that (unique, by hypothesis) point. This assigns at most one output to each input, so is a well-defined function, and by construction its graph is exactly .
The two directions together show the equivalence: being a function's graph and passing the vertical line test are the same property viewed from two angles.
Let be any two inputs of the linear function , with outputs and . Then the slope computed between any two points of the graph is always the same constant :
Why is it true?
A constant slope between every pair of points is exactly the geometric definition of "straight" — the direction never bends.
Proof
Compute the rise and run between the two points on the graph: rise , using the fact that both points satisfy the same rule .
Since , we may divide both sides by the run :
This computation used only the values and the rule , and the term canceled out completely — so the ratio equals regardless of which two points were chosen. A curve on which the slope between every pair of points is the same fixed number is, by the geometric definition of straightness, a line; hence the graph of is a straight line of slope .
Conversely, given any non-vertical line with slope passing through a point , setting produces a linear function whose graph is exactly that line, which establishes the converse direction of the correspondence between linear functions and non-vertical lines.
UndergraduateReal-World Applications and Worked Examples
Functions and their graphs are the shared visual language of physics (distance vs. time), economics (cost vs. quantity), and computer science (input vs. output of a program): whenever one quantity is completely determined by another, a graph turns a table of numbers into a shape the eye can reason about instantly — reading off a maximum, a break-even point, or a trend at a glance.
Example: Distance traveled by a car
A car travels at a constant km/h, so the distance covered after hours is . Sketch what the graph looks like and find the distance after hours.
Solution
The rule is a linear function of with slope and intercept (no head start), so by the theorem above its graph is a straight line through the origin.
Because , the line rises as increases: the car never travels backward in this model, matching the physical picture of constant forward speed.
Substituting : km. Reading this off the graph would mean finding the height of the line directly above on the horizontal axis.
Example: Break-even point of a small business
A small workshop has a fixed cost of (rent, equipment) plus a variable cost of per item produced, so total cost is . Each item sells for , so revenue is . Find the break-even quantity , where cost equals revenue.
Solution
Both and are linear functions of , so by the straight-line theorem their graphs are two lines; the break-even point is where they intersect, i.e. where .
Set the two expressions equal: . Subtract from both sides: .
Divide both sides by : . Since the workshop can only produce a whole number of items, it needs to produce and sell items to guarantee a profit.
Graphically, for the cost line lies above the revenue line (the business loses money), and for revenue overtakes cost (the business is profitable) — the crossing point is exactly the break-even quantity.
For the function , what is the output when ?
Which relation is NOT a function, according to the vertical line test?
A car travels at constant speed so (distance in km, in hours). How far has it gone after hours?
In the workshop example with cost and revenue , at the break-even quantity, which statement is true?