Everything to learn better...



Straight line graphs

Equation of a straight line: y = mx + c

Equation of a straight line: y = mx + c

Select Lesson



Explainer Video

Tutor: Toby


Equation of a straight line: y=mx+cy=mx+c​​

In a nutshell

The equation y=mx+cy=mx+c gives a straight line on a coordinate grid, where mm and ccare constants. It is the equation for almost any straight line, the exception being vertical lines, which have equations of the form x=dx=d where dd is a constant (the xx-intercept).

The components of the equation y=mx+cy=mx+c

mm​ is the value of the gradient of the straight line and cc is the yy-intercept. xx and yycorrespond to coordinates of points on the line. For any point (x,y)(x,y) on the line, multiplying the xx-coordinate by mm and adding cc, gives the yy-coordinate. If this doesn't work, then the point you are using is not actually on the line.

Example 1

Consider the equation of the line below. Does the point (1,5)(-1,-5) sit on this line?


Insert the xx-coordinate 1-1 into the equation of the line to see if the equation then gives the corresponding yy-coordinate:


This is the correct yy-value, therefore:

(1,5)(-1,-5) does sit on the liny=3x2y=3x-2

Example 2

Consider the line with equation below. Does the point (4,9)(4,9) sit on this line?


Insert the xx-coordinate into the equation of the line. If it gives the yy-coordinate, then the point is on the line, if it doesn't, then it is not.


This is not 99, so:  

(4,9)(4,9) is not on the line y=3x2y=3x-2

Note: Point (4,10)(4,10) is, however, on the line.

Different types of lines

​​​​Diagonal lines

Diagonal lines have the equation y=mx+cy=mx+c where mm is the gradient and cc is the yy-intercept.

​​Horizontal lines

Horizontal lines have a gradient of 00, so such a line is just y=cy=c. This is still technically in the form y=mx+cy=mx+c, but mm is equal to 00.​

Vertical lines

Vertical lines don't use the y=mx+cy=mx+c equation. You cannot give mm a value for a vertical line since it is essentially infinity; there is also no value for cc. Instead, a vertical line has the equation x=dx=d where dd is the xx-intercept.

Example 3

By looking at the following equations of lines, decide which are horizontal, which are vertical and which are diagonal.

a) y=6y=6​​
b) y=4x3y=4x-3​​
c) y=7xy=-7x​​
d) x=0x=0​​
e) y=x+2y=x+2​​

Diagonal lines have equations of the form y=mx+cy=mx+c where mm is not zero. Horizontal lines have equations of the form y=cy=c and vertical lines have equations of the form x=dx=d. Importantly, cc and dd are constants, so do not include any xx or yyterms. Thus:

Diagonal lines: bc and e

Horizontal lines: a

Vertical lines: d

Example 4

For each of the diagonal lines in the example above, what is the gradient?

The gradient is mm, which is the number that sits before the xx. The gradients are as follows:

b: 4\underline4

c: 7\underline{-7}

e: 1\underline{1}

Note: In line e, you don't need to write the 11 ahead of the xx​ - it is implied.

Create an account to read the summary


FAQs - Frequently Asked Questions

How do you know if a point is on a line?

What is the equation of a vertical line?

What is the equation of a horizontal line?

What is the equation of a straight line?


I'm Vulpy, your AI study buddy! Let's study together.