Perpendicular distance of a
point from a line

show line

show point

show perpendicular

show distance

d=\frac{|ax_1+by_1+c|}{\sqrt{a^2+b^2}}

show formula

a = 3 (slider from -5 to 5, step 0.5)
b = -4 (slider from -5 to 5, step 0.5)
c = -1 (slider from -10 to 10, step 0.5)
e: a * x + b * y + c = 0.0
x1 = 4 (slider from -5 to 5, step 1)
y1 = -3 (slider from -5 to 5, step 1)
P: (x1, y1)
d = OrthogonalLine(P, e)
A = Intersect(e, d)
f = Segment(A, P)
α = Angle(e, f)
g = true
h = true
i = true
j = true
text3: "d=\frac{|(" + a + ")(" + x1 + ")+(" + b + ")(" + y1 + ")+(" + c + ")|}{\sqrt{" + a + "^2+" + b + "^2}}"
text4: "d=\frac{|" + (a * x1) + "+" + (b * y1) + "+" + c + "|}{\sqrt{" + (a^(2.0) + b^(2.0)) + "}}"
text6: "d=" + (abs(a * x1 + b * y1 + c) / (a^(2.0) + b^(2.0))^(1.0 / 2.0))
text5: "d=\frac{" + (abs(a * x1 + b * y1 + c)) + "}{" + ((a^(2.0) + b^(2.0))^(1.0 / 2.0)) + "}"
k = true