- x₁ (first point)
- 1
- y₁ (first point)
- 2
- x₂ (second point)
- 3
- y₂ (second point)
- 6
y = 2x
Open with these valuesy = 2x
Result: y = 2xDivide the rise by the run: m = (y₂ − y₁) ÷ (x₂ − x₁), then read the intercept off one point with b = y₁ − m·x₁. Through (1, 2) and (3, 6) that is m = 2 and b = 0, so y = 2x. Two points with the same x give a vertical line, which has no slope.
Held fixed: x₁ (first point) 1.0000, y₁ (first point) 2.0000, x₂ (second point) 3.0000.
| y₂ (second point) | Result |
|---|---|
| 0.0000 | -1.000000 |
| 2.0000 | 0.000000 |
| 4.0000 | 1.000000 |
| 6.0000Your value | 2.000000 |
| 8.0000 | 3.000000 |
| 10.0000 | 4.000000 |
| 12.0000 | 5.000000 |
y = 2x
Open with these valuesy = −2x + 5
Open with these valuesy = −2x − 1
Open with these valuesm = (y₂ − y₁) ÷ (x₂ − x₁), b = y₁ − m·x₁
Two distinct points fix exactly one straight line, and slope-intercept form y = m·x + b is the usual way to write it. The slope m is the rise divided by the run, (y₂ − y₁) ÷ (x₂ − x₁): a positive slope climbs from left to right, a negative one falls, and a slope of zero is a flat horizontal line. The larger its magnitude, the steeper the line. Once m is known, the y-intercept follows from either of the two points, because both lie on the line: b = y₁ − m·x₁. That is the y-value where the line crosses the y-axis. The order of the two points does not matter — swapping them flips the sign of both the rise and the run, and the quotient stays the same. One case has no answer in this form. If both points share the same x-value, the run is zero, the division is undefined, and the line is vertical. A vertical line is written as x = constant instead, and this page shows no result rather than an invented number. Two identical points are the other gap: a single point does not determine a line at all.
If x₂ equals x₁ the run is zero and the slope is undefined, so the page shows no result. Such a line is written as x = constant, not as y = m·x + b.
Swapping the two points flips the sign of both the rise and the run. The quotient, and therefore the equation, stays identical.
Put x₂ into the finished equation — the result must be y₂. That catches a sign slip in the intercept immediately.
The slope is (x₂ − x₁) ÷ (y₂ − y₁).
It is the other way round: rise over run, (y₂ − y₁) ÷ (x₂ − x₁). The flipped version gives the reciprocal.
A slope of zero and an undefined slope are the same thing.
A slope of zero is a horizontal line, y = b. An undefined slope is a vertical line, x = constant, and has no y = m·x + b form.
b is the x-value where the line meets an axis.
b is the y-value where the line crosses the y-axis, reached at x = 0.
| First point | Second point | Slope m | Equation |
|---|---|---|---|
| (1, 2) | (3, 6) | 2 | y = 2x |
| (0, 0) | (1, 1) | 1 | y = x |
| (0, 0) | (4, 2) | 0.5 | y = 0.5x |
| (0, 5) | (2, 1) | −2 | y = −2x + 5 |
| (−2, 3) | (2, −5) | −2 | y = −2x − 1 |
First the slope, m = (y₂ − y₁) ÷ (x₂ − x₁), then the intercept, b = y₁ − m·x₁, and write the result as y = m·x + b. For (1, 2) and (3, 6) that gives m = 2 and b = 0, so y = 2x.
It writes a line as y = m·x + b, where m is the slope and b is the y-intercept. Both key numbers can be read straight off the equation, which is why it is the most common way to describe a straight line.
The slope is the change in y divided by the change in x — the rise over the run. A positive slope rises from left to right, a negative one falls, and zero is a flat horizontal line.
Both points share the same x-value, so x₂ − x₁ is zero and dividing by it leaves the slope undefined. A vertical line is written as x = constant instead, and this page returns no result when the two x-values are equal.
Yes, every coordinate accepts negative values and decimals. Points like (−2, 3) or (1.5, 4.25) work fine; the only requirement is that the two x-values differ.
Information, not professional advice.
Diese Seite gibt es auch auf Deutsch.
Zu Deutsch wechseln