Linear Equations and Functions

Linear Equations and Functions

Definition: A linear function is a polynomial function of degree 1, written most commonly in slope-intercept form as f(x) = mx + b, whose graph is always a straight line with constant slope m and y-intercept b.

How It Works

  • Slope-intercept form, y = mx + b, is the most common way to write a linear function: m is the slope and b is the y-intercept, the point where the line crosses the y-axis (at x = 0).
  • Slope measures steepness as “rise over run,” m = (y2 - y1) / (x2 - x1) for any two distinct points on the line. Slope is constant everywhere on a line — that constancy is exactly what makes the function linear.
  • A positive slope rises left to right, a negative slope falls left to right, a slope of zero is a perfectly horizontal line, and a vertical line has undefined slope and cannot be written in slope-intercept form at all, since it fails to be a function of x.
  • Point-slope form, y - y1 = m(x - x1), builds a line’s equation from one known point (x1, y1) and the slope m, without needing to already know the y-intercept.
  • Standard form, Ax + By = C, doesn’t isolate y, but makes both intercepts fast to find by setting x = 0 or y = 0 in turn.
  • The y-intercept is simply (0, b) by definition in slope-intercept form; the x-intercept is where the line crosses the x-axis, found by solving 0 = mx + b for x, giving x = -b/m (when m ≠ 0).
  • Parallel lines share exactly the same slope and never meet, unless they are the same line entirely. Perpendicular lines have slopes that are negative reciprocals of each other: m1 × m2 = -1.
  • Solving a linear equation for x means isolating x using inverse operations, adding or subtracting the same value from both sides, then multiplying or dividing both sides by the same nonzero value, always producing at most one solution.
  • A system of linear equations asks where two or more lines intersect at once; graphically that is a single shared point, covered in depth in the dedicated systems note.
  • Linear functions model any process that changes by the same fixed amount for every fixed step of input: constant speed, fixed hourly pay, simple (non-compounding) interest, or steady fuel consumption.

Illustration

x y -10 10 -10 10 y = x

y = 1.00x + 0.00 Y-intercept: (0.00, 0.00) X-intercept: (0.00, 0.00) vs. y = x: identical line

Drag the sliders to change the slope m and y-intercept b. The line, its y-intercept (gold dot) and x-intercept (accent dot), and its relationship to the faint reference line y = x all redraw live.

Under the Hood

Deriving slope-intercept form from the definition of slope, starting from the slope between a fixed point (x1, y1) and any other point (x, y) on the line:

m = (y - y1) / (x - x1)              definition of slope between (x1,y1) and (x,y)
y - y1 = m(x - x1)                    multiply both sides by (x - x1); this is point-slope form
y = mx - m·x1 + y1                    distribute m, isolate y
y = mx + (y1 - m·x1)                  group the constant terms
y = mx + b                            where b = y1 - m·x1, the y-intercept
  • Point-slope form and slope-intercept form describe the exact same line; slope-intercept form is just point-slope form evaluated at the specific point (0, b).

Worked Example 1: Writing an equation from two points. Given: a line passes through (1, 4) and (3, 10). Step 1: slope m = (10 - 4) / (3 - 1) = 6/2 = 3. Step 2: use point-slope form with (1, 4): y - 4 = 3(x - 1). Step 3: distribute and isolate y: y = 3x - 3 + 4 = 3x + 1. Answer: y = 3x + 1 (check: at x = 3, y = 3(3) + 1 = 10, matching the second point).

Worked Example 2: Finding both intercepts from standard form. Given: 2x + 3y = 12. Step 1: x-intercept — set y = 0: 2x = 12, so x = 6, giving (6, 0). Step 2: y-intercept — set x = 0: 3y = 12, so y = 4, giving (0, 4). Answer: the line crosses the axes at (6, 0) and (0, 4); rearranged into slope-intercept form it is y = -(2/3)x + 4, so the slope -A/B = -2/3 matches directly.

Worked Example 3: Parallel and perpendicular lines through a point. Given: find the line through (2, -1) that is (a) parallel to, and (b) perpendicular to, y = 4x + 5. Step 1: the reference line has slope 4. Step 2 (parallel, same slope m = 4): y - (-1) = 4(x - 2), so y = 4x - 8 - 1 = 4x - 9. Step 3 (perpendicular, negative reciprocal m = -1/4): y - (-1) = -1/4(x - 2), so y = -1/4x + 1/2 - 1 = -1/4x - 1/2. Answer: parallel line y = 4x - 9; perpendicular line y = -1/4x - 1/2 (both pass through (2, -1); check the parallel line: 4(2) - 9 = -1).

History

  • René Descartes introduced the coordinate plane in 1637, in an appendix to his Discourse on Method, giving algebra a geometric picture for the first time and making it possible to “graph” an equation at all.
  • Centuries earlier, the French scholar Nicole Oresme (14th century) plotted quantities like velocity against time using perpendicular reference lines, an early ancestor of graphing that predates Descartes by roughly 300 years.
  • Writing a line’s equation as y = mx + b is a teaching convention, not a universal mathematical law; other countries commonly use different letters, such as y = mx + c in the United Kingdom.
  • The origin of “m” for slope is genuinely uncertain. A popular claim ties it to the French verb monter (“to climb”), but historians of mathematics treat this as unverified folk etymology rather than documented fact.
  • The word “slope” entered mathematical English in the 19th century, borrowed from its everyday use describing the steepness of physical terrain.
  • Standardized American algebra textbooks had settled on slope-intercept form as the default way to introduce linear functions by the early 20th century, cementing y = mx + b as the form most students meet first.

Why It Matters

  • Constant-rate relationships are everywhere: hourly wages, fixed monthly costs, unit conversions, and travel at constant speed are all linear functions in disguise.
  • Linear regression, one of the most widely used tools in statistics and machine learning, fits a straight line through scattered data specifically to estimate the rate of change (the slope) between two variables.
  • Financial planning uses linear models for simple interest, straight-line depreciation of assets, and break-even analysis, where the point a cost line crosses a revenue line tells a business exactly how many units it must sell to stop losing money.
  • Slope is read everywhere as an instantaneous rate: a distance-time graph’s slope is speed, a velocity-time graph’s slope is acceleration, and a demand curve’s slope shows how sensitive quantity is to price.
  • Perpendicularity of slopes underlies constructing exact right angles in fields like construction, CAD software, and computer graphics.
  • Linear functions are the simplest, most stable building block for approximating curved relationships over short intervals, the entire basis for how calculus defines a derivative as a local linear approximation.

Common Pitfalls

  • Writing a vertical line’s equation in slope-intercept form. Vertical lines (x = k) have undefined slope and simply cannot be written as y = mx + b; they need the special form x = k.
  • Confusing “no slope” with “zero slope.” A slope of zero is a perfectly valid horizontal line; an undefined slope is a vertical line where rise-over-run divides by zero. The two are opposites, not synonyms.
  • Assuming perpendicular slopes always satisfy m1 × m2 = -1 without exception. That rule assumes both lines have a defined, nonzero slope; a horizontal line and a vertical line are also perpendicular to each other, just not through that formula.
  • Mixing up point-slope form’s sign: a point like (3, -2) plugs in as y - (-2) = m(x - 3), which becomes y + 2 = m(x - 3). Dropping the negative sign is a common arithmetic slip.
  • Reading the coefficients of standard form (Ax + By = C) as if they were the slope and intercept directly. The slope is -A/B, not A, and the y-intercept is C/B, not C.
  • Forgetting that slope is a ratio, not a pair of numbers: a “rise of 6, run of 2” is the same slope as a “rise of 3, run of 1.” Failing to simplify can make two identical slopes look different.

Comparison

FormEquationBest WhenGives Directly
Slope-intercepty = mx + bYou know the slope and y-intercept, or need to graph quicklySlope (m) and y-intercept (b)
Point-slopey - y1 = m(x - x1)You know one point and the slope, but not the y-interceptSlope (m) and one known point
Standard formAx + By = CYou need both intercepts quickly, or are combining equations in a systemx-intercept (C/A) and y-intercept (C/B)

FAQ

Why is a horizontal line’s slope zero but a vertical line’s slope undefined, instead of both being some kind of infinity? Slope is rise over run. A horizontal line has zero rise for any run, and 0 divided by any nonzero number is 0. A vertical line has zero run for any rise, and dividing by zero is undefined in ordinary arithmetic, so “undefined” is the mathematically honest answer, not “infinite.”

Do two parallel lines ever share the same y-intercept? Only if they are actually the same line. Two distinct parallel lines share a slope but must have different y-intercepts; if both the slope and the y-intercept matched, they would be one identical line, not two parallel ones.

Can a linear equation have more than one solution for x? A single linear equation in one variable, like 3x + 5 = 11, has exactly one solution unless the variable cancels out entirely. If it cancels into a true statement (2x + 2 = 2x + 2), every x works; if it cancels into a false statement (2x + 2 = 2x + 5), no x works.

Example

A rideshare fare of 2.50plus2.50 plus 1.75 per mile is a linear function, cost = 1.75x + 2.50, where x is the number of miles, the slope 1.75 is the per-mile rate, and the y-intercept 2.50 is the flat pickup fee charged even for a zero-mile trip; a 6-mile trip costs 1.75(6) + 2.50 = $13.00 by the exact same formula used throughout this note.

Dig deeper