Clear["Global`*"]
reg = ImplicitRegion[ x + k y == 0, {x, y}]
pt = {-((a^2 k)/Sqrt[b^2 + a^2 k^2]), b^2/Sqrt[b^2 + a^2 k^2]}
RegionDistance[reg, pt]
Why is it impossible to find the distance from this point to the straight line?
The known condition is: a > b > 0, and the point is in the first quadrant. k<0
the right answer is:
Clear["Global`*"]
reg = ImplicitRegion[a x + b y + c == 0, {x, y}]
pt = {x0, y0}
RegionDistance[reg, pt]
Why can't the distance formula from a point to a straight line be derived using code?

RegionDistance[ImplicitRegion[x + k y == 0, {x, y}], {p1, p2}]– xzczd Aug 29 '23 at 00:12Simplify[ RegionDistance[reg, {p1, p2}] /. Thread[{p1, p2} -> pt], {a > b > 0, k < 0}]– cvgmt Aug 30 '23 at 01:08Clear["Global`*"] reg = ImplicitRegion[a x + b y + c == 0, {x, y}] pt = {x0, y0} RegionDistance[reg, pt]Why can't the distance formula from a point to a straight line be derived using code? – csn899 Aug 30 '23 at 06:39