Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hey if i wanted to get a linear function how would i do it? Im being shown an example and the results are supposedly:

x   3x+5
-2  -1
-1  2
0   5
1   8
2   11

But i cant figure out how to get it. The equation is $f(x) = 3x + 5.$

And i need to plot it on the graph. Can anyone help?

share|cite|improve this question
up vote 2 down vote accepted

The general equation for a straight line in Cartesian co-ordinates is $y=mx+c$, where $m$ is the gradient of the straight line and $c$ is the y-intercept of the line.

In the case of your line $f(x)$, you have $m=3$, $c=5$. So you have a straight line which passes through the point $(0,5)$ and has gradient $3$, this means you can plot a graph like that shown below (note we can calculate the x-intercept as $(\frac{5}{3},0)$ by setting $f(x)=0$):

Graph of f(x)

Hope this helps!

share|cite|improve this answer

As Shaktal points out "The general equation for a straight line in Cartesian co-ordinates is y=mx+c, where m is the gradient of the straight line and c is the y-intercept of the line."

So you need to find the gradient or slope 'm' and the y-interecpt 'c', in other words the value of y where x=0.

To find the gradient, since the equation is linear, you can take any two points (a, b) and (c, d) and calculate


Then once you have that number m, you can take any point (x, y) and write y=mx+c. Then you can figure out the value of c such that this equation holds true.

As an example say you have (1, 4) and (2, 10) as the points for which you want to find a linear equation. m=(6/1)=6. Then considering (2, 10) we can write 10=(6)(2)+c or 10=12+c. So, c=-2, and our linear equation reads y=6x-2.

If you hand-plot the points, draw out your co-ordinate system, plot the points, and then connect them with a ruler or straight edge.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.