Graphs of functions
A graph shows at a glance how a function behaves. This page collects the graphs of the most common functions. Then it shows how to describe a graph, and how to move and reshape a graph you already know, without plotting new points.
A library of basic graphs
These six graphs appear again and again. Learn their shapes. The graph of ${y=\sqrt{x}}$ starts at ${0}$, because ${\sqrt{x}}$ is defined only for ${x\ge 0}$. The graph of ${y=\dfrac{1}{x}}$ has two pieces, because ${x=0}$ is not in its domain.
Increasing and decreasing
Read a graph from left to right, like a sentence:
- ${f}$ is increasing on an interval if the graph rises there: ${f(x_1)<f(x_2)}$ whenever ${x_1<x_2}$.
- ${f}$ is decreasing on an interval if the graph falls there: ${f(x_1)>f(x_2)}$ whenever ${x_1<x_2}$.
- ${f}$ is constant on an interval if the graph is flat there.
We describe these intervals with ${x}$-values, not ${y}$-values.
Example 1: Use the graph of ${f(x)=x^3-3x}$ to find where ${f}$ is increasing and where it is decreasing.
Solution:
The graph turns at ${x=-1}$ and at ${x=1}$. So:
- ${f}$ is increasing on ${(-\infty,-1)}$ and on ${(1,\infty)}$.
- ${f}$ is decreasing on ${(-1,1)}$.
Even and odd functions
Some graphs have symmetry (see coordinates, graphs, and circles). For functions, the two common kinds have names:
Even: ${f(-x)=f(x)}$. The graph is symmetric about the ${y}$-axis.
Odd: ${f(-x)=-f(x)}$. The graph is symmetric about the origin.
For example, ${y=x^2}$ and ${y=|x|}$ are even, and ${y=x^3}$ and ${y=\dfrac{1}{x}}$ are odd. Most functions are neither.
Example 2: Is each function even, odd, or neither?
(a) ${f(x)=x^4-3x^2}$
(b) ${g(x)=x^3+x}$
(c) ${h(x)=x^2+x}$
Solution:
In each case, find the value at ${-x}$, and compare.
(a) Even powers do not change when ${x}$ becomes ${-x}$:
$\begin{align*}&f(-x)\\&=(-x)^4-3(-x)^2\\&=x^4-3x^2=f(x)\end{align*}$
So ${f}$ is even.
(b) Odd powers change sign:
$\begin{align*}&g(-x)\\&=(-x)^3+(-x)\\&=-x^3-x\\&=-(x^3+x)=-g(x)\end{align*}$
So ${g}$ is odd.
(c) ${h(-x)=(-x)^2+(-x)=x^2-x}$.
This is neither ${h(x)=x^2+x}$ nor ${-h(x)=-x^2-x}$. So ${h}$ is neither even nor odd.
Transformations
If you know the graph of ${y=f(x)}$, you can get many other graphs by moving or reshaping it. These changes are called transformations. Let ${c>0}$:
| Equation | Change to the graph of ${y=f(x)}$ |
|---|---|
| ${y=f(x)+c}$ | shift up ${c}$ units |
| ${y=f(x)-c}$ | shift down ${c}$ units |
| ${y=f(x-c)}$ | shift right ${c}$ units |
| ${y=f(x+c)}$ | shift left ${c}$ units |
| ${y=-f(x)}$ | reflect across the ${x}$-axis |
| ${y=f(-x)}$ | reflect across the ${y}$-axis |
| ${y=af(x)}$, ${a>1}$ | stretch vertically by ${a}$ |
| ${y=af(x)}$, ${0<a<1}$ | shrink vertically by ${a}$ |
Shifts
Adding ${c}$ to the output, ${f(x)+c}$, raises every point by ${c}$. That is a vertical shift.
A horizontal shift works the other way from what you might expect. In ${y=f(x-3)}$, the output at ${x=3}$ equals ${f(0)}$. So what happened at ${0}$ now happens at ${3}$: the graph moves right ${3}$.
Watch out: ${y=f(x-3)}$ moves the graph to the right, and ${y=f(x+3)}$ moves it to the left.
Reflections and stretches
Multiplying the output by ${-1}$, as in ${y=-f(x)}$, turns every height into its opposite. The graph flips upside down across the ${x}$-axis. Multiplying by ${a>1}$ makes every height ${a}$ times bigger: a vertical stretch. Multiplying by a number between ${0}$ and ${1}$ is a vertical shrink.
To combine several transformations, a safe order is: horizontal shift first, then stretch or shrink, then reflection, and then vertical shift last.
Example 3: Sketch the graph of ${y=(x+2)^2-3}$.
Solution:
Start with the graph of ${y=x^2}$. The ${+2}$ inside the square moves it ${2}$ to the left. The ${-3}$ outside moves it ${3}$ down. So the lowest point moves from ${(0,0)}$ to ${(-2,-3)}$:
Example 4: Sketch the graph of ${y=-2|x-1|+4}$.
Solution:
Start with ${y=|x|}$, a V with its corner at ${(0,0)}$. Then, in order:
- ${|x-1|}$: shift right ${1}$. The corner moves to ${(1,0)}$.
- ${2|x-1|}$: stretch vertically by ${2}$. The V becomes narrower.
- ${-2|x-1|}$: reflect across the ${x}$-axis. The V opens downward.
- ${-2|x-1|+4}$: shift up ${4}$. The corner moves to ${(1,4)}$.
Check: At ${x=3}$, ${y=-2|2|+4=0}$. At ${x=-1}$, ${y=-2|-2|+4=0}$. So the graph crosses the ${x}$-axis at ${-1}$ and ${3}$.
Summary
- Know the basic graphs: ${x}$, ${x^2}$, ${x^3}$, ${\sqrt{x}}$, ${|x|}$, and ${\dfrac{1}{x}}$.
- Increasing means the graph rises from left to right; decreasing means it falls. Give the intervals in ${x}$-values.
- Even: ${f(-x)=f(x)}$, symmetric about the ${y}$-axis. Odd: ${f(-x)=-f(x)}$, symmetric about the origin.
- ${f(x)+c}$ shifts up, ${f(x-c)}$ shifts right, ${-f(x)}$ reflects across the ${x}$-axis, and ${af(x)}$ stretches by ${a}$ when ${a>1}$.