Point-Slope Form Calculator
Enter the coordinates of two points to find the slope and the equation of the line in point-slope form.
Results:
Understanding the Point-Slope Form
The point-slope form is a specific way to write the equation of a straight line. It's particularly useful when you know the slope of the line and at least one point that the line passes through. The general formula for the point-slope form is:
y - y₁ = m(x - x₁)
Where:
(x₁, y₁)represents a known point on the line.mrepresents the slope of the line.(x, y)represents any other point on the line.
How to Calculate Point-Slope Form from Two Points
If you are given two points, (x₁, y₁) and (x₂, y₂), you can determine the point-slope form by following these steps:
- Calculate the Slope (m): The slope is the change in y divided by the change in x.
- Choose One Point: You can use either
(x₁, y₁)or(x₂, y₂)as your reference point for the point-slope equation. It's common practice to use the first given point. - Substitute into the Formula: Plug the calculated slope
mand the coordinates of your chosen point(x₁, y₁)into the point-slope formula:y - y₁ = m(x - x₁).
m = (y₂ - y₁) / (x₂ - x₁)
Special Cases: Vertical and Horizontal Lines
- Vertical Line: If
x₁ = x₂(meaning the change in x is zero), the slope is undefined. The equation of a vertical line is simplyx = x₁. - Horizontal Line: If
y₁ = y₂(meaning the change in y is zero), the slope is 0. The equation of a horizontal line isy = y₁.
Using the Calculator
Our Point-Slope Form Calculator simplifies this process. Simply input the x and y coordinates for your two points into the respective fields. Click the "Calculate Point-Slope Form" button, and the calculator will instantly provide you with the slope of the line and its equation in point-slope form.
Example Calculation
Let's find the point-slope form for a line passing through the points (3, 5) and (7, 13).
- Identify Points:
x₁ = 3, y₁ = 5
x₂ = 7, y₂ = 13 - Calculate Slope (m):
m = (13 - 5) / (7 - 3)
m = 8 / 4
m = 2 - Apply Point-Slope Form (using Point 1):
y - y₁ = m(x - x₁)
y - 5 = 2(x - 3)
So, the point-slope form of the line passing through (3, 5) and (7, 13) is y - 5 = 2(x - 3).
x = " + x1 + "";
}
} else {
slope = deltaY / deltaX;
slopeText = "Slope (m): " + slope;
// Construct the point-slope equation: y – y1 = m(x – x1)
var y1_part = (y1 === 0) ? "y" : "y " + ((y1 < 0) ? "+ " + Math.abs(y1) : "- " + y1);
var x1_part = (x1 === 0) ? "x" : "x " + ((x1 < 0) ? "+ " + Math.abs(x1) : "- " + x1);
var slope_str = slope.toString();
if (slope === 0) {
equationText = "Point-Slope Form: " + y1_part + " = 0 (Horizontal Line)";
} else if (slope === 1) {
equationText = "Point-Slope Form: " + y1_part + " = (" + x1_part + ")";
} else if (slope === -1) {
equationText = "Point-Slope Form: " + y1_part + " = -(" + x1_part + ")";
} else {
equationText = "Point-Slope Form: " + y1_part + " = " + slope_str + "(" + x1_part + ")";
}
}
resultSlopeDiv.innerHTML = slopeText;
resultEquationDiv.innerHTML = equationText;
}