# Equation of a straight line

Hey
I’m given a problem in which I need to calculate the values for a, b, c where a>0 where the equation for a straight line ax+by-c=0 and this line passes through then points (0,7) and (-2,0).

Here’s what I have got:
ax+by-c=0
by=c-ax therefore when the line crosses at (-2,0) this equation can be arranged as follows 0=c-a(-2)
I have done this for the other coordinates, therefore 0=c-b(7).

At this point I’m lost because I can’t see a possible connection between the two equations. Am I proceeding along the right path, or have I completed got it wrong?

## Answers and Replies

Staff Emeritus
Gold Member
In general if we have two points two points $(x_{1},y_{1})$ and $(x_{2},y_{2})$, we can form an equation which desribes the line which goes through each of these points thus;

$$y - y_{1} = m(x-x_{1})$$

Now you are not given m (gradient), however you can work it out (change in y over change in x) thus;

$$y - y_{1} = \frac{y_{2}-y_{1}}{x_{2}-x_{1}} \cdot (x-x_{1}) \Leftrightarrow \frac{y - y_{1}}{y_{2}-y_{1}} = \frac{x-x_{1}}{x_{2}-x_{1}}$$

~H

Last edited:
benzun_1999
yes, just as hootenanny has told create an equation with the two pts and compare it with the give equation to get a,b,c

Homework Helper
On the other hand, if you don't want to use memorized formulas like that, your method is completely valid.

You need to recognize that the form ax+ by= c, even requiring a> 0, is not unique. If you take any equation of the form ax+ by= c, a> 0, and multiply the equation by any positive number, you get a different equation, of the same "form" for the same line.

From ax+by= c, with x= 0, y= 7 you get 7b= c and with x= -2, y= 0 you get -2a= c, just as you had. Because you know any multiple of a solution is also a multiple, you can choose any one of a, b, c to be any number you choose and solve for the other two! Since a is required to be positive here (and I don't like fractions!) I'm going to take c= -14 (divisible by both 2 and 7 and negative so a= -c/2= 7 is positive). Then a= 7 and b= c/7= -2. The equation of the line through (0,7) and (-2, 0) is 7x- 2y= -14.

thanks for the replies

Nimz
Ax+By=C, A>0 is often called the "standard" form of a line. Personally, I find y=mx+b (slope-intercept form) to be of much greater utility. Usually the slope is either given or can be found using the formula Hootenanny cited. In this particular example, both intercepts are given. b is the y value of the y-intercept. If you aren't given b, you can plug one of the points in for x and y and solve for b.

Once you've gotten the equation in slope-intercept form, you can get it into the form you need here by moving y onto the same side as mx and b. If m is negative, multiply everything by -1. If you don't like fractions, multiply everything by the common denominator.

As you can see, there are many valid ways to arrive at the correct answer.