Asked • 03/27/19

How can I find the general form equation of a line from two points?

Given the input: double x1,y1,x2,y2; How can I find the general form equation (double a,b,c where ax + by + c = 0) ? Note: I want to be able to do this computationally. So the equivalent for slope-intercept form would be something like: double dx, dy; double m, b; dx = x2 - x1; dy = y2 - y1; m = dy/dx; b = y1; Obviously, this is very simple, but I haven't been able to find the solution for the general equation form (which is more useful since it can do vertical lines). I already looked in my linear algebra book and two books on computational geometry (both too advanced to explain this).

2 Answers By Expert Tutors

By:

DEVILA T. answered • 03/28/19

Tutor
5.0 (61)

Dedicated and Patient Math tutor

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.