2.2 Graphs of Functions
2.2.1 Learning Objectives
By the end of this section, you should be able to:
- identify points on the graph of a function;
- evaluate a function using its graph;
- determine domain and range from a graph;
- graph piecewise-defined, absolute-value, and step functions;
- apply the Vertical Line Test; and
- decide whether an equation defines \(y\) as a function of \(x\).
2.2.2 The Graph of a Function
The graph of a function \(f\) is the set of all ordered pairs
\[ (x,f(x)) \]
for inputs \(x\) in the domain. A point \((a,b)\) lies on the graph exactly when \(b=f(a)\).
A graph provides a visual record of how the output changes as the input changes. To read \(f(a)\), locate \(a\) on the horizontal axis and find the corresponding vertical coordinate on the graph.
Example 2.6 Checking Points on a Graph
Determine whether \((2,5)\) and \((-1,2)\) lie on the graph of
\[ f(x)=x^2+1. \]
Solution
\[ f(2)=2^2+1=5, \]
so \((2,5)\) lies on the graph.
\[ f(-1)=(-1)^2+1=2, \]
so \((-1,2)\) also lies on the graph.
Exercise 2.6 Does \((3,7)\) lie on the graph of \(g(x)=2x+1\)?
Show answer
Answer: Yes, because \(g(3)=2(3)+1=7\).
2.2.3 Domain and Range from a Graph
To determine the domain from a graph, project the graph onto the horizontal axis. To determine the range, project it onto the vertical axis.
Endpoint notation matters:
- a filled point includes the endpoint;
- an open point excludes the endpoint; and
- an arrow shows that the graph continues.
Disconnected pieces can produce unions of intervals in the domain or range.
Example 2.7 Reading Domain and Range from a Description
A graph begins at the filled point \((-3,1)\), rises to \((0,5)\), and ends at the open point \((4,2)\). Its lowest output is \(1\), and its highest output is \(5\), both attained.
Find the domain and range.
Solution
The graph includes \(x=-3\) but excludes \(x=4\), so
\[ \boxed{\text{Domain}=[-3,4)}. \]
The outputs include every value from \(1\) through \(5\), so
\[ \boxed{\text{Range}=[1,5]}. \]
Exercise 2.7 A graph extends indefinitely left and right and has a lowest point at \((2,-4)\). What are its domain and range?
Show answer
Answer:
\[ \text{Domain}=(-\infty,\infty), \qquad \text{Range}=[-4,\infty). \]
2.2.4 Piecewise, Absolute-Value, and Step Graphs
To graph a piecewise-defined function, graph each rule only on the interval where its condition applies. Use an open or filled endpoint according to the inequality in the condition.
The absolute-value function
\[ f(x)=|x| \]
can be written as
\[ |x|= \begin{cases} -x, & x<0,\\ x, & x\ge0. \end{cases} \]
Its graph is V-shaped with vertex at the origin.
A step function remains constant over intervals and changes value by jumps. The greatest-integer function, written \(\lfloor x\rfloor\), gives the greatest integer less than or equal to \(x\).
Example 2.8 Graphing a Piecewise Function
Describe the graph of
\[ p(x)= \begin{cases} x+2, & x<1,\\ 4-x, & x\ge1. \end{cases} \]
Solution
For \(x<1\), graph \(y=x+2\) with an open point at \((1,3)\).
For \(x\ge1\), graph \(y=4-x\) with a filled point at \((1,3)\).
The two pieces meet at \((1,3)\), producing an inverted V-shaped graph.
Exercise 2.8 Evaluate \(\lfloor 3.7\rfloor\) and \(\lfloor-1.2\rfloor\).
Show answer
Answers:
\[ \lfloor3.7\rfloor=3, \qquad \lfloor-1.2\rfloor=-2. \]
2.2.5 The Vertical Line Test
A curve represents \(y\) as a function of \(x\) exactly when every vertical line intersects the curve at most once. This is the Vertical Line Test.
The test reflects the definition of a function: for a fixed input \(x\), there can be no more than one output \(y\).
Example 2.9 Applying the Vertical Line Test
Decide whether each relation defines \(y\) as a function of \(x\):
\[ y=x^2 \]
and
\[ x=y^2. \]
Solution
The parabola \(y=x^2\) passes the Vertical Line Test, so \(y\) is a function of \(x\).
The sideways parabola \(x=y^2\) fails because many vertical lines meet it twice. Solving for \(y\) gives
\[ y=\pm\sqrt{x}, \]
which produces two outputs for each \(x>0\).
Exercise 2.9 Does the circle \(x^2+y^2=16\) define \(y\) as a function of \(x\)?
Show answer
Answer: No. For example, \(x=0\) corresponds to both \(y=4\) and \(y=-4\), so the circle fails the Vertical Line Test.
2.2.6 Equations That Define Functions
An equation in \(x\) and \(y\) may define \(y\) as a function of \(x\), even when it is not initially written as \(y=f(x)\). Solving for \(y\) helps reveal whether each input produces one output.
Example 2.10 Solving an Equation for the Dependent Variable
Does
\[ 3x+2y=12 \]
define \(y\) as a function of \(x\)?
Solution
Solve for \(y\):
\[ 2y=12-3x, \]
\[ y=6-\frac32x. \]
Every real \(x\) produces exactly one value of \(y\), so the equation defines \(y\) as a function of \(x\).
Exercise 2.10 Does \(y^2=x+5\) define \(y\) as a function of \(x\)?
Show answer
Answer: No. Solving gives
\[ y=\pm\sqrt{x+5}, \]
so most permitted inputs have two outputs.
2.2.7 Desmos Graphing Activity
Desmos can help connect formulas with their graphs.
- Graph \(y=|x|\), \(y=x^2\), and \(x=y^2\).
- Use the graphs to compare the Vertical Line Test.
- Graph a piecewise function by entering its rules with restrictions, such as
\[ y=(x+2)\{x<1\} \]
and
\[ y=(4-x)\{x\ge1\}. \]
- Zoom near the joining point to check the endpoint behaviour.
2.2.8 Conceptual Takeaways
- The graph of \(f\) consists of points \((x,f(x))\).
- Domain is read horizontally, while range is read vertically.
- Open and filled endpoints indicate whether boundary values are excluded or included.
- Piecewise functions must be graphed one rule and interval at a time.
- The Vertical Line Test is a graphical version of the one-output requirement.
- Solving an equation for \(y\) can reveal whether it defines a function of \(x\).
2.2.9 Skills You Should Be Able to Do
- Check whether a point lies on a graph.
- Read function values from a graph.
- Determine domain and range graphically.
- Graph piecewise-defined, absolute-value, and step functions.
- Use open and filled endpoints correctly.
- Apply the Vertical Line Test.
- Decide whether an equation defines \(y\) as a function of \(x\).
- Use Desmos to graph restricted relations.
2.2.10 Practice Problems with Solutions
Does \((-2,7)\) lie on the graph of \(f(x)=x^2+3\)?
Show Solution
\[ f(-2)=(-2)^2+3=7. \]
Therefore, \(\boxed{(-2,7)\text{ lies on the graph}}\).
A graph has filled endpoints at \((-4,-1)\) and \((6,5)\) and includes every horizontal and vertical value between them. State its domain and range.
Show Solution
Both endpoints are included:
\[ \boxed{\text{Domain}=[-4,6]}, \qquad \boxed{\text{Range}=[-1,5]}. \]
A graph extends indefinitely in both horizontal directions and has a greatest output of \(9\). State its domain and range.
Show Solution
\[ \boxed{\text{Domain}=(-\infty,\infty)}, \]
\[ \boxed{\text{Range}=(-\infty,9]}. \]
Sketch
\[ f(x)= \begin{cases} 2x+1, & x<0,\\ x^2+1, & x\ge0. \end{cases} \]
Describe the endpoint at \(x=0\).
Show Solution
The line \(y=2x+1\) is used for \(x<0\), so it has an open point at \((0,1)\). The parabola \(y=x^2+1\) is used for \(x\ge0\), so it has a filled point at \((0,1)\). The function value is \(\boxed{f(0)=1}\).
Evaluate \(\lfloor-3.01\rfloor\).
Show Solution
The greatest integer less than or equal to \(-3.01\) is \(-4\). Therefore,
\[ \boxed{\lfloor-3.01\rfloor=-4}. \]
Does \(x^2+y^2=25\) define \(y\) as a function of \(x\)?
Show Solution
Solving for \(y\) gives
\[ y=\pm\sqrt{25-x^2}. \]
For most \(x\) in \((-5,5)\), there are two outputs. The circle therefore \(\boxed{\text{does not define }y\text{ as a function of }x}\).
Does \(2x-5y=20\) define \(y\) as a function of \(x\)? If so, write the function rule.
Show Solution
Solve for \(y\):
\[ -5y=20-2x, \]
\[ y=\frac25x-4. \]
Every real \(x\) produces one output, so
\[ \boxed{f(x)=\frac25x-4}. \]
Use Desmos to graph \(y=\sqrt{x+2}\) and state its domain and range.
Show Solution
The graph begins at \((-2,0)\) and continues to the right and upward. Therefore,
\[ \boxed{\text{Domain}=[-2,\infty)}, \qquad \boxed{\text{Range}=[0,\infty)}. \]