General Form to Slope-Intercept Form Converter
Convert any linear equation from General Form ($Ax + By + C = 0$) to Slope-Intercept Form ($y = mx + b$). View exact fractional slopes, intercepts, step-by-step algebraic derivations, and orthonormal 2D plots.
Algebraic Conversion Steps
Rigorous Step-by-StepInteractive 2D Cartesian Coordinate Graph
1:1 Orthonormal Aspect Ratio • Slim Minimal LinesGeneral Form to Slope-Intercept Form Direct Overview
To convert a linear equation from General Form Ax + By + C = 0 to Slope-Intercept Form y = mx + b, isolate the variable y by subtracting Ax and C from both sides, then dividing every term by B. This yields the explicit slope formula m = -A/B and y-intercept b = -C/B. If B = 0, the line is vertical (x = -C/A) with an undefined slope.
General Form vs. Slope-Intercept Form Definitions
Linear equations in two-dimensional Cartesian geometry represent straight lines. Depending on the mathematical task—whether performing algebraic manipulations, solving linear systems, or graphing functional relations—different standard representations offer distinct computational advantages. Two of the most widely used representations are General Form and Slope-Intercept Form.
An implicit representation where all variable terms and constants reside on one side of the equality, balanced against zero. General form is universally robust because it can represent every possible straight line in the Cartesian plane, including vertical lines where $B = 0$.
An explicit functional representation where the dependent variable $y$ is isolated as a function of the independent variable $x$. It immediately reveals the line's steepness (slope $m$) and the vertical starting point (y-intercept $b$). For lines defined through a point and a direction, explore our companion Find Equation of a Line Given Slope and a Point tool.
Complete Algebraic Derivation & Parameter Isolation
The transformation from General Form to Slope-Intercept Form is an elementary algebraic process that isolates the variable $y$. Let us trace the formal derivation step-by-step:
- Initial Equation in General Form: Ax + By + C = 0
- Subtract $Ax$ and $C$ from Both Sides:
Using the additive inverse property of real equality, transfer all terms not containing $y$ to the right side:
By = -Ax - C - Divide by the Coefficient $B$ (Assuming $B \neq 0$):
Using the multiplicative inverse property, divide every distinct term by $B$:
y = \left(-\frac{A}{B}\right)x + \left(-\frac{C}{B}\right) - Equate to the Slope-Intercept Template $y = mx + b$: m = -\frac{A}{B}, \qquad b = -\frac{C}{B}
This elegant derivation establishes that the slope of any non-vertical general linear equation is the negative ratio of the $x$-coefficient to the $y$-coefficient: $m = -A/B$. Similarly, the vertical intercept is the negative ratio of the constant term to the $y$-coefficient: $b = -C/B$.
Geometric Meaning: Slopes, Intercepts & Normal Vectors
The coefficients $A$, $B$, and $C$ in general form carry profound geometric significance in vector algebra and coordinate geometry:
In vector geometry, the vector $\vec{n} = \langle A, B \rangle$ is strictly perpendicular (orthogonal) to the line $Ax + By + C = 0$. Because the direction vector along the line is $\vec{d} = \langle B, -A \rangle$, their dot product vanishes: $\vec{n} \cdot \vec{d} = A(B) + B(-A) = 0$.
The direction vector along the line is $\langle \Delta x, \Delta y \rangle = \langle B, -A \rangle$. The scalar slope represents the ratio of vertical displacement to horizontal displacement: $m = \frac{\Delta y}{\Delta x} = \frac{-A}{B} = -\frac{A}{B}$.
The $x$-intercept is obtained by setting $y = 0$ in the general form: $Ax + B(0) + C = 0 \implies Ax = -C \implies x_0 = -C/A$. Thus, the line crosses the Cartesian axes at two fundamental coordinate anchors:
Special Cases: Vertical, Horizontal & Degenerate Lines
When dealing with boundary coefficients where $A$ or $B$ vanish, the conversion reveals critical topological distinctions:
- Vertical Lines ($B = 0, A \neq 0$): The equation reduces to $Ax + C = 0 \implies x = -C/A$. Because division by zero is undefined in real arithmetic, the slope $m = -A/0$ is undefined. A vertical line intersects the $x$-axis at $(-C/A, 0)$ and has no $y$-intercept (unless $C = 0$, in which case it is the entire $y$-axis). Vertical lines cannot be written in slope-intercept form $y = mx + b$.
- Horizontal Lines ($A = 0, B \neq 0$): The equation reduces to $By + C = 0 \implies y = -C/B$. Here, the slope is zero ($m = -0/B = 0$). In slope-intercept form, this is $y = 0x + b$ or simply $y = b$. The line never crosses the $x$-axis unless $C = 0$.
- Degenerate Case ($A = 0, B = 0$): If both coefficients vanish, the expression collapses to $C = 0$. If $C = 0$, the equation $0 = 0$ is satisfied by every point in $\mathbb{R}^2$ (the entire 2D plane). If $C \neq 0$, the equation $C = 0$ is an impossible contradiction with an empty solution set ($\emptyset$). Neither case defines a one-dimensional line.
Comprehensive Step-by-Step Worked Examples
Convert $3x + 4y - 12 = 0$ into slope-intercept form and determine all intercepts.
Convert $5x - 2y + 10 = 0$ into slope-intercept form.
Linear Equation Forms Comparative Reference Table
Compare the primary algebraic forms of a straight line in two variables:
| Equation Form | Standard Algebraic Template | Primary Parameters | Handles Vertical Lines? |
|---|---|---|---|
| General Form | Ax + By + C = 0 | Normal vector $\langle A, B \rangle$, scalar $C$ | Yes (B = 0) |
| Standard Form | Ax + By = D | Coefficients $A, B$, constant $D = -C$ | Yes (B = 0) |
| Slope-Intercept Form | y = mx + b | Slope $m = -A/B$, y-intercept $(0, b)$ | No (Slope undefined) |
| Point-Slope Form | y - y₁ = m(x - x₁) | Slope $m$, anchor point $(x_1, y_1)$ | No (Slope undefined) |
| Intercept Form | x/a + y/b = 1 | X-intercept $a$, Y-intercept $b$ | No (Cannot pass origin) |
Real-World Engineering, Economics & Physical Applications
- Microeconomics (Budget Constraints): Consumer budget lines are naturally formulated in general/standard form as $P_x \cdot x + P_y \cdot y - I = 0$, where $P_x$ and $P_y$ are commodity prices and $I$ is total income. Converting to slope-intercept form $y = -\left(\frac{P_x}{P_y}\right)x + \frac{I}{P_y}$ reveals the marginal rate of substitution (MRS) as the slope $-P_x/P_y$.
- Computer Graphics & Collision Detection: In 2D game rendering, separating axis theorem (SAT) and ray casting rely on the normal vector $\langle A, B \rangle$ from general form for instantaneous perpendicular distance queries $d = \frac{|Ax_0 + By_0 + C|}{\sqrt{A^2 + B^2}}$. Converting to slope-intercept form provides the scanline rendering rasterization step $\Delta y = m \cdot \Delta x$.
- Civil Engineering & Roadway Grading: Road grades and pipeline drainage slopes are defined as percentage grade $m \times 100\%$. Civil engineering survey cross-sections translate boundary elevation constraints from general boundary surveys directly into slope-intercept drainage profiles. For parallel slope calculations, check our Slope Calculator.
Common Student Pitfalls & Calculation Mistakes
- Forgetting the Negative Sign in Slope: A pervasive mistake is writing $m = A/B$ instead of $m = -A/B$. Because $Ax$ is on the left-hand side, subtracting it introduces a negative sign: $By = -Ax - C \implies m = -A/B$.
- Sign Errors When Dividing by Negative $B$: When $B < 0$, dividing by a negative number flips the signs of both the $x$-term and the constant term. For example, in $2x - 3y + 6 = 0 \implies -3y = -2x - 6 \implies y = \frac{-2}{-3}x + \frac{-6}{-3} = \frac{2}{3}x + 2$. Failing to track both negatives yields incorrect negative intercepts.
- Attempting to Convert Vertical Lines: Trying to express $3x - 9 = 0$ as $y = mx + b$ results in division by zero ($B = 0$). Always verify that $B \neq 0$ before constructing a slope-intercept equation.
Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.
Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.