Skip to content

Graphs of functions: shapes, intercepts and asymptotes

A graph of a function turns an algebraic rule into a picture. A good sketch shows much more than a collection of plotted points: it shows where the function is positive or negative, where it increases or decreases, whether it crosses an axis, and how it behaves for very large values of x|x|.

This lesson develops the graph recognition and sketching skills used throughout A-level Mathematics. It focuses on extracting the important features from an equation without plotting hundreds of points.

You should be comfortable with:

  • function notation, including the meanings of f(x)f(x), domain and range;
  • solving linear and quadratic equations;
  • factorising polynomials;
  • indices and logarithms;
  • coordinates and the equations of straight lines.

The graph of y=f(x)y=f(x) is the set of all points (x,f(x))(x,f(x)) for allowed values of xx. When sketching it, look for the following features.

FeatureAlgebraic questionMeaning on the graph
yy-interceptWhat is f(0)f(0)?Where the graph meets the yy-axis
xx-interceptsWhere is f(x)=0f(x)=0?The roots, where the graph meets the xx-axis
SignWhere is f(x)>0f(x)>0 or f(x)<0f(x)<0?Whether the graph is above or below the xx-axis
Stationary pointsWhere is f(x)=0f'(x)=0?Usually a local maximum, local minimum or stationary point of inflection
AsymptotesWhich lines does the graph approach?Long-term or near-discontinuity behaviour
End behaviourWhat happens as xx\to\infty and xx\to-\infty?The directions of the ends of the graph
SymmetryIs f(x)=f(x)f(-x)=f(x) or f(x)=f(x)f(-x)=-f(x)?Symmetry about the yy-axis or the origin

A sketch does not need a scale unless the question asks for one, but every known intercept, turning point and asymptote should be labelled.

For most functions, use this order:

  1. State any restrictions on the domain.
  2. Find the intercepts.
  3. Identify asymptotes or discontinuities.
  4. Determine symmetry, if present.
  5. Find stationary points if the necessary calculus is available.
  6. Determine end behaviour.
  7. Join the features with a shape consistent with the function.

The final step matters. A graph is not made by joining special points with straight line segments. Those points constrain the curve, but the equation determines its shape between them.

A polynomial has the form

f(x)=anxn+an1xn1++a1x+a0,f(x)=a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0,

where nn is a non-negative integer. Polynomial graphs are continuous and smooth everywhere. They have no breaks, holes or vertical asymptotes.

For large x|x|, the highest power term anxna_nx^n dominates. Lower power terms become comparatively insignificant.

Degree and leading coefficientAs xx\to-\inftyAs xx\to\infty
Even degree, an>0a_n>0f(x)f(x)\to\inftyf(x)f(x)\to\infty
Even degree, an<0a_n<0f(x)f(x)\to-\inftyf(x)f(x)\to-\infty
Odd degree, an>0a_n>0f(x)f(x)\to-\inftyf(x)f(x)\to\infty
Odd degree, an<0a_n<0f(x)f(x)\to\inftyf(x)f(x)\to-\infty

For example, 2x4+7x1-2x^4+7x-1 has both ends pointing down because its leading term is 2x4-2x^4. You do not need to know its roots to determine this.

Suppose a polynomial contains a factor (xa)m(x-a)^m. Then x=ax=a is a root of multiplicity mm.

  • If mm is odd, the graph crosses the xx-axis at x=ax=a.
  • If mm is even, the graph touches the xx-axis and turns around at x=ax=a.

For higher multiplicities, the graph becomes flatter near the root. The distinction between crossing and touching is determined by whether the multiplicity is odd or even.

Worked example 1: sketch a cubic from its factors

Section titled “Worked example 1: sketch a cubic from its factors”

Sketch

y=(x+2)(x1)2.y=(x+2)(x-1)^2.

Step 1: find the roots.

(x+2)(x1)2=0(x+2)(x-1)^2=0

gives x=2x=-2 and x=1x=1.

The root x=2x=-2 has multiplicity 11, so the graph crosses there. The root x=1x=1 has multiplicity 22, so the graph touches the axis and turns there.

Step 2: find the yy-intercept.

y=(0+2)(01)2=2.y=(0+2)(0-1)^2=2.

The graph passes through (0,2)(0,2).

Step 3: determine the ends.

The leading term is xx2=x3x\cdot x^2=x^3. Therefore

y as x,y as x.y\to-\infty\text{ as }x\to-\infty, \qquad y\to\infty\text{ as }x\to\infty.

Step 4: combine the information.

The curve rises from the bottom left, crosses at (2,0)(-2,0), passes through (0,2)(0,2), falls to touch at (1,0)(1,0), then rises towards the top right.

Notice that the factorised form reveals the roots and their behaviour immediately. Expanding first would hide the most useful information.

Without expanding, describe the key features of

y=(x+1)2(x3).y=-(x+1)^2(x-3).
Answer

The roots are x=1x=-1 and x=3x=3. The graph touches the axis at x=1x=-1 because that root has even multiplicity, and crosses at x=3x=3 because that root has odd multiplicity. The yy-intercept is

y=(1)2(3)=3.y=-(1)^2(-3)=3.

The leading term is x3-x^3, so the graph rises to the left and falls to the right.

The basic reciprocal function is

y=1x.y=\frac{1}{x}.

It is undefined at x=0x=0, so x=0x=0 is a vertical asymptote. Also,

1x0\frac{1}{x}\to0

as xx\to\infty or xx\to-\infty, so y=0y=0 is a horizontal asymptote. The graph has one branch in quadrant I and one in quadrant III.

An asymptote is a line that the graph approaches. It is not automatically a line that the graph can never cross. For example, a rational graph can cross a horizontal asymptote at a finite value of xx.

The form axb+c\boldsymbol{\frac{a}{x-b}+c}

Section titled “The form ax−b+c\boldsymbol{\frac{a}{x-b}+c}x−ba​+c”

For

y=axb+c,y=\frac{a}{x-b}+c,

the asymptotes are

x=bandy=c.x=b \qquad\text{and}\qquad y=c.

Their intersection (b,c)(b,c) is the centre of the graph. If a>0a>0, the branches lie above-right and below-left of the centre. If a<0a<0, they lie above-left and below-right.

Worked example 2: a translated reciprocal graph

Section titled “Worked example 2: a translated reciprocal graph”

Sketch

y=6x21.y=\frac{6}{x-2}-1.

Asymptotes:

x=2,y=1.x=2, \qquad y=-1.

yy-intercept: set x=0x=0.

y=621=4,y=\frac{6}{-2}-1=-4,

so the graph passes through (0,4)(0,-4).

xx-intercept: set y=0y=0.

0=6x210=\frac{6}{x-2}-1 1=6x21=\frac{6}{x-2} x2=6x-2=6 x=8.x=8.

Since 6>06>0, the branches occupy the above-right and below-left regions relative to the centre (2,1)(2,-1). Draw the asymptotes first as dashed lines, plot (0,4)(0,-4) and (8,0)(8,0), then draw two smooth branches approaching the asymptotes.

Finding asymptotes from a rational expression

Section titled “Finding asymptotes from a rational expression”

Consider

f(x)=2x+1x3.f(x)=\frac{2x+1}{x-3}.

The denominator is zero at x=3x=3, while the numerator is not, so x=3x=3 is a vertical asymptote. Divide or rearrange:

2x+1=2(x3)+7,2x+1=2(x-3)+7,

so

f(x)=2+7x3.f(x)=2+\frac{7}{x-3}.

Therefore y=2y=2 is the horizontal asymptote.

Be careful if a factor cancels. For example,

(x2)(x+1)x2=x+1,x2.\frac{(x-2)(x+1)}{x-2}=x+1, \qquad x\ne2.

This is the straight line y=x+1y=x+1 with a missing point at (2,3)(2,3), not a graph with a vertical asymptote at x=2x=2.

The graph of y=1x2\boldsymbol{y=\frac{1}{x^2}}

Section titled “The graph of y=1x2\boldsymbol{y=\frac{1}{x^2}}y=x21​”

For every x0x\ne0,

1x2>0.\frac{1}{x^2}>0.

Both branches therefore lie above the xx-axis. The function is even because

f(x)=1(x)2=1x2=f(x),f(-x)=\frac{1}{(-x)^2}=\frac{1}{x^2}=f(x),

so its graph is symmetric about the yy-axis. Its asymptotes are still x=0x=0 and y=0y=0.

This contrasts with y=1/xy=1/x, which is an odd function and has rotational symmetry about the origin.

For a>0a>0 and a1a\ne1, the exponential function is

y=ax.y=a^x.

Every such graph passes through (0,1)(0,1) because a0=1a^0=1. Its values are always positive, so its range is y>0y>0, and y=0y=0 is a horizontal asymptote.

  • If a>1a>1, the function is increasing.
  • If 0<a<10<a<1, the function is decreasing.

Worked example 3: compare growth and decay

Section titled “Worked example 3: compare growth and decay”

For y=2xy=2^x:

22=14,21=12,20=1,21=2,22=4.2^{-2}=\frac14, \quad 2^{-1}=\frac12, \quad 2^0=1, \quad 2^1=2, \quad 2^2=4.

The graph increases and approaches y=0y=0 as xx\to-\infty.

For y=(1/2)x=2xy=(1/2)^x=2^{-x}, the same values appear in reverse order. Its graph decreases and approaches y=0y=0 as xx\to\infty.

Neither graph meets the xx-axis. Writing a very small positive value as zero on a calculator display does not create an algebraic root.

The logarithmic function

y=logaxy=\log_a x

is the inverse of y=axy=a^x. Therefore its graph is the reflection of y=axy=a^x in the line y=xy=x.

Its defining relationship is

y=logaxay=x.y=\log_a x \quad\Longleftrightarrow\quad a^y=x.

Important features are:

  • domain x>0x>0;
  • range all real numbers;
  • vertical asymptote x=0x=0;
  • xx-intercept (1,0)(1,0) because loga1=0\log_a1=0;
  • the point (a,1)(a,1) because logaa=1\log_a a=1.

There is no yy-intercept because x=0x=0 is outside the domain.

The graph of y=3xy=3^x contains the points

(1,13),(0,1),(1,3).(-1,\tfrac13),\quad (0,1),\quad (1,3).

Reflecting in y=xy=x swaps each point’s coordinates, so y=log3xy=\log_3x contains

(13,1),(1,0),(3,1).(\tfrac13,-1),\quad (1,0),\quad (3,1).

This coordinate swap is a useful check whenever two functions are inverses.

The modulus u|u| is the non-negative size of uu:

u={u,u0,u,u<0.|u|= \begin{cases} u, & u\ge0,\\ -u, & u<0. \end{cases}

Two superficially similar graph operations have different effects.

Outside the function: y=f(x)\boldsymbol{y=|f(x)|}

Section titled “Outside the function: y=∣f(x)∣\boldsymbol{y=|f(x)|}y=∣f(x)∣”

Any part of y=f(x)y=f(x) below the xx-axis is reflected above the xx-axis. Parts already on or above the axis remain unchanged. The resulting range is non-negative.

Inside the function: y=f(x)\boldsymbol{y=f(|x|)}

Section titled “Inside the function: y=f(∣x∣)\boldsymbol{y=f(|x|)}y=f(∣x∣)”

Keep the part of y=f(x)y=f(x) for x0x\ge0, then reflect that half in the yy-axis. The original left half is discarded. The result is always an even function.

Worked example 5: distinguish the two modulus graphs

Section titled “Worked example 5: distinguish the two modulus graphs”

Let

f(x)=x2.f(x)=x-2.

Then

f(x)=x2|f(x)|=|x-2|

has a V-shaped graph with vertex (2,0)(2,0).

In contrast,

f(x)=x2f(|x|)=|x|-2

has vertex (0,2)(0,-2) and roots x=2x=-2 and x=2x=2.

The notation tells you which coordinates are altered. An outside modulus changes negative output values, while an inside modulus changes the input before the function acts.

Symmetry can reduce the work needed to sketch a graph.

If

f(x)=f(x),f(-x)=f(x),

then ff is even and its graph is symmetric about the yy-axis. Examples include x2x^2, x4+3x2x^4+3x^2 and cosx\cos x.

If

f(x)=f(x),f(-x)=-f(x),

then ff is odd and its graph has rotational symmetry of 180180^\circ about the origin. Examples include x3x^3, x52xx^5-2x and sinx\sin x.

Worked example 6: test symmetry algebraically

Section titled “Worked example 6: test symmetry algebraically”

Let

f(x)=x43x2+2.f(x)=x^4-3x^2+2.

Then

f(x)=(x)43(x)2+2=x43x2+2=f(x).f(-x)=(-x)^4-3(-x)^2+2=x^4-3x^2+2=f(x).

The function is even.

Now let

g(x)=x3+2x.g(x)=x^3+2x.

Then

g(x)=(x)3+2(x)=x32x=g(x).g(-x)=(-x)^3+2(-x)=-x^3-2x=-g(x).

The function is odd.

A function can be neither even nor odd. Do not decide from one or two plotted points: apply the algebraic test to the whole expression.

The solutions of

f(x)=g(x)f(x)=g(x)

are the xx-coordinates where the graphs y=f(x)y=f(x) and y=g(x)y=g(x) intersect.

Similarly, the solutions of f(x)=kf(x)=k are where y=f(x)y=f(x) meets the horizontal line y=ky=k.

Worked example 7: count solutions without solving exactly

Section titled “Worked example 7: count solutions without solving exactly”

How many real solutions does

x2=2xx^2=2^x

have?

Sketch y=x2y=x^2 and y=2xy=2^x on the same axes. Some intersections can be identified exactly:

x=2:x2=4=22,x=2: \quad x^2=4=2^2, x=4:x2=16=24.x=4: \quad x^2=16=2^4.

There is also one negative intersection because x2x^2 grows large as xx\to-\infty, while 2x02^x\to0, but at x=0x=0 we have x2=0<1=2xx^2=0<1=2^x. Therefore there are three real solutions in total.

The graph gives the number and approximate location of solutions even when an equation cannot be rearranged into a familiar exact form.

”A root and a yy-intercept are the same”

Section titled “”A root and a yyy-intercept are the same””

A root has y=0y=0 and lies on the xx-axis. The yy-intercept has x=0x=0. They coincide only at the origin.

Some graphs cross horizontal or oblique asymptotes and some do not. A vertical asymptote describes unbounded behaviour near a forbidden input. Check the function rather than relying on a slogan.

”A repeated root always crosses the axis”

Section titled “”A repeated root always crosses the axis””

Odd multiplicity roots cross. Even multiplicity roots touch and turn. The parity of the multiplicity is the deciding feature.

”A sketch should be made by plotting many decimal points”

Section titled “”A sketch should be made by plotting many decimal points””

A table of values can help, but it can miss roots, turning points and behaviour near asymptotes. Find exact structural features first, then use selected points only to confirm the shape.

”The graph ends at the edge of the axes”

Section titled “”The graph ends at the edge of the axes””

The edge of a drawing is not part of the function. Use arrows or clear end behaviour to show that the curve continues.

For

f(x)=(x4)2(x+1),f(x)=(x-4)^2(x+1),

state the intercepts, describe the behaviour at each root, and give the end behaviour.

Find the asymptotes and intercepts of

y=3x2x+1.y=\frac{3x-2}{x+1}.

The point (2,5)(2,5) lies on y=f(x)y=f(x). State a corresponding point on each graph:

  1. y=f(x)y=|f(x)|;
  2. y=f(x)y=f(|x|);
  3. y=f1(x)y=f^{-1}(x), assuming the inverse exists.

Determine whether

h(x)=x54x3+xh(x)=x^5-4x^3+x

is even, odd or neither.

Answers

1. The roots are x=4x=4 and x=1x=-1. The graph touches and turns at (4,0)(4,0) because x=4x=4 is a repeated root, and crosses at (1,0)(-1,0). The yy-intercept is

f(0)=(4)2(1)=16.f(0)=(-4)^2(1)=16.

The leading term is x3x^3, so f(x)f(x)\to-\infty as xx\to-\infty and f(x)f(x)\to\infty as xx\to\infty.

2. Rearrange by division:

3x2x+1=35x+1.\frac{3x-2}{x+1}=3-\frac{5}{x+1}.

The asymptotes are x=1x=-1 and y=3y=3. The xx-intercept is (2/3,0)(2/3,0) and the yy-intercept is (0,2)(0,-2).

3. The point (2,5)(2,5) remains (2,5)(2,5) on y=f(x)y=|f(x)| because its output is already positive. It remains (2,5)(2,5) on y=f(x)y=f(|x|) and is mirrored to (2,5)(-2,5). On the inverse graph, its corresponding point is (5,2)(5,2).

4.

h(x)=(x)54(x)3+(x)=x5+4x3x=h(x),h(-x)=(-x)^5-4(-x)^3+(-x)=-x^5+4x^3-x=-h(x),

so hh is odd.

When you sketch a function graph, check that you have:

  • used the correct domain;
  • labelled exact intercepts where possible;
  • distinguished crossing roots from touching roots;
  • drawn and labelled any asymptotes;
  • shown the correct end behaviour;
  • respected symmetry;
  • drawn a smooth curve where the function is smooth;
  • included enough information for the sketch to be unambiguous.