What is a Linear Function Grapher?
This calculator graphs y = ax + b and computes the slope, y-intercept, and intersection points.
How it's calculated
y = ax + b (a: slope, b: y-intercept)
Slope a = (yโโyโ) รท (xโโxโ)
Step-by-step example
Finding the line through points (1,3) and (4,9)
- Step 1 Calculate the slope: a = (9โ3)รท(4โ1) = 6รท3 = 2
- Step 2 Substitute point (1,3) to find the intercept: 3 = 2ร1 + b โ b = 1
- Step 3 Final equation: y = 2x + 1
Interpretation: For every 1-unit increase in x, y increases by 2.
Slope is a 'rate of change'
The value a tells you how much y changes for every 1-unit increase in x. This shows up constantly in real life: a taxi fare (base fare + per-distance rate), a phone plan (base fee + usage rate) โ all linear functions. Comparing two pricing plans is literally the problem of finding where two lines intersect.
Good to know
- A negative slope means decreasing; zero slope means horizontal. A vertical line (x = k) has undefined slope and technically isn't a function โ one x-value would correspond to infinitely many y-values.
- Parallel lines share the same slope; perpendicular lines have slopes that multiply to โ1.
- Linear regression in data analysis is fundamentally 'find the line that best fits these points' โ arguably the simplest form of machine learning.
- Many real-world relationships look approximately linear if you zoom in close enough on a small enough range โ which is essentially the core insight behind calculus.
- The coordinate plane was invented by Descartes, reportedly while watching a fly on his ceiling and realizing its position could be described with just two numbers โ a decisive link between geometry and algebra.
Frequently asked questions
Q. What does a slope of 0 look like?
A horizontal line โ y stays constant no matter how x changes.
Q. How do I find where two lines intersect?
Solve the two equations simultaneously. If the slopes are equal, the lines are parallel and never intersect.
Q. Is x = 3 a linear function?
No. A vertical line fails the definition of a function.