The various common forms for the equation of a line are
listed below. In all forms, slope is
represented by m, the x-intercept by a,
and the y-intercept by b.
Note:
The standard
form coefficients A, B,
and C have
no particular graphical significance.
b = y-intercept — the y-coordinate where the line crosses the y-axis
(x1,y1) = A known point on the line
A,B,C = Integer coefficients in standard form, where A is nonnegative and A, B, C are relatively prime
x,y = Coordinates of any point on the line
Worked Example
Problem: Find the equation of the line that passes through the points (1, 2) and (4, 8). Write the answer in slope-intercept form.
Step 1: Calculate the slope using the two points.
m=x2−x1y2−y1=4−18−2=36=2
Step 2: Use point-slope form with the point (1, 2) and slope m = 2.
y−2=2(x−1)
Step 3: Distribute the slope on the right side.
y−2=2x−2
Step 4: Add 2 to both sides to isolate y and obtain slope-intercept form.
y=2x
Answer: The equation of the line is y = 2x (slope-intercept form with m = 2 and b = 0).
Another Example
This example differs by starting with a single point and slope (rather than two points) and converting to standard form instead of slope-intercept form.
Problem: Write the equation of the line with slope −3 that passes through the point (2, 5). Give the answer in standard form.
Step 1: Start with point-slope form using the given point and slope.
y−5=−3(x−2)
Step 2: Distribute the slope on the right side.
y−5=−3x+6
Step 3: Add 3x to both sides to move the x-term to the left.
3x+y−5=6
Step 4: Add 5 to both sides to isolate the constant on the right.
3x+y=11
Answer: The equation in standard form is 3x + y = 11.
Frequently Asked Questions
What is the difference between slope-intercept form and point-slope form?
Slope-intercept form, y = mx + b, directly shows the slope and the y-intercept, making it easy to graph quickly. Point-slope form, y − y₁ = m(x − x₁), is built around a specific point on the line and the slope. Use slope-intercept when you already know the y-intercept; use point-slope when you know the slope and any point that may not be on the y-axis.
How do you find the equation of a line from two points?
First, compute the slope: m = (y₂ − y₁)/(x₂ − x₁). Then substitute m and either point into the point-slope form y − y₁ = m(x − x₁). Finally, simplify into whichever form your problem requires. If the two x-coordinates are equal, the line is vertical and has the equation x = a.
When should you use standard form for a line?
Standard form Ax + By = C is useful when solving systems of equations (since both variables are on the same side), when working with integer coefficients, or when a problem specifically requests it. It also makes it easy to find intercepts: set x = 0 to get the y-intercept and y = 0 to get the x-intercept.
Slope-Intercept Form vs. Point-Slope Form
Slope-Intercept Form
Point-Slope Form
Formula
y = mx + b
y − y₁ = m(x − x₁)
Key information shown
Slope (m) and y-intercept (b)
Slope (m) and one point (x₁, y₁)
Best used when
You know the slope and where the line crosses the y-axis
You know the slope and any point on the line
Ease of graphing
Very easy — plot b, then use m to find a second point
Easy — plot the known point, then use m
Converting between them
Expand point-slope and solve for y
Rearrange slope-intercept using any known point
Why It Matters
The equation of a line is one of the most fundamental concepts in algebra and appears constantly in courses from Algebra I through Calculus. You need it to model real-world relationships such as cost versus quantity, distance versus time, and temperature conversions. It also forms the foundation for topics like systems of equations, linear regression, and the tangent-line approximation in calculus.
Common Mistakes
Mistake: Subtracting coordinates in the wrong order when computing slope, such as computing (y₂ − y₁)/(x₁ − x₂) instead of (y₂ − y₁)/(x₂ − x₁).
Correction: Always subtract in the same order: if you use y₂ − y₁ in the numerator, you must use x₂ − x₁ in the denominator. Swapping the order in only one part flips the sign of the slope.
Mistake: Forgetting to distribute the slope to every term inside the parentheses in point-slope form, for example writing y − 3 = 2x − 1 instead of y − 3 = 2(x − 1) = 2x − 2.
Correction: Multiply the slope by each term inside the parentheses. Here 2(x − 1) = 2x − 2, not 2x − 1.
Related Terms
Slope of a Line — Measures steepness used in every line equation