← All Guides

Linear Equations and Graphs

A linear equation describes a straight-line relationship between two quantities. Understanding how to write, interpret, and graph linear equations is a cornerstone of algebra — and a skill applied in physics, economics, biology, and countless other fields.

What Makes an Equation Linear?

An equation is linear when its variables are raised only to the first power and are not multiplied together. In two variables, x and y, every linear equation produces a straight line when graphed. The standard form is ax + by = c where a, b, and c are constants and at least one of a or b is non-zero.

Non-linear examples (to contrast): y = x² is quadratic (parabola); y = 1/x is hyperbolic. These produce curves, not straight lines.

Slope: The Rate of Change

The slope of a line (usually denoted m) measures how steeply the line rises or falls. It is defined as the ratio of the vertical change to the horizontal change between any two points on the line:

m = (y2 − y1) / (x2 − x1)

A positive slope means the line rises from left to right. A negative slope means it falls. A slope of zero is a horizontal line. An undefined slope (vertical line) occurs when the x-coordinates of two points are the same (division by zero).

Example: Two points are (1, 3) and (4, 9). Slope = (9 − 3) / (4 − 1) = 6 / 3 = 2. The y-value increases by 2 for every 1 unit increase in x.

Slope-Intercept Form

The most commonly used form of a linear equation is slope-intercept form:

y = mx + b

where m is the slope and b is the y-intercept — the value of y when x = 0, i.e., where the line crosses the y-axis.

Example: y = 3x − 5. Slope = 3 (rises 3 units for each 1 unit right). Y-intercept = −5 (the line crosses the y-axis at (0, −5)).

To graph a line in slope-intercept form: plot the y-intercept as your first point, then use the slope to find a second point (rise over run — go up m units and right 1 unit, or adjust if m is a fraction), then draw a straight line through both points.

Point-Slope Form

When you know the slope and one point on the line (but not necessarily the y-intercept), use point-slope form:

y − y1 = m(x − x1)

Example: Write the equation of a line with slope −2 passing through the point (3, 7).
y − 7 = −2(x − 3)
y − 7 = −2x + 6
y = −2x + 13 (now in slope-intercept form)

Finding Intercepts

The x-intercept is where the line crosses the x-axis (y = 0). To find it, substitute y = 0 into the equation and solve for x. The y-intercept is where the line crosses the y-axis (x = 0). To find it, substitute x = 0 and solve for y.

Example: For the line 3x + 2y = 12:
x-intercept: set y = 0 → 3x = 12 → x = 4. Point: (4, 0).
y-intercept: set x = 0 → 2y = 12 → y = 6. Point: (0, 6).
Plot both intercepts and draw a line through them.

Parallel and Perpendicular Lines

Two lines are parallel if they have the same slope and different y-intercepts (they never intersect). Two lines are perpendicular if their slopes are negative reciprocals of each other: if one line has slope m, the perpendicular has slope −1/m. For example, a line with slope 3 is perpendicular to a line with slope −1/3.

Standard Form and Converting Between Forms

Standard form is ax + by = c with a, b, c integers and a ≥ 0. To convert from slope-intercept (y = mx + b) to standard form, move the x term: −mx + y = b, then multiply through by −1 if needed. To convert standard form to slope-intercept, solve for y: y = (−a/b)x + (c/b).

Systems of Two Linear Equations

A system of two linear equations in two variables has a solution at the point where the two lines intersect. There are three possibilities:

  • One solution: the lines intersect at exactly one point (different slopes).
  • No solution: the lines are parallel (same slope, different y-intercepts) — they never meet.
  • Infinitely many solutions: the lines are identical (same slope and same y-intercept).

Two algebraic methods for finding the intersection:

Substitution: Solve one equation for one variable, substitute into the other. For y = 2x + 1 and y = −x + 7: substitute the first into the second: 2x + 1 = −x + 7 → 3x = 6 → x = 2. Then y = 2(2) + 1 = 5. Solution: (2, 5).

Elimination: Add or subtract the equations to eliminate one variable. For 3x + 2y = 16 and x − 2y = 0: add them: 4x = 16 → x = 4. Substitute back: 4 − 2y = 0 → y = 2. Solution: (4, 2).

Real-World Applications

Linear equations model any situation where one quantity changes at a constant rate relative to another. A taxi that charges $3 per km plus a $5 base fare: total cost y = 3x + 5 (slope = cost per km, y-intercept = base fare). A speed–time graph for constant acceleration uses a linear equation; the slope is the acceleration. A supply–demand graph uses two linear equations whose intersection gives the equilibrium price.

Summary

A linear equation in two variables produces a straight line. Slope (m = rise/run) quantifies the line's steepness and direction. Slope-intercept form (y = mx + b) is ideal for graphing; point-slope form (y − y1 = m(x − x1)) is ideal when slope and a point are known; standard form (ax + by = c) is convenient for finding intercepts. Systems of two linear equations are solved by substitution or elimination. Linear equations model constant-rate relationships across science, economics, and everyday life.