직선 계산기
직선의 방정식을 단계별로 구하세요
이 계산기는 두 점 또는 기울기와 한 점이 주어졌을 때, 직선의 방정식(기울기-절편형, 점-기울기형, 일반형)을 풀이 과정을 제시하며 구합니다.
관련 계산기: 기울기 계산기, 평행 및 수직 직선 계산기
Solution
Your input: find the equation of a line given two points $$$P=\left(-4, 7\right)$$$ and $$$Q=\left(1, 2\right)$$$.
The slope of a line passing through the two points `P=(x_1, y_1)` and `Q=(x_2, y_2)` is given by `m=(y_2-y_1)/(x_2-x_1)`.
We have that $$$x_1=-4$$$, $$$y_1=7$$$, $$$x_2=1$$$, $$$y_2=2$$$.
Plug the given values into the formula for slope: $$$m=\frac{\left(2\right)-\left(7\right)}{\left(1\right)-\left(-4\right)}=\frac{-5}{5}=-1$$$.
Now, the y-intercept is `b=y_1-m*x_1` (or `b=y_2-m*x_2`, the result is the same).
$$$b=7-\left(-1\right) \cdot \left(-4\right)=3$$$.
Finally, the equation of the line can be written in the form `y=mx+b`.
$$$y=-x+3$$$.
Answer:
The slope of the line is $$$m=-1$$$.
The equation of the line in the slope-intercept form is $$$y=-x+3$$$.
The equation of the line in the point-slope form is $$$y - 7 = - (x + 4)$$$.
The equation of the line in the point-slope form is $$$y - 2 = - (x - 1)$$$.
The general equation of the line is $$$x + y - 3 = 0$$$.