Slope Calculator
Calculate slope (m), angle of inclination, distance, midpoint, and line equation (y = mx + b) with dynamic Cartesian plot and derivation.
The Concept of Slope in Coordinate Geometry
In mathematics, the slope (denoted by the letter $m$) quantifies both the steepness and direction of a straight line connecting two coordinates $(x_1, y_1)$ and $(x_2, y_2)$ on a 2-dimensional Cartesian grid. It is universally defined as the ratio of vertical change (rise) to horizontal change (run):
For deeper analysis and related planning, you can also explore our Area Calculator and Average Calculator.
Types of Slope
Distance, Midpoint, and Equation of the Line
- Euclidean Distance: $d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$ (derived from the Pythagorean theorem).
- Midpoint: The arithmetic middle point $M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}\right)$.
- Slope-Intercept Form: $y = mx + b$, where $b = y_1 - m \cdot x_1$ represents the vertical y-intercept.
- Perpendicular Line Slope: The negative reciprocal $m_{\perp} = -1 / m$.
Step-by-Step Worked Coordinate Geometry Example
Suppose you need to find the slope, linear equation, angle of inclination, Euclidean distance, and midpoint between two Cartesian points: $P_1 = (2, 3)$ and $P_2 = (8, 11)$:
- Horizontal & Vertical Changes ($\Delta x, \Delta y$): $\Delta x = x_2 - x_1 = 8 - 2 = \mathbf{6}$, and $\Delta y = y_2 - y_1 = 11 - 3 = \mathbf{8}$.
- Slope ($m$): $m = rac{\Delta y}{\Delta x} = rac{8}{6} = rac{4}{3} pprox \mathbf{1.3333}$. Because $m > 0$, the line rises from left to right.
- Y-Intercept ($b$) & Slope-Intercept Equation: Substitute $P_1(2,3)$ into $b = y_1 - m x_1$: $b = 3 - (1.3333 imes 2) = 3 - 2.6667 = \mathbf{0.3333}$. Thus, the line equation is $y = 1.33x + 0.33$.
- Euclidean Distance ($d$) & Midpoint ($M$): $d = \sqrt{6^2 + 8^2} = \sqrt{36 + 64} = \sqrt{100} = \mathbf{10.00 ext{ units}}$. The midpoint is $M = \left(rac{2+8}{2}, rac{3+11}{2} ight) = \mathbf{(5.0, 7.0)}$, and the angle of inclination is $ heta = rctan(4/3) = \mathbf{53.13^\circ}$.
Frequently Asked Questions
What is the slope formula?
The slope formula is m = (y2 - y1) / (x2 - x1), representing the vertical change (rise) divided by the horizontal change (run).
What does an undefined slope mean?
An undefined slope occurs when x1 = x2 (a vertical line). Dividing by zero (Δx = 0) is mathematically undefined in Euclidean geometry.
What is the slope of perpendicular lines?
Perpendicular lines have negative reciprocal slopes: m1 × m2 = -1, or m2 = -1 / m1.
Geometric Application: Slope arithmetic is identical to derivative rates of change in calculus ($\frac{dy}{dx}$), velocity in physics ($\frac{\Delta s}{\Delta t}$), and civil engineering gradient slopes for roadway drainage.