A linear equation describes a straight line. That straight line might predict your savings over time, the cost of a phone plan based on minutes used, or the temperature change in a chemistry experiment. Linear equations are the workhorses of algebra because they show up in almost every real-world model. This guide walks you through what a linear equation is, the three main forms it can take, how to solve one, and the common patterns that trip students up.
A linear equation is one in which the variable (usually x) appears only to the first power — never squared, cubed, or under a square root. When you graph a linear equation, the result is always a straight line. The simplest examples are x + 3 = 7 or 2y − 4 = 10. The more interesting examples have two variables: y = 2x + 5, which describes every point (x, y) on a particular line in the coordinate plane.
In y = mx + b:
Slope is rise over run — how much y changes for every 1 unit that x changes. A slope of 2 means the line goes up 2 for every 1 to the right. A slope of −3 means it goes down 3 for every 1 to the right.
The same line can be written in three different forms, each useful for a different task:
| Form | Looks Like | When to Use |
|---|---|---|
| Slope-Intercept | y = mx + b | Graphing quickly when you know slope and y-intercept |
| Point-Slope | y − y₁ = m(x − x₁) | Writing the equation when you know one point and the slope |
| Standard | Ax + By = C | Working with x- and y-intercepts; cleaner for systems of equations |
If you know any two points on a line, you can find the slope using the slope formula. Let the points be (x₁, y₁) and (x₂, y₂):
Once you have a slope and a point (or the y-intercept), you can write the equation of the line in any form. The slope-intercept form is usually fastest.
To solve a one-variable linear equation, isolate the variable using inverse operations. The strategy is the same as the one taught in our algebra guide: undo any addition or subtraction first, then undo any multiplication or division.
Not every line fits neatly into y = mx + b. Two special cases need their own rules.
A positive slope tilts up to the right. A negative slope tilts down to the right. Many students reverse these. Picture a hill going up as you walk right — that is positive slope.
The formula is (y₂ − y₁) ÷ (x₂ − x₁). Whatever you label as "point 2" in the numerator must also be "point 2" in the denominator. Mixing them up flips the sign of your slope.
Slope is undefined for vertical lines because division by zero is undefined. Be careful when a problem asks for the slope of x = 5 — the answer is "undefined," not 0.
The y-intercept is the y-value when x = 0, not the y-coordinate of any random point on the line. In y = 3x + 7, the y-intercept is 7, not 3.
Linear equations describe nearly any situation where one quantity changes at a constant rate. A few quick examples:
Even when a problem only asks for the equation, drawing a quick sketch of the line catches errors. If your equation says the slope is positive but your sketch shows the line falling, something is wrong. Two minutes of sketching saves twenty minutes of debugging.
They are mostly the same thing, written differently. A linear equation like y = 2x + 5 becomes a linear function when written f(x) = 2x + 5. The function notation emphasizes that for every x you put in, the formula gives back exactly one y. Linear functions are linear equations, just dressed up for function notation.
Yes — an equation like 3x + 2y − z = 12 is linear in three variables (x, y, z). Each variable appears only to the first power. These describe flat surfaces in 3D space (called planes) instead of lines. The same algebraic techniques work.
Parallel lines have the same slope. y = 2x + 1 and y = 2x − 7 are parallel — both rise 2 for every 1 right. Perpendicular lines have slopes that are negative reciprocals: if one is 3, the other is −1/3. Their slopes multiply to −1.
It just means the line is less steep than slope 1 (or has a more precise rise/run). A slope of 1/2 means the line rises 1 for every 2 to the right. A slope of 3/4 means it rises 3 for every 4 to the right. Fractional slopes are perfectly normal and very common.
A system of equations is just two or more linear equations considered together. The solution is the point where the lines cross — the (x, y) values that satisfy both equations at once. Mastering single linear equations is essential before tackling systems.
Single-variable linear equations begin in 6th or 7th grade. Lines, slopes, and y-intercepts come in 8th grade pre-algebra. Algebra 1 (typically 8th or 9th grade) covers everything on this page in depth. Algebra 2 revisits linear equations to set up matrices and systems.
Ready to practice linear equations?
Practice Linear Equations Now →