Instantly find the equation of a line using a point and slope OR two points. Visualize the line, convert to slope-intercept and standard forms, with step‑by‑step derivation.
The point-slope form — \( y - y_1 = m(x - x_1) \) — is one of the most versatile representations of a linear equation. It directly encodes the slope and a known point, making it ideal for modeling real-world trends, from physics kinematics to financial forecasting. Unlike slope-intercept, point-slope adapts instantly when you have a single data point and a rate of change.
The interactive graph dynamically scales to best fit the line, marks intercepts, and visualizes the slope triangle — an essential aid to internalize the "rise over run" concept.
From slope m and point (x₁, y₁): The equation is derived directly as \( y - y₁ = m(x - x₁) \). The slope-intercept form \( y = mx + b \) is obtained by solving \( b = y₁ - m·x₁ \). Standard form \( Ax + By = C \) is then rearranged with integer coefficients (A > 0) and simplified.
From two points (x₁, y₁) and (x₂, y₂): The slope \( m = \frac{y₂ - y₁}{x₂ - x₁} \) (handling vertical lines separately). Then we pick the first point to construct point-slope form. For vertical lines (x₁ = x₂), the equation becomes \( x = x₁ \).
Our algorithm uses high-precision arithmetic to avoid floating-point pitfalls, and the canvas renders the line using coordinate mapping with adaptive padding.
A retail analyst knows sales were $45,000 in month 4 (x=4, y=45000) and the monthly growth rate (slope) is +$3,200 per month. Using point-slope form: \( y - 45000 = 3200(x - 4) \). The tool quickly predicts sales at month 10: y = $64,200. Additionally, the regression line can be plotted and compared to actual performance. This method is also essential in physics for linear motion (position vs time).
Another use: civil engineers determine road gradients from a known benchmark point using point-slope to calculate elevations.
| Input Example | Point-Slope Equation | Slope-Intercept | Line Characteristic |
|---|---|---|---|
| m = 3, point (2,5) | y - 5 = 3(x - 2) | y = 3x - 1 | Increasing, crosses y at -1 |
| m = -0.75, point (-1,4) | y - 4 = -0.75(x + 1) | y = -0.75x + 3.25 | Decreasing, steep negative |
| Points (3,2) & (7,2) | y - 2 = 0(x - 3) | y = 2 | Horizontal line |
| Points (5,1) & (5,8) | x = 5 (vertical) | Undefined slope | Vertical line, no y-intercept |