The equation of a straight line can be given in two main forms:

y = mx + c called the gradient/intercept form e.g.        y = 2x + 3
ax + by + c = 0 called the general form

e.g.        3x + 4y + 6 = 0

 

Lines.jpgThe equation of a straight line can be worked out in several ways depending on the information given about the line.

Equation of line given the gradient and the y-intercept

If the gradient of a line is given and the y-intercept is known, then this information can be substituted into the formula

y = mx + c

where m is the gradient

c is the y-intercept.

The equation can then be simplified into one of the two forms above.

See example

 

Equation of line given the gradient and a point it passes through

If the gradient of a line is given and the coordinates of a point the line passes through are known this information can be substituted into the formula:

y − y1m(x − x1)

where m is the gradient

(x1, y1) is a point on the line.

See example

 

Equation of line given two points it passes through

If two different points that the line passes through are known this information can be substituted into the formula:

Y11_Equation_of_a_Line_01.gif

(x1, y1) is one point on the line and (x2, y2) is another.

See example

An alternative way, rather than use the complicated formula above is to work out the gradient of the line joining the two points and then use the formula y − y1= m(x − x1)

The last two formulas are often given to students in tests and examinations.