Skip to main content

Graphs of straight lines

A straight line y = mx + c has a gradient m and a y-intercept c. These three lines show a positive gradient, a negative gradient and the line y = x, the mirror line between a function and its inverse.

Every value in the key-features tables is checked by script against the Grapher's own calculations (roots, turning points, asymptotes, domain and range).

Graph of y = x

The straight line through the origin with gradient 1: every point has equal x- and y-coordinates. It is the line of symmetry between a function and its inverse.

Graph of y = x (y = x) drawn on a grid and its key points marked
The graph of y = x. Grey dots mark the intercepts and turning points.

Key features

Domainall real numbers (x ∈ ℝ)
Rangeall real numbers (y ∈ ℝ)
x-intercept(0, 0)
y-intercept(0, 0)
Turning pointsnone
Asymptotesnone
Gradient1
Symmetryodd function: f(−x) = −f(x), rotational symmetry of order 2 about the origin

Reflecting a graph in y = x gives the graph of the inverse function.

How to sketch it

  1. Mark the x-intercept (0, 0), the y-intercept (0, 0).
  2. The domain is every real number, so the curve continues off both sides of your axes.
  3. Check the range: all real numbers (y ∈ ℝ). Your sketch should not go anywhere else.
  4. Use the symmetry: draw the right-hand half and rotate it 180° about the origin.

Graphs made from this one: y = 2x + 1, y = 3 − 2x. Transform it with sliders for a, b, c and d in y = af(b(x − c)) + d.

Graph of y = 2x + 1

A straight line with gradient 2 and y-intercept 1: y goes up 2 for every 1 across.

Graph of y = 2x + 1 (y = 2x + 1) drawn on a grid and its key points marked
The graph of y = 2x + 1. Grey dots mark the intercepts and turning points.

Key features

Domainall real numbers (x ∈ ℝ)
Rangeall real numbers (y ∈ ℝ)
x-intercept(−1/2, 0)
y-intercept(0, 1)
Turning pointsnone
Asymptotesnone
Gradient2
Symmetryneither even nor odd

How to sketch it

  1. Mark the x-intercept (−1/2, 0), the y-intercept (0, 1).
  2. The domain is every real number, so the curve continues off both sides of your axes.
  3. Check the range: all real numbers (y ∈ ℝ). Your sketch should not go anywhere else.

y = 2x + 1 is y = x stretched vertically by scale factor 2, then translated up 1: see the graph of y = x. Transform it with sliders for a, b, c and d in y = af(b(x − c)) + d.

Graph of y = 3 − 2x

A straight line with a negative gradient, −2: y goes down 2 for every 1 across, and it crosses the y-axis at 3.

Graph of y = 3 − 2x (y = 3 - 2x) drawn on a grid and its key points marked
The graph of y = 3 − 2x. Grey dots mark the intercepts and turning points.

Key features

Domainall real numbers (x ∈ ℝ)
Rangeall real numbers (y ∈ ℝ)
x-intercept(3/2, 0)
y-intercept(0, 3)
Turning pointsnone
Asymptotesnone
Gradient−2
Symmetryneither even nor odd

How to sketch it

  1. Mark the x-intercept (3/2, 0), the y-intercept (0, 3).
  2. The domain is every real number, so the curve continues off both sides of your axes.
  3. Check the range: all real numbers (y ∈ ℝ). Your sketch should not go anywhere else.

y = 3 − 2x is y = x reflected in the y-axis, stretched vertically by scale factor 2, then translated up 3: see the graph of y = x. Transform it with sliders for a, b, c and d in y = af(b(x − c)) + d.

Notes and more graphs

Other families of graphs

All graphs of common functions · Graph transformations · Open the Grapher

The Grapher is our own free tool (graph.mathrevision.co.uk), built for IB, A Level and IGCSE students. It is not an exam calculator: practise on your own GDC for calculator papers.