Algebra • Coordinate Geometry

Find Equation of a Line Given Slope and a Point

Determine the complete algebraic equation of any two-dimensional straight line when its slope and a single coordinate point are known. Convert seamlessly between point-slope, slope-intercept, and standard form with complete mathematical proofs and interactive coordinate plots.

|
Last Updated: September 2026
|
Verified Accurate: Analytic Geometry & Vector Algebra
Coordinate Geometry • Linear Equations Valid Line Equation
Common Line Scenarios: Click to load & solve
rise/run
x₁
y₁
Primary Equation Form:
y = 2x - 1
Line Type: Non-Vertical Oblique Line (Slope m = 2)
Slope-Intercept Form
y = 2x - 1
y = mx + b
Point-Slope Form
y - 5 = 2(x - 3)
y - y₁ = m(x - x₁)
Standard Form
2x - y = 1
Ax + By = C (A ≥ 0)
Y-Intercept (0, b) (0, -1) Vertical Cross
X-Intercept (x₀, 0) (0.5, 0) Horizontal Cross
Parallel Slope 2 m_parallel = m
Perpendicular Slope -0.5 (-1/2) m_perp = -1/m
Interactive Coordinate Geometry Plot Slope triangle & points dynamically rendered
Line y = mx + b Given Point (x₁, y₁) Y-Intercept (0, b) X-Intercept

Step-by-Step Algebraic Derivation

Point-Slope to Slope-Intercept
Direct Answer & Overview
Verified Educational Guide

How to Find the Equation of a Line from Slope and a Point

Given a slope m and a point (x₁, y₁), the equation of the line is found using the point-slope formula y - y₁ = m(x - x₁). Expanding the right side gives y - y₁ = mx - mx₁. Adding y₁ to both sides yields the slope-intercept form y = mx + b, where the y-intercept is b = y₁ - mx₁. In standard form, the equation is written as Ax + By = C with integer coefficients.

Primary Mathematical Formula Point-Slope Form to Slope-Intercept Form Transformation
Standard Equation
ƒ(x)
Q.E.D.
y−y1=m(x−x1)  ⟹  y=mx+(y1−mx1)y - y_1 = m(x - x_1) \implies y = mx + (y_1 - mx_1)
Where m is the scalar slope, (x_1, y_1) is the known coordinate point on the Euclidean plane, and b = y_1 - mx_1 defines the y-axis intercept.
Exact Formula
Input Parameters
Required
1
Slope (m) — The steepness and direction of the line (rise over run, Δy/Δx)
2
Point Coordinates (x₁, y₁) — The horizontal and vertical coordinates of a point on the line
Expected Outputs
Calculated
Point-Slope Form — y - y₁ = m(x - x₁)
Slope-Intercept Form — y = mx + b, revealing the rate of change and y-intercept
Standard Form — Ax + By = C, where A, B, and C are coprime integers with A ≥ 0
Intercept Coordinates — Exact x-intercept (-b/m, 0) and y-intercept (0, b)
Worked Numerical Example
Instant Verification
Finding the Line Equation for Slope m = 3 through (2, 5)
1 Substitute m = 3 and point (2, 5) into point-slope formula: y - 5 = 3(x - 2)
2 Distribute slope across binomial: y - 5 = 3x - 6
3 Add 5 to isolate y (Slope-Intercept): y = 3x - 1
4 Rearrange into Standard Form (Ax + By = C): 3x - y = 1

Core Mathematical Principles of Linear Equations

In Euclidean geometry and Cartesian coordinate analysis, a straight line represents the geometric locus of points whose coordinates $(x, y)$ satisfy a linear algebraic relationship of degree one. One of the most fundamental postulates of geometry—first formalized by Euclid of Alexandria and later modernized through Cartesian algebra—states that a unique line is determined either by two distinct points or by a single fixed point combined with an orienting direction vector.

The concept of slope, designated internationally by the variable $m$, quantifies that orienting direction. The slope defines the constant rate of change between the vertical displacement (the "rise," denoted $\Delta y$) and the horizontal displacement (the "run," denoted $\Delta x$). Because a straight line has uniform curvature zero, this ratio remains strictly invariant regardless of which two points on the line are evaluated:

m = \frac{\Delta y}{\Delta x} = \frac{y_2 - y_1}{x_2 - x_1} \quad (x_1 \neq x_2)

When we are provided with a single known coordinate anchor point $(x_1, y_1)$ and a fixed scalar slope $m$, every other arbitrary point $(x, y)$ residing on that line must obey this fundamental ratio. For complementary calculations involving coordinate pairs, explore our companion slope calculator and dedicated equation of a line calculator.

Derivation of the Point-Slope Formula from First Principles

The point-slope formula is not an arbitrary formula to memorize; it is an immediate algebraic consequence of the geometric definition of slope. To understand why it holds universal validity, let us trace its derivation step-by-step:

Step 1: Choose an Arbitrary Point on the Locus

Let $P_1(x_1, y_1)$ be the fixed, known point in the Cartesian plane. Let $P(x, y)$ be any arbitrary, unknown point lying on the same line, with the sole restriction that $x \neq x_1$ to avoid dividing by zero.

Step 2: Equate the Rate of Change to the Known Slope

By the invariance of slope along any straight line, the slope calculated between the fixed point $P_1$ and the variable point $P$ must precisely equal the given scalar $m$:

\frac{y - y_1}{x - x_1} = m

Step 3: Clear the Denominator

Multiply both sides of the equation by the non-zero binomial $(x - x_1)$:

(y - y_1) = m(x - x_1)

Notice that while the initial quotient required $x \neq x_1$, the final cleared formulation $(y - y_1) = m(x - x_1)$ remains true even when evaluated directly at $(x, y) = (x_1, y_1)$, since $0 = m(0)$ is an identity. Hence, the equation $(y - y_1) = m(x - x_1)$ governs the entire uninterrupted continuum of the non-vertical straight line.

The Three Canonical Forms of a Linear Equation

In applied mathematics, physics, and computer graphics, linear relationships are expressed in several distinct mathematical forms depending on the analytical goal. Mastering the conversion between these representations enables rapid visualization, calculus application, and matrix formulation.

Form 1: Point-Slope
y - y_1 = m(x - x_1)

Primary Benefit: Direct construction. Requires zero pre-computation; immediately reflects the physical anchor point and instantaneous rate of change.

Form 2: Slope-Intercept
y = mx + b

Primary Benefit: Functional graphing. Solved explicitly for $y$ as a function of $x$, identifying the vertical offset $b$ at coordinate $(0, b)$.

Form 3: Standard / General
Ax + By = C

Primary Benefit: Symmetrical & universal. Handles vertical lines seamlessly where $B = 0$, and integrates directly into matrix algebra ($A\mathbf{x} = \mathbf{b}$).

Step-by-Step Conversion: Point-Slope to Slope-Intercept and Standard Form

Transforming an initial point-slope equation into slope-intercept and standard forms requires systematic algebraic operations. Below is the exact algorithmic workflow:

Phase A: Transforming to Slope-Intercept Form (y = mx + b)

  1. Substitute: Write $y - y_1 = m(x - x_1)$ using the supplied numerical values.
  2. Distribute: Apply the distributive property over the parentheses: $y - y_1 = mx - mx_1$.
  3. Isolate y: Add $y_1$ to both sides: $y = mx - mx_1 + y_1$.
  4. Evaluate constant b: Group the constant terms into a single scalar: $b = y_1 - mx_1$. The equation becomes $y = mx + b$.

Phase B: Transforming to Standard Form (Ax + By = C)

  1. Start from y = mx + b: If $m$ or $b$ are rational fractions $\frac{p}{q}$, multiply every term in the equation by the least common denominator (LCD) to eliminate fractional coefficients.
  2. Gather variables: Subtract the $x$-term from both sides: $-mx + y = b$ (or scaled counterpart).
  3. Enforce standard conventions: Standard form mandates that $A$, $B$, and $C$ are integers with no common factor greater than 1, and the leading coefficient $A$ must be non-negative ($A \geq 0$). If the coefficient in front of $x$ is negative, multiply the entire equation by $-1$.

Handling Special Cases: Horizontal, Vertical, and Fractional Slopes

While general oblique lines present little difficulty, coordinate geometry includes edge cases where naive application of formulas can lead to division by zero or sign errors.

1. Horizontal Lines (Slope m = 0)

When the vertical rise between points is zero ($\Delta y = 0$), the slope evaluates to $m = 0$. Substituting $m = 0$ into the point-slope form gives $y - y_1 = 0(x - x_1)$, which collapses immediately to:

y = y_1

Such lines are parallel to the $x$-axis. They possess an infinite number of $x$-intercepts if $y_1 = 0$ (the $x$-axis itself), or zero $x$-intercepts if $y_1 \neq 0$.

2. Vertical Lines (Undefined Slope)

When the horizontal displacement between points is zero ($\Delta x = 0$), calculating slope yields division by zero: $m = \frac{\Delta y}{0}$, which is strictly undefined in real arithmetic. Vertical lines cannot be represented in slope-intercept form ($y = mx + b$) because $m$ does not exist as a finite real scalar. Instead, the equation is represented in standard form with $B = 0$:

x = x_1

This line runs parallel to the $y$-axis and passes through $(x_1, 0)$ with no $y$-intercept unless $x_1 = 0$ (the $y$-axis itself).

3. Rational Fractional Slopes

When the slope is a non-integer fraction $m = \frac{p}{q}$, clearing the denominator first prevents accumulated rounding errors that occur with floating-point decimals. For instance, given $m = \frac{3}{7}$ and $(x_1, y_1) = (2, 4)$, writing $7(y - 4) = 3(x - 2) \implies 7y - 28 = 3x - 6$ yields exact standard form $3x - 7y = -22$ without any recurring decimal approximations.

Geometric Applications: Parallel and Perpendicular Lines

A common task in coordinate geometry and vector kinematics involves constructing a new line that passes through a target coordinate $(x_1, y_1)$ while maintaining a strict geometric orientation (parallelism or perpendicularity) relative to an existing reference line $L_1: y = m_1 x + b_1$.

Parallel Line Construction

Two non-vertical lines are parallel if and only if their slopes are identical:

m_{\parallel} = m_1

To write the parallel line through $(x_1, y_1)$, set $m = m_1$ in the point-slope formula: $y - y_1 = m_1(x - x_1)$.

Perpendicular Line Construction

Two non-vertical lines intersect at a right angle ($90^\circ$) if and only if their slopes are negative reciprocals:

m_{\perp} = -\frac{1}{m_1} \quad (m_1 \neq 0)

The product of their slopes satisfies $m_1 \cdot m_{\perp} = -1$. The perpendicular line equation is $y - y_1 = -\frac{1}{m_1}(x - x_1)$.

Comprehensive Worked Examples with Step-by-Step Solutions

Review these detailed worked problems illustrating positive, negative, and fractional slopes converted across all three standard representations.

Example 1: Positive Integer Slope Standard & Slope-Intercept

Find the equation of the line with slope $m = 4$ passing through $(3, -2)$.

Step 1: Point-Slope Formulation

y - y_1 = m(x - x_1) \implies y - (-2) = 4(x - 3) \implies y + 2 = 4(x - 3)

Step 2: Conversion to Slope-Intercept Form ($y = mx + b$)

y + 2 = 4x - 12 \implies y = 4x - 14

Step 3: Conversion to Standard Form ($Ax + By = C$)

-4x + y = -14 \implies 4x - y = 14 \quad (A = 4, B = -1, C = 14)

Intercepts: $y$-intercept is $(0, -14)$; $x$-intercept is $(\frac{14}{4}, 0) = (3.5, 0)$.

Example 2: Fractional Slope with Negative Coordinate Exact Fraction Arithmetic

Find the equation of the line with slope $m = -\frac{3}{5}$ passing through $(-5, 4)$.

Step 1: Point-Slope Formulation

y - 4 = -\frac{3}{5}(x - (-5)) \implies y - 4 = -\frac{3}{5}(x + 5)

Step 2: Clear Denominator for Standard Form

5(y - 4) = -3(x + 5) \implies 5y - 20 = -3x - 15 \implies 3x + 5y = 5

Step 3: Solve for Slope-Intercept Form

5y = -3x + 5 \implies y = -\frac{3}{5}x + 1

Validation: At $x = -5$, $y = -\frac{3}{5}(-5) + 1 = 3 + 1 = 4$, which matches point $(-5, 4)$.

Example 3: Perpendicular Line Construction Orthogonal Geometry

Find the equation of the line perpendicular to $2x - 6y = 9$ passing through $(1, -3)$.

Step 1: Determine the Reference Slope

2x - 6y = 9 \implies -6y = -2x + 9 \implies y = \frac{1}{3}x - 1.5 \implies m_1 = \frac{1}{3}

Step 2: Compute Negative Reciprocal Slope

m_{\perp} = -\frac{1}{m_1} = -\frac{1}{1/3} = -3

Step 3: Point-Slope Assembly and Expansion

y - (-3) = -3(x - 1) \implies y + 3 = -3x + 3 \implies y = -3x

Standard Form: $3x + y = 0$ (a line passing directly through the coordinate origin).

Common Algebraic Pitfalls and How to Avoid Them

Errors when finding the equation of a line usually arise not from conceptual misunderstanding, but from subtle sign and grouping slips during symbolic manipulation:

The Double Negative Sign Error

When $x_1$ or $y_1$ is negative, forgetting the formula's inherent minus sign leads to catastrophic error. For $x_1 = -4$, write $x - (-4) = x + 4$. Writing $x - 4$ inverts the horizontal translation of the line.

Incomplete Slope Distribution

In $y - y_1 = m(x - x_1)$, students frequently multiply $m$ by $x$ but fail to multiply $m$ by $-x_1$, yielding the incorrect $y - y_1 = mx - x_1$. Always distribute $m$ across both terms inside the binomial.

Inverting Rise and Run

When given slope as a ratio, reversing the fraction (writing $\Delta x / \Delta y$ instead of $\Delta y / \Delta x$) swaps the roles of dependent and independent axes, reflecting the line across the diagonal line $y = x$.

Standard Form Integer Requirements

Writing standard form as $0.5x - y = -3$ violates mathematical conventions. Standard form $Ax + By = C$ requires $A, B, C \in \mathbb{Z}$ with $A \geq 0$. Multiply by 2 to yield proper standard form $x - 2y = -6$.

Fact-Checked & Verified • Computational Accuracy Standards
Updated September 2026 • Editorial Policy
Authored By
Sanjay Samanta

Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.

Reviewed & Verified By
Academic Review Board

Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.

Found an error or have an improvement suggestion? Report a calculation issue

Frequently Asked Questions

What is the point-slope form equation of a line?
The point-slope form of a linear equation is y - y₁ = m(x - x₁), where m represents the slope of the line and (x₁, y₁) represents the coordinates of a known point through which the line passes. This form is derived directly from the definition of slope as rise over run.
How do you find the equation of a line given slope and a point?
To find the equation, substitute the known slope m and the coordinates of point (x₁, y₁) into the point-slope formula y - y₁ = m(x - x₁). Next, distribute m across the binomial (x - x₁), and then isolate y by adding y₁ to both sides to obtain the slope-intercept form y = mx + b.
How do you find the y-intercept (b) when given a slope and a point?
Substitute the slope m and the coordinates (x, y) into the slope-intercept template y = mx + b, and algebraically solve for b: b = y - mx. For example, if m = 3 and the point is (2, 7), then 7 = 3(2) + b implies 7 = 6 + b, so b = 1.
What is the equation of a line with slope 0 passing through a point?
A line with slope m = 0 is a horizontal line. Substituting m = 0 into y - y₁ = 0(x - x₁) yields y - y₁ = 0, or simply y = y₁. Every point on this horizontal line possesses the exact same y-coordinate regardless of the value of x.
What happens if the slope of the line is undefined?
An undefined slope corresponds to a vertical line, where the change in x is zero (Δx = 0). Vertical lines cannot be written in slope-intercept or point-slope form because division by zero is undefined. Instead, the equation is given directly by x = x₁, where x₁ is the x-coordinate of the given point.
How do you convert point-slope form into standard form Ax + By = C?
From y - y₁ = m(x - x₁), clear any fraction in the slope m = p/q by multiplying the entire equation by the denominator q: q(y - y₁) = p(x - x₁). Expand to obtain qy - qy₁ = px - px₁. Rearrange terms so that all variable terms are on one side: px - qy = px₁ - qy₁. By convention, standard form requires A, B, and C to be integers with A ≥ 0.