This browser is too old to run Achievable.

Update it, or open this page in a current version of Chrome, Safari, Firefox or Edge. On an iPhone or iPad, update iOS: every browser there runs on the version of Safari that comes with it.

Achievable logoAchievable logo
ASVAB
Sign in
Sign up
Purchase
Textbook
Practice exams
Support
How it works
Resources
Exam catalog
Mountain with a flag at the peak
Textbook
Introduction
1. Word Knowledge
2. Mathematics Knowledge
2.1 Foundational math
2.2 Pre-algebra
2.3 Algebra I
2.4 Geometry basics
2.5 Algebra II
2.6 Advanced geometry
2.6.1 Equations of lines and slope
2.6.2 Right triangles and similar triangles
2.6.3 Distance and circles
2.6.4 Radians and measurement applications
2.7 Math strategies
3. Paragraph Comprehension
4. Arithmetic Reasoning
5. General Science
6. Mechanical Comprehension
7. Electronics Information
8. Shop Information
9. Auto Information
10. Assembling Objects
Wrapping up
Achievable logoAchievable logo
2.6.1 Equations of lines and slope
Achievable ASVAB
2. Mathematics Knowledge
2.6. Advanced geometry

Equations of lines and slope

4 min read
Font
Discuss
Share
Feedback

Finding equations of lines

An equation of a line describes all the points that lie on that line. One of the most common ways to write this equation is in slope-intercept form, which shows both the slope and where the line crosses the y-axis.

y=mx+b

This equation describes all coordinate points (x,y) that lie on the line. Here’s what each part means:

  • x and y form any coordinate point on the line
  • m is the slope of the line (slope = rise/run, covered in the next section)
  • b is the y-intercept, where the line crosses the y-axis

So if we have the line y=2x−4, then:

  • The slope is 2 (or 12​)
  • The y-intercept is b=−4, so the line crosses the y-axis at (0,−4).
The line y = 2x − 4 on a coordinate plane, rising from left to right, crossing the y-axis at (0, −4) and the x-axis at (2, 0).
y=2x-4
Achievable

If an equation isn’t solved for y, like 2x+3y=6, rewrite it: 3y=−2x+6, so y=−32​x+2, giving m=−32​ and b=2.

Slope

The slope of a line tells you how steep the line is and in which direction it moves as you go from left to right. Slope is rise over run: how much y changes for each 1-unit change in x. Given two points on a line, you can find the slope using the slope formula:

m=x2​−x1​y2​−y1​​

Subtract in the same order top and bottom: if y2​ is first in the numerator, x2​ must be first in the denominator.

A positive slope rises and a negative slope falls as you move left to right. A slope of 0 means a horizontal line (y=c), while a vertical line (x=c) has an undefined slope. Parallel lines have equal slopes; perpendicular lines have slopes that are negative reciprocals of each other (like 2 and −21​).

Let’s solve this example step-by-step!

Example:

Suppose you want the equation of the line that passes through the points (−2,7) and (4,1).

Step 1: find the slope. Start with the slope formula and substitute the two points. Keep the same point order in the numerator and denominator; subtracting a negative means adding, so 4−(−2)=6.

mmmm​=x2​−x1​y2​−y1​​=4−(−2)1−7​=6−6​=−1​

Step 2: substitute the slope into y=mx+b.

y=−1x+b

Step 3: use a point to solve for b. Any point on the line will satisfy the equation. Using (−2,7):

775​=−1(−2)+b=2+b=b​

So the final equation of the line is:

y=−x+5

Knowledge check

What is the equation for the line that passes through points (−1,−1) and (3,15)?

A. y=2x−6
B. y=−2x+4
C. y=−4x−2
D. y=4x+3

(spoiler)

Step 1: m=3−(−1)15−(−1)​=4; Step 2: −1=4(−1)+b gives b=3.

Answer: D. y=4x+3

Slope-intercept form

  • Equation of a line: y=mx+b
  • m = slope (steepness/direction), b = y-intercept (where line crosses y-axis)
  • If not solved for y, isolate y first (e.g., 2x+3y=6 → y=−32​x+2)

Slope

  • Slope = rise/run = change in y per 1-unit change in x
  • Slope formula: m=x2​−x1​y2​−y1​​
    • Must subtract coordinates in matching order (same point first in both numerator and denominator)
  • Positive slope rises left-to-right; negative slope falls
  • Horizontal line (y=c): slope = 0; vertical line (x=c): slope undefined
  • Parallel lines: equal slopes; perpendicular lines: slopes are negative reciprocals (e.g., 2 and −21​)

Finding a line’s equation from two points

  • Step 1: compute slope m using the slope formula with the two given points
  • Step 2: plug m into y=mx+b
  • Step 3: substitute one known point’s coordinates to solve for b
  • Combine results into final equation y=mx+b

Sign up for free to take 9 quiz questions on this topic

Previous
Next  | 2.6.2 Right triangles and similar triangles
All rights reserved ©2016 - 2026 Achievable, Inc.

Equations of lines and slope

Finding equations of lines

An equation of a line describes all the points that lie on that line. One of the most common ways to write this equation is in slope-intercept form, which shows both the slope and where the line crosses the y-axis.

y=mx+b

This equation describes all coordinate points (x,y) that lie on the line. Here’s what each part means:

  • x and y form any coordinate point on the line
  • m is the slope of the line (slope = rise/run, covered in the next section)
  • b is the y-intercept, where the line crosses the y-axis

So if we have the line y=2x−4, then:

  • The slope is 2 (or 12​)
  • The y-intercept is b=−4, so the line crosses the y-axis at (0,−4).

If an equation isn’t solved for y, like 2x+3y=6, rewrite it: 3y=−2x+6, so y=−32​x+2, giving m=−32​ and b=2.

Slope

The slope of a line tells you how steep the line is and in which direction it moves as you go from left to right. Slope is rise over run: how much y changes for each 1-unit change in x. Given two points on a line, you can find the slope using the slope formula:

m=x2​−x1​y2​−y1​​

Subtract in the same order top and bottom: if y2​ is first in the numerator, x2​ must be first in the denominator.

A positive slope rises and a negative slope falls as you move left to right. A slope of 0 means a horizontal line (y=c), while a vertical line (x=c) has an undefined slope. Parallel lines have equal slopes; perpendicular lines have slopes that are negative reciprocals of each other (like 2 and −21​).

Let’s solve this example step-by-step!

Example:

Suppose you want the equation of the line that passes through the points (−2,7) and (4,1).

Step 1: find the slope. Start with the slope formula and substitute the two points. Keep the same point order in the numerator and denominator; subtracting a negative means adding, so 4−(−2)=6.

mmmm​=x2​−x1​y2​−y1​​=4−(−2)1−7​=6−6​=−1​

Step 2: substitute the slope into y=mx+b.

y=−1x+b

Step 3: use a point to solve for b. Any point on the line will satisfy the equation. Using (−2,7):

775​=−1(−2)+b=2+b=b​

So the final equation of the line is:

y=−x+5

Knowledge check

What is the equation for the line that passes through points (−1,−1) and (3,15)?

A. y=2x−6
B. y=−2x+4
C. y=−4x−2
D. y=4x+3

(spoiler)

Step 1: m=3−(−1)15−(−1)​=4; Step 2: −1=4(−1)+b gives b=3.

Answer: D. y=4x+3

Key points

Slope-intercept form

  • Equation of a line: y=mx+b
  • m = slope (steepness/direction), b = y-intercept (where line crosses y-axis)
  • If not solved for y, isolate y first (e.g., 2x+3y=6 → y=−32​x+2)

Slope

  • Slope = rise/run = change in y per 1-unit change in x
  • Slope formula: m=x2​−x1​y2​−y1​​
    • Must subtract coordinates in matching order (same point first in both numerator and denominator)
  • Positive slope rises left-to-right; negative slope falls
  • Horizontal line (y=c): slope = 0; vertical line (x=c): slope undefined
  • Parallel lines: equal slopes; perpendicular lines: slopes are negative reciprocals (e.g., 2 and −21​)

Finding a line’s equation from two points

  • Step 1: compute slope m using the slope formula with the two given points
  • Step 2: plug m into y=mx+b
  • Step 3: substitute one known point’s coordinates to solve for b
  • Combine results into final equation y=mx+b

More from Advanced geometry

  • Right triangles and similar triangles
  • Distance and circles
  • Radians and measurement applications