Slope of a straight line
Online calculator for calculating the slope of a straight line
The slope of a straight line is calculated in the coordinate system. To do this, enter the X / Y coordinates of the two points A and B.
|
Formula for the slope
To find the slope \(m \) of a straight line between two points, use the following formula
\(\displaystyle m=\frac{y_2-y_1} {x_2-x_1}\)
Distance between the points
\(\displaystyle c=\sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}\)
\(\displaystyle b= x_2-x_1\)
\(\displaystyle b= c · cos(α)\)
\(\displaystyle a=y_2-y_1\)
Angle to the X axis
\(\displaystyle α=asin\left(\frac{a}{c}\right) \) \(\displaystyle = asin\left(\frac{y_2-y_1}{\sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}}\right)\)
\(\displaystyle α=acos\left(\frac{b}{c}\right) \) \(\displaystyle = acos\left(\frac{x_2-x_1}{\sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}}\right)\)
|