Graphing#

Equations for a Line#

Slope-Intercept Form#

The equation of the line with slope \(m\) and \(y\)-intercept equal to \(b\) is

\[ \boxed{y = mx + b} \]
../_images/ca117808356ac9b40e6147ed9632d003f4e4cbcf0754327f8005018a932f18f5.svg
Long Text Description

There is a horizontal x-axis with no points marked. There is a vertical y-axis with the point b marked. The graph of the linear function y=mx+b is plotted on these axes. It crosses the y-axis at the point y=b.

Point-Slope Form#

The equation of the line with slope \(m\) that goes through the point \((a,b)\) is

\[ \boxed{y - b = m(x-a)} \]
../_images/d0a906e1fbcafd99b9f888d3e679ce05bdb37096c9e59f2b8843eaa65da6fbf2.svg
Long Text Description

There is a horizontal x-axis with no points marked. There is a vertical y-axis with no points marked. The line defined by y-b = m(x-a) is plotted on these axes. The point (x,y) = (a,b) on the line is marked.

Recall that a positive slope means that the line goes up from left-to-right and a negative slope means that the line goes down from left-to-right.

Example 1#

Sketch the graph of the line defined by \(y = 2x + 3\).

Step 1: Determine slope and \(y\)-intercept

Since \(y=2x+3\) is in slope-intercept form, the line has slope \(2\) and a \(y\)-intercept of \(3\).

Once we know slope and \(y\)-intercept, we can draw the graph.

../_images/260352374e99474b0373da3a4c7a3a788244f3404067ceaa84a6506ee3cfc4de.svg
Long Text Description

There is a horizontal x-axis with the points -3 and 3 marked. There is a vertical y-axis with the points -3, 3, and 6 marked. There is a grid with one unit by one unit cells in the background. The graph of the linear function y = 2x + 3 is plotted. There is a red dotted staircase pattern which meets the linear function at the point (-3,3) and moves to the right by one unit, and then up by two units in a repeating pattern which ends at the point (2,7).

Note that the red dashed lined is not part of the graph and is used only as a guide for drawing a line with slope 2. In particular, in order for a line to have slope equal to \(2\), if the \(x\)-coordinate of any point on the line is increased by 1 unit, then the \(y\)-coordinate must be increased by 2 units.

Example 2#

Sketch the graph of the line defined by \(y - 3 = -2(x - 4)\).

Step 1: Determine the slope and a point on the line.

Since \(y - 3 = -2(x - 4)\) is in point-slope form, the line has slope \(-2\) and goes through the point \((4,3)\).

Now draw a graph with slope \(-2\) that goes through the point \((4,3)\).

../_images/ad33e49bdd927c3ef52e10777d2279679c2301cdbf8bfa61ccd8d28403fd85a6.svg
Long Text Description

There is a horizontal x-axis with the points 2 and 4 marked. There is a vertical y-axis with the points 3, 6, 9, and 12 marked. There is a grid with one unit by one unit cells in the background. The line defined by y-3 = -2(x-4) is plotted. There is a red dotted staircase pattern which meets the line at the point (-1,13) and moves to the right by one unit, and then down by two units in a repeating pattern which ends at the point (6,-1).

In order for a line to have slope equal to \(-2\), if the \(x\)-coordinate of any point on the line is increased by 1 unit, then the \(y\)-coordinate must be decreased by 2 units.

Example 3#

Sketch the graph of the line defined by \(y - 1 = \dfrac{2}{5}(x + 2)\).

Step 1: Determine the slope and a point on the line.

Since \(y - 1 = \frac{2}{5}(x + 2)\) is in point-slope form, the line has slope \(2/5\) and goes through the point \((-2,1)\).

Draw the line with slope equal to \(2/5\) that goes through the point \((-2,1)\)

../_images/70ef5918874428725d9ffea86849b3354d5b3dac6e3de4b77e8bdde6d9168150.svg
Long Text Description

There is a horizontal x-axis with the points -6, -4, -2, 2, 4, 6, and 8 marked. There is a vertical y-axis with the points -2, 2, and 4 marked. There is a grid with one unit by one unit cells in the background. The line defined by y-1 = (2/5)(x+2) is plotted. There is a red dotted staircase pattern which meets the linear function at the point (-7,-1) and moves to the right by five units, and then up by two units in a repeating pattern which ends at the point (8,5).

In order for a line to have slope equal to \(2/5\), if the \(x\)-coordinate of any point on the line is increased by 5 units, then the \(y\)-coordinate must be increased by 2 units.

Graphing Quadratic Polynomials#

The general form of a quadratic polynomial (i.e., a polynomial of degree two) is

\[y = ax^2 + bx + c\]

where \(a\), \(b\), and \(c\) are real numbers and \(a\neq 0\). The graph of a quadratic polynomial has the shape of a parabola. If \(a>0\), then the parabola opens upward (i.e., looks like the letter ``U’’) and if \(a<0\), then the parabola opens downward.

Example 4#

Compare the graphs of \(y = x^2\) and \(y=-x^2\).

../_images/bd5533437e14efc14ff8b4f64c1479bf69428cb31961ae6274eac1db472ca134.svg
Long Text Description

There is a horizontal x-axis with the points -2 and 2 marked. There is a vertical y-axis with the points 2 and 4 marked. There is a grid of one unit by one unit cells in the background. The concave up quadratic function y = x squared is graphed on these axes, resembling a horseshoe shape. The function is decreasing as it comes from the left to x=0, meets the y-axis at (0,0), and increases as it goes off to the right.

../_images/287520d5e6df027a4469a4b4203c2b042e175a16a4d4983ba2f52aba21bd573f.svg
Long Text Description

There is a horizontal x-axis with the points -2 and 2 marked. There is a vertical y-axis with the points -2 and -4 marked. There is a grid of one unit by one unit cells in the background. The concave down quadratic function y = -x squared is graphed on these axes, resembling a horseshoe shape. The function is increasing as it comes from the left to x=0, meets the y-axis at (0,0), and decreases as it goes off to the right.

Notice how the graph of \(y=x^2\) is a parabola that goes through the point \((0,0)\) and opens upward while the graph of \(y=-x^2\) is a parabola that also goes through the point \((0,0)\) but opens downward.

Example 5#

Compare the graphs of \(y=x^2-4\) and \(y=4-x^2\)

../_images/5eedffa253114ff40de5a16961a92eb5d55d5e7b6fcb4bda29667182f5c8dd1f.svg
Long Text Description

There is a horizontal x-axis with the points -3, -1, 1 and 3 marked. There is a vertical y-axis with the points -2 and -4 marked. There is a grid of one unit by one unit cells in the background. The concave up quadratic function y = x squared - 4 is graphed on these axes. The function is decreasing as it comes from the left to x=0, meets the y-axis at (0,-4), and increases as it goes off to the right.

../_images/682246065f814627050f713d7431d47ba54b33259b19746d1af3a140678c8605.svg
Long Text Description

There is a horizontal x-axis with the points -3, -1, 1 and 3 marked. There is a vertical y-axis with the points 2 and 4 marked. There is a grid of one unit by one unit cells in the background. The concave down quadratic function y = -x squared + 4 is graphed on these axes. The function is increasing as it comes from the left to x=0, meets the y-axis at (0,4), and decreases as it goes off to the right.

Notice how the graph of \(y=x^2-4\) looks like the graph of \(y=x^2\) with each point shifted down \(4\) units. Also, the graph of \(y=4-x^2\) looks like the graph of \(y=-x^2\) with each point shifted up \(4\) units.

Example 6#

Sketch the graph of \(f(x) = x^2 - 4x -12\).

Step 1:   Determine the   \(y\)-intercept by evaluating   \(f(0)\).
\[\begin{align*} f(0) &= 0^2 - 4(0) - 12 \\ &= -12 \end{align*}\]

Therefore the graph of \(y=f(x)\) goes through the point \((0,-12)\).

Step 2:   Determine the   \(x\)-intercepts by setting   \(f(x)=0\)   and solving for   \(x\).

Recall from Factoring, Example 8 and Solving Equations, Example 1 that

\[x^2 - 4x - 12 = (x+2)(x-6)\]

Now set each factor equal to zero and solve for \(x\).

\[\begin{align*} x + 2 = 0 ~~~~&\Rightarrow~~~~ x = -2 \\ x - 6 = 0 ~~~~&\Rightarrow~~~~ x = 6 \end{align*}\]

Therefore the graph of \(y=f(x)\) goes through the points \((-2,0)\) and \((6,0)\).

Draw the graph of a parabola that opens upward (since the coefficient of \(x^2\) in \(f(x)\) is positive) and goes through the points found in Steps 1 and 2.

../_images/9186f5ccf7de7798d1dd8922b87cbfff87265fe9a7d174bdb827ea5af32e1fc0.svg
Long Text Description

There is a horizontal x-axis with the points -3, 3, 6 and 9 marked. There is a vertical y-axis with the points -12 marked. There is a grid of one unit by two unit cells in the background. The concave up quadratic function y = x squared - 4x - 12 is graphed on these axes. The function is decreasing as it comes from the left to x=2 and increases as it goes off to the right. The function meets the y-axis at the point (0,-12) and meets the x-axis at the points (-3,0) and (6,0).

Graphing Power and Root Functions#

Any function of the form

\[y = x^r\]

where \(r\) is any real number is called a power function. Thus \(x^2\), \(x^3\), \(x^4\), etc. are examples of power functions. Root functions, like the square root (i.e., \(\sqrt{x}\) or \(x^{1/2}\)) and cube root (i.e., \(\sqrt[3]{x}\) or \(x^{1/3}\)) are also examples of power functions

Example 7#

Sketch the graph of \(y = x^3\).

../_images/f5e7c187969c06524d47dc3d4768f8b3359e60e9a8ee19eb32e55c913224c515.svg
Long Text Description

There is a horizontal x-axis with the points -2, -1, 1 and 2 marked. There is a vertical y-axis with the points -3, -2, -1, 1, 2, and 3 marked. There is a grid of one unit by one unit cells in the background. The cubic function y = x cubed is graphed on these axes. The function is increasing and concave down as it comes from the left to x=0, meets the y-axis at (0,0), and is increasing and concave up as it goes off to the right.

Notice how the graph of \(y=x^3\) always increases from left-to-right and looks like a horizontal line as it goes through the origin.

Example 8#

Sketch the graph of the square root function, \(y = \sqrt{x}\).

../_images/4cb113d44053fdec4565aa907bdc5bf160ca50f2f9f03377e7586df87ff36b8d.svg
Long Text Description

There is a horizontal x-axis with the points 1, 2, 3, 4, 5, 6, 7, 8, and 9 marked. There is a vertical y-axis with the points 1, 2, and 3 marked. There is a grid of one unit by one unit cells in the background. The increasing concave down function y = square root x is graphed on these axes. The graph begins at (0,0).

Notice how the graph of \(y=\sqrt{x}\) looks like the upper half of a parabola that opens to the right.