y = mx + c

Last updated: September 30, 2021  | 

How to plot straight line graphs

Linear equations

Linear equations are equations that are of the first order. Linear equations are straight-line equations that have simple variable expressions with terms and without exponents. If we come across an equation with $$x$$ or $$y$$, it means we deal with a straight-line equation. If the slope of a line and $$y$$-intercept are given, we use the slope-intercept formula to find the equation of the line.

E 3.4: Interpret and obtain the equation of a straight line graph.

The equation of a straight line with gradient $$m$$ and $$y$$ intercept $$c$$ on the $$y-axis$$ is written in the form,


The slope of the line is known as the gradient and is represented by the value of $$m$$.

The point at which the line crosses the $$y$$ axis is known as $$y$$ intercept and if we look at the general equation of line, $$c$$ is the value of $$y$$ intercept.

Worked examples of plotting gradients

Example 1:  A rental company charges a flat fee of $$\$30$$ and an additional $$\$0.25 / \text{mile}$$ to rent a moving van. Construct a linear equation to approximate the cost $$y$$ (in dollars) in terms of $$x$$ that is equal to the number of miles driven. How much will $$75-\text{mile}$$ trip cost?

Step 1: Construct an equation using the values given in the question.

Let the total cost is $$y$$, the flat fee is $$\$30$$, and the additional charges per mile is $$\$0.25 / \text{mile}$$.

If someone travels for $$x\;\text{miles}$$, the additional fee will be $$0.25\times x$$.

Therefore, the equation becomes $$y=0.25x+30$$.

Step 2: Recall the formula for the equation of the straight line.


Step 3: Compare the constructed equation with the general equation of the straight line

We get $$m=0.25$$ and $$c=30$$.

Step 4: Find the value of $$y$$ substituting $$x=75$$ in the equation of the line.

$$y=0.25\times 75 + 30$$

Step 5: Solve further 

$$y=18.75 + 30$$

Step 6: Add the value and find $$y$$.


Thus, the cost of a $$75\; \text{mile}$$ trip is $$\$48.75$$.

Step 7: Use the slope and $$y$$-intercept to graph the equation.

Plotting graph

Try QuickSense for free!

Everything you need to get an A+ in IGCSE, GCSE and O-Level Maths.

Just answer questions and you will get an A - A* - guaranteed