Distance from Point to Line
Algebra, Coordinate Geometry
Intro: We normalize by $\sqrt{A^2+B^2}$ and return an exact simplified value.
Worked example
- Distance from $(-2,5)$ to $3x - 4y + 12 = 0$.
- Put the line in standard form $Ax+By+C=0$: here $A=3,\;B=-4,\;C=12$.
- Plug the point $(x_0,y_0)=(-2,5)$ into the numerator $|Ax_0+By_0+C|$: $$|3(-2)+(-4)(5)+12|=|-6-20+12|=|-14|=14.$$
- Compute the denominator $\sqrt{A^2+B^2}$: $$\sqrt{3^2+(-4)^2}=\sqrt{9+16}=\sqrt{25}=5.$$
- Distance: $$d=\dfrac{14}{5}=2.8.$$
- Therefore: $$\boxed{d=\tfrac{14}{5}}.$$
- Optional check (unit normal): a normal vector to the line is $\mathbf{n}=(A,B)=(3,-4)$ with length $\|\mathbf{n}\|=5$. The signed distance is $\dfrac{Ax_0+By_0+C}{\|\mathbf{n}\|}=\dfrac{-14}{5}$, so the (unsigned) distance is $\left|\dfrac{-14}{5}\right|=\tfrac{14}{5}$ ✔️.
- Alternate form (if line is $y=mx+b$): $$d=\dfrac{|mx_0-y_0+b|}{\sqrt{m^2+1}}.$$ Converting $3x-4y+12=0\;\Rightarrow\; y=\tfrac{3}{4}x+3$, this gives $$d=\dfrac{|\tfrac{3}{4}(-2)-5+3|}{\sqrt{(\tfrac{3}{4})^2+1}}=\dfrac{| -\tfrac{3}{2}-2|}{\sqrt{\tfrac{9}{16}+1}}=\dfrac{\tfrac{7}{2}}{\tfrac{5}{4}}=\tfrac{14}{5}.$$
FAQs
Can I enter non-simplified lines?
Yes—we parse coefficients and internally normalize; the distance formula is invariant under scaling of A, B, C.
Vertical or horizontal lines?
Works directly: for $x=c$ use $A=1,B=0,C=−c → d=|x0−c|$; for $y=c$ use $A=0,B=1,C=−c → d=|y0−c|$.
Why choose MathGPT?
- Get clear, step-by-step solutions that explain the “why,” not just the answer.
- See the rules used at each step (power, product, quotient, chain, and more).
- Optional animated walk-throughs to make tricky ideas click faster.
- Clean LaTeX rendering for notes, homework, and study guides.
How this calculator works
- Type or paste your function (LaTeX like
\sin,\lnworks too). - Press Generate a practice question button to generate the derivative and the full reasoning.
- Review each step to understand which rule was applied and why.
- Practice with similar problems to lock in the method.