Q. how to find y-intercept with two points

Answer

Given points \((x_1,y_1)\) and \((x_2,y_2)\) with \(x_1 \ne x_2\):

\[
m = \frac{y_2-y_1}{x_2-x_1}
\]

\[
b = y_1 – m x_1 = \frac{x_2 y_1 – x_1 y_2}{x_2 – x_1}
\]

The y-intercept is \((0,b)\).

Detailed Explanation

How to find the y-intercept from two points (step-by-step)

Given two distinct points on a line, (x1, y1) and (x2, y2), the y-intercept is the value b in the line equation \(y = m x + b\). The following steps show exactly what to do and why at each step.

  1. Step 1 — Check for a vertical line (special case)

    What to do: Compare x1 and x2.

    Why: If x1 = x2, the line is vertical and has the form \(x = c\) with \(c = x_1\). A vertical line has no finite y-intercept unless \(c = 0\). If \(c = 0\) then the line is the y-axis and every point on it intersects the y-axis (the concept of a single y-intercept is not meaningful).

    Action:

    If x1 = x2 and x1 ≠ 0, stop: there is no y-intercept. If x1 = x2 = 0, the line is the y-axis (every y is an intersection). Otherwise continue to Step 2.

  2. Step 2 — Compute the slope m

    What to do: Use the slope formula

    \(m = \dfrac{y_{2} – y_{1}}{x_{2} – x_{1}}\)

    Why: The slope gives the rate of change of y with respect to x and is needed to write the line in slope-intercept form \(y = m x + b\).

    Note: This is valid because x1 ≠ x2 (we excluded the vertical-line case in Step 1).

  3. Step 3 — Write the line equation and solve for b

    What to do: Start with the slope-intercept form

    \(y = m x + b\)

    Substitute one of the given points, for example (x1, y1), and solve for b:

    \(b = y_{1} – m x_{1}\)

    Why: Substituting a known point into \(y = m x + b\) isolates b so you can compute the y-intercept directly.

  4. Step 4 — (Optional) Use a single formula for b in terms of the two points

    What to do: Combine the slope formula and the expression for b to get a direct formula for b:

    \(b = y_{1} – x_{1}\,\dfrac{y_{2} – y_{1}}{x_{2} – x_{1}}\)

    Simplify the expression to a single fraction if desired:

    \(b = \dfrac{x_{2}y_{1} – x_{1}y_{2}}{x_{2} – x_{1}}\)

    Why: This formula computes the y-intercept directly from the coordinates of the two points without separately computing m first.

  5. Step 5 — State the y-intercept

    What to do: The y-intercept is the point where x = 0, so it is (0, b). The numeric value of the intercept on the y-axis is b as computed above.

    Why: By definition the y-intercept is the y-value when x = 0, which is exactly b in \(y = m x + b\).

Compact summary

For non-vertical lines through (x1, y1) and (x2, y2):

\(m = \dfrac{y_{2} – y_{1}}{x_{2} – x_{1}}\)

\(b = y_{1} – m x_{1}\)

Or directly

\(b = \dfrac{x_{2}y_{1} – x_{1}y_{2}}{x_{2} – x_{1}}\)

Worked numerical example

What to do: Apply the steps to concrete points. Suppose the points are (2, 3) and (5, 11).

  1. Compute the slope:
  2. \(m = \dfrac{11 – 3}{5 – 2} = \dfrac{8}{3}\)

  3. Compute b using (2, 3):
  4. \(b = 3 – \dfrac{8}{3}\cdot 2 = 3 – \dfrac{16}{3} = \dfrac{9}{3} – \dfrac{16}{3} = -\dfrac{7}{3}\)

  5. Thus the y-intercept is
  6. \((0, -\dfrac{7}{3})\) and the y-intercept value is \(b = -\dfrac{7}{3}\).

Follow these steps with any two non-vertical points to find the y-intercept. If the two given x-values are equal, handle the vertical-line special case described in Step 1.

See full solution

Graph

image
Master All Your Homework with Edubrain
Edubrain

FAQs

How do I get the slope from two points \((x_1,y_1)\) and \((x_2,y_2)\)?

Use the slope formula \(m=\dfrac{y_2-y_1}{x_2-x_1}\), provided \(x_1\neq x_2\). Simplify fractions or decimals as needed.

Once I have the slope, how do I find the y-intercept?

Use point-slope then solve for \(b\): \(y-y_1=m(x-x_1)\) so \(b=y_1-mx_1\). Equivalently \(b=y_2-mx_2\).

Is there a direct formula for the y-intercept from two points?

Yes: \(b=\dfrac{x_2y_1-x_1y_2}{x_2-x_1}\). This comes from eliminating \(m\) using \(b=y_1-mx_1\).

What if the two points have the same x-value (vertical line)?

If \(x_1=x_2=c\) the line is \(x=c\). It has no finite y-intercept unless \(c=0\), in which case the line is the y-axis and every y is an "intercept."

What if one of the given points is on the y-axis?

If one point is \((0,y_0)\) then the y-intercept is \(y_0\) immediately, since the line passes through \((0,b)\) with \(b=y_0\).

How do I handle fractional or decimal slopes to get an exact intercept?

Work with exact fractions: compute \(m\) as a rational number and use \(b=y_1-mx_1\). Keep results as fractions to avoid rounding error, then simplify.

How can I check my y-intercept is correct?

Form the equation \(y=mx+b\) and verify both given points satisfy it. Also plug \(x=0\) to confirm \(y=b\).

Can I find the intercept by solving a linear system instead?

Yes: solve the system \(y_1=mx_1+b\) and \(y_2=mx_2+b\) for \(b\). Subtract to get \(m\), then substitute back to find \(b\).
Find the y-intercept from two points.
Use our tools to simplify it.
image
185,791+ happy customers
Math, Calculus, Geometry, etc.
top
Upgrade to Edubrain Premium
Unlimited help across all subjects
$16
$3.99
/week
Core benefits:
  • ok Unlimited AI homework help
  • ok A+ quality answers
  • ok Faster responses, no limits
Tools:
  • ok Notes generator
  • ok Diagram generator
  • ok AI detector and humanizer
Extras:
  • ok Ad-free experience
  • ok Share responses with others
  • ok Advanced reasoning
expert
Expert-level help at discounted prices
Cancel anytime
Star
4.6Trusted by 14,623 students
🚀 Upgrade Plan
You’ve reached the free limit of 5 slides.
To generate a full presentation, please subscribe.
Unlock with subscription:
  • ok Unlimited slide generation for presentations
  • ok AI-designed, well-structured slide content
  • ok Faster workflow for bigger decks
-
Plus, get unlimited access to:
  • ok Diagram Generator, Flashcard Maker, Notes Generator, Research Assistant, Answer Generator, AI Homework Helper & AI Detector
  • ok Discounted designer expert help
Star
4.6Trusted by 14,623 students