Skip to content
    Greek Mathematician Mascot - Daskalos
    Mathimatikos

    60% off your first year

    Terms

    Student Pro: €35.60 for the first year instead of €89

    Teacher Pro: €75.60 for the first year instead of €189

    Code LAG60. One use per account. Renews automatically at the regular price. Cancel anytime.

    View plans

    Equation of a line through two points

    Find the equation and slope of the line through two points. Vertical lines are also supported.

    Calculate the result

    Line y = 2x through two pointsPoints Α(1, 2) and Β(3, 6) determine the line. From Α to Β, x increases by 2 and y by 4.xyΑΒy = 2x
    Illustrative diagram. Points Α(1, 2) and Β(3, 6) determine the line. From Α to Β, x increases by 2 and y by 4.
    m=y2−y1x2−x1y−y1=m(x−x1)

    Worked example

    Problem

    Find the equation of the line through points A(1, 2) and B(3, 6). Check that it is satisfied by both points.

    The line through points A(1, 2) and B(3, 6) has slope 2 and equation y = 2x.

    1. Calculate the slope

      m=6−23−1=2
    2. Use point A

      y−2=2(x−1)⟹y=2x
    Ask AI for a step-by-step solution

    Common mistake

    If the two points have the same x and different y, the line is vertical and is written x = x₁. Its slope is undefined.