Linear function
A linear function y = ax + b draws a straight line. Meet the meaning of the slope and the intercept, the zero, the formula of a line through two points, the general form, and the conditions for parallel and perpendicular lines.
Before you start
This topic builds on earlier ideas. Before you start, it's worth working through the lessons below — they'll make everything click:
- What a function isA function is an unambiguous assignment: every argument gets exactly one value. Meet the f(x) notation, the domain and the range, the four ways to define a function, and the vertical line test on a graph.
- Linear equationsA linear equation is an equality with the unknown in the first power. Learn the operations that keep equations equivalent, solve one step by step, check the result, rearrange a formula to make another quantity its subject, and handle an unknown in a denominator.
Where this is used
Real situations where you count exactly the way this lesson teaches:
- The electricity billA bill comes in two parts: standing charges that do not depend on usage, and a price per kilowatt-hour. With 38 of standing charges and 0.92 per kWh the bill is f(x) = 0.92x + 38, so 210 kWh costs 231.20. The intercept explains the thing that surprises people most: twice the usage is not twice the bill — 420 kWh comes to 424.40, which is 1.84 times as much, not two.
- Calibrating a pressure sensorAn industrial transmitter returns a current of 4 to 20 mA across a range of 0 to 16 bar. The engineer builds the formula from two points: a = (16 − 0)/(20 − 4) = 1 bar per milliamp, and the intercept is set so that 4 mA reads zero, giving p(I) = I − 4. A reading of 12.5 mA is 8.5 bar. Without that line the controller sees a current and knows nothing about what is happening in the pipe.
- Choosing a gym planThe gym offers 149 a month unlimited, or 39 plus 18 per visit. The second offer is the line 18x + 39, the first is the horizontal line 149. They meet where 18x + 39 = 149, that is x = 6.1, so the flat plan starts paying from the seventh visit of the month. The slope says how fast the cost climbs; the crossing point says when the decision flips.
All formulas
Slope–intercept form
a — the slope, b — the intercept
Slope from two points
the rise divided by the run
The zero
where the graph crosses the x-axis
The value at zero
where the graph crosses the y-axis
General form
reducible to the slope–intercept form whenever B ≠ 0
Condition for parallel lines
parallel lines have equal slopes
Condition for perpendicular lines
hence a₂ = −1/a₁
A linear function is a function given by
where and are fixed numbers. Its graph is — always, without exception — a straight line. The number is the slope, the number the intercept.
What a and b mean
Both numbers have a plain meaning, and the graph shows it at once:
- is the starting value: , the height at which the line crosses the -axis;
- is the rate of change: by that much the value grows when the argument grows by one.
The dashed guide on the drawing is exactly how the slope is read off: one right, two up. Hence the other, equally good definition of — the rise divided by the run:
Monotonicity
Whether the function increases is decided by the sign of alone:
- — the function increases, the line rises to the right;
- — the function decreases, the line falls;
- — the function is constant, , a horizontal line.
The intercept has nothing to do with monotonicity — it slides the line up or down without changing how steep it is.
The zero
The zero is the argument whose value is zero, that is the solution of :
When there is no point in using the formula: a constant function either has no zeros at all (for ) or takes the value zero everywhere (for ).
The line through two points
Two points determine exactly one line, so from them the formula can be recovered. First the slope, then the intercept:
The order of subtraction in the numerator and the denominator must be the same — otherwise the sign comes out reversed. If the numerator starts from , the denominator starts from .
The general form
The same set of points can be described by an equation in which does not stand alone on the left:
That is the general form. To read the slope off it, just solve for :
The change is only possible when . The equation describes a vertical line, and such a line — as we know from the vertical line test — is not the graph of any function.
Parallel and perpendicular lines
Only the coefficient carries the steepness of a line, so both conditions on the mutual position of two lines are about it:
The condition gives a handy formula: a line perpendicular to one of slope has slope
the reciprocal with the opposite sign. For that is ; for it is .
Direct proportionality
When the formula collapses to and the graph passes through the origin. The ratio is then constant and equal to — this is direct proportionality.
Distance at a constant speed behaves like that (), and so does the cost of buying at a fixed price per item. When a "joining fee" appears: a subscription added to a bill, the flag-fall of a taxi, the standing charge on an electricity invoice.
Exercises
One session covers everything this lesson teaches: the zero, the slope from two points, the whole formula from two points, the general form turned into the slope–intercept one, and the slope of a perpendicular line. Type a formula in any correct spelling — 2x+1, 1+2x and 2*x+1 all mean the same thing.
Practice
Work through a set of exercises — they get harder as you go. At the end you'll see your score and the mistakes worth reviewing.
Common mistakes
- Swapping and — the steepness is , the crossing with the -axis is .
- The sign of the zero — the formula gives , not .
- Subtracting in opposite orders — numerator and denominator must start from the same point.
- Dividing only one term — when solving for , the whole side of the equation is divided.
- Perpendicularity as a bare reciprocal — the sign has to change too: .
- Calling a vertical line a linear function — is not the graph of a function.
Formula card
Topic: Linear function
Slope–intercept form
a — the slope, b — the intercept
Slope from two points
the rise divided by the run
The zero
where the graph crosses the x-axis
The value at zero
where the graph crosses the y-axis
General form
reducible to the slope–intercept form whenever B ≠ 0
Condition for parallel lines
parallel lines have equal slopes
Condition for perpendicular lines
hence a₂ = −1/a₁
