# Functions

## Transformation of Functions


### Learning Objectives

1. Identify graphs of basic functions, (IA 3.6.2)
2. Graph quadratic functions using transformations, (IA 9.7.4)

### Objective 1: Identify graphs of basic functions, (IA 3.6.2)

Basic functions have unique shapes, characteristics, and algebraic equations. It will be helpful to recognize and identify these basic or “toolkit functions” in our work in algebra, precalculus and calculus. Remember functions can be represented in many ways including by name, equation, graph, and basic tables of values.

### Practice Makes Perfect

Use a graphing program to help complete the following.  Then, choose three values of x to evaluate for each.  Add the x and y to the table for each exercise.  

### Objective 2:  Graph quadratic functions using transformations (IA 9.7.4)


When we modify basic functions by adding, subtracting, or multiplying constants to the equation, very systematic changes take place. We call these transformations of basic functions. Here we will investigate the effects of vertical shifts, horizontal shifts, vertical stretches or compressions, and reflections on quadratic functions. We could use any basic function to illustrate transformations, but quadratics work nicely because we can easily keep track of a point called the vertex.


### Practice Makes Perfect

The graphs of quadratic functions are called parabolas. Use a graphing program to graph each of the following quadratic functions. For each graph find the vertex (the minimum or maximum value) of the parabola and list its coordinates. Most importantly use the patterns observed to answer each of the given questions.
We all know that a flat mirror enables us to see an accurate image of ourselves and whatever is behind us. When we tilt the mirror, the images we see may shift horizontally or vertically. But what happens when we bend a flexible mirror? Like a carnival funhouse mirror, it presents us with a distorted image of ourselves, stretched or compressed horizontally or vertically. In a similar way, we can distort or transform mathematical functions to better adapt them to describing objects or processes in the real world. In this section, we will take a look at several kinds of transformations.

### Graphing Functions Using Vertical and Horizontal Shifts

Often when given a problem, we try to model the scenario using mathematics in the form of words, tables, graphs, and equations. One method we can employ is to adapt the basic graphs of the toolkit functions to build new models for a given scenario. There are systematic ways to alter functions to construct appropriate models for the problems we are trying to solve.

### Identifying Vertical Shifts

One simple kind of transformation involves shifting the entire graph of a function up, down, right, or left. The simplest shift is a vertical shift, moving the graph up or down, because this transformation involves adding a positive or negative constant to the function. In other words, we add the same constant to the output value of the function regardless of the input. For a function 
   the function 
   is shifted vertically 
   units. See  for an example.
To help you visualize the concept of a vertical shift, consider that 
  Therefore, 
  is equivalent to 
  Every unit of 
  is replaced by 
  so the y-value increases or decreases depending on the value of 
  The result is a shift upward or downward.

### Identifying Horizontal Shifts

We just saw that the vertical shift is a change to the output, or outside, of the function. We will now look at how changes to input, on the inside of the function, change its graph and meaning. A shift to the input results in a movement of the graph of the function left or right in what is known as a horizontal shift, shown in .
For example, if 
  then 
  is a new function. Each input is reduced by 2 prior to squaring the function. The result is that the graph is shifted 2 units to the right, because we would need to increase the prior input by 2 units to yield the same output value as given in 
  

###  Combining Vertical and Horizontal Shifts

Now that we have two transformations, we can combine them. Vertical shifts are outside changes that affect the output (y-) values and shift the function up or down. Horizontal shifts are inside changes that affect the input (x-) values and shift the function left or right. Combining the two types of shifts will cause the graph of a function to shift up or down and left or right.

### Graphing Functions Using Reflections about the Axes

Another transformation that can be applied to a function is a reflection over the x- or y-axis. A vertical reflection reflects a graph vertically across the x-axis, while a horizontal reflection reflects a graph horizontally across the y-axis. The reflections are shown in .
Notice that the vertical reflection produces a new graph that is a mirror image of the base or original graph about the x-axis. The horizontal reflection produces a new graph that is a mirror image of the base or original graph about the y-axis.

### Determining Even and Odd Functions

Some functions exhibit symmetry so that reflections result in the original graph. For example, horizontally reflecting the toolkit functions 
    or 
    will result in the original graph. We say that these types of graphs are symmetric about the y-axis. A function whose graph is symmetric about the y-axis is called an even function.
If the graphs of 
    or 
    were reflected over both axes, the result would be the original graph, as shown in .
We say that these graphs are symmetric about the origin. A function with a graph that is symmetric about the origin is called an odd function.
Note: A function can be neither even nor odd if it does not exhibit either symmetry. For example, 
    is neither even nor odd. Also, the only function that is both even and odd is the constant function 
   
  

### Graphing Functions Using Stretches and Compressions

Adding a constant to the inputs or outputs of a function changed the position of a graph with respect to the axes, but it did not affect the shape of a graph. We now explore the effects of multiplying the inputs or outputs by some quantity.
We can transform the inside (input values) of a function or we can transform the outside (output values) of a function. Each change has a specific effect that can be seen graphically.

###  Vertical Stretches and Compressions 

When we multiply a function by a positive constant, we get a function whose graph is stretched or compressed vertically in relation to the graph of the original function. If the constant is greater than 1, we get a vertical stretch; if the constant is between 0 and 1, we get a vertical compression.  shows a function multiplied by constant factors 2 and 0.5 and the resulting vertical stretch and compression.

###  Horizontal Stretches and Compressions 

Now we consider changes to the inside of a function. When we multiply a function’s input by a positive constant, we get a function whose graph is stretched or compressed horizontally in relation to the graph of the original function. If the constant is between 0 and 1, we get a horizontal stretch; if the constant is greater than 1, we get a horizontal compression of the function.
Given a function 
   the form 
   results in a horizontal stretch or compression. Consider the function 
   Observe . The graph of 
   is a horizontal stretch of the graph of the function 
   by a factor of 2. The graph of 
   is a horizontal compression of the graph of the function 
   by a factor of .

### Performing a Sequence of Transformations

When combining transformations, it is very important to consider the order of the transformations. For example, vertically shifting by 3 and then vertically stretching by 2 does not create the same graph as vertically stretching by 2 and then vertically shifting by 3, because when we shift first, both the original function and the shift get stretched, while only the original function gets stretched when we stretch first.
When we see an expression such as 
  which transformation should we start with? The answer here follows nicely from the order of operations. Given the output value of 
    we first multiply by 2, causing the vertical stretch, and then add 3, causing the vertical shift. In other words, multiplication before addition.
Horizontal transformations are a little trickier to think about. When we write 
    for example, we have to think about how the inputs to the function 
    relate to the inputs to the function 
    Suppose we know 
    What input to 
    would produce that output? In other words, what value of 
    will allow 
    We would need 
    To solve for 
    we would first subtract 3, resulting in a horizontal shift, and then divide by 2, causing a horizontal compression.
This format ends up being very difficult to work with, because it is usually much easier to horizontally stretch a graph before shifting. We can work around this by factoring inside the function.
Let’s work through an example.
We can factor out a 2.
Now we can more clearly observe a horizontal shift to the left 2 units and a horizontal compression. Factoring in this way allows us to horizontally stretch first and then shift horizontally.

### Key Equations


### Key Concepts

1. A function can be shifted vertically by adding a constant to the output. See  and .
2. A function can be shifted horizontally by adding a constant to the input. See , , and .
3. Relating the shift to the context of a problem makes it possible to compare and interpret vertical and horizontal shifts. See .
4. Vertical and horizontal shifts are often combined. See  and .
5. A vertical reflection reflects a graph about the 
  axis. A graph can be reflected vertically by multiplying the output by –1.
6. A horizontal reflection reflects a graph about the 
  axis. A graph can be reflected horizontally by multiplying the input by –1.
7. A graph can be reflected both vertically and horizontally. The order in which the reflections are applied does not affect the final graph. See .
8. A function presented in tabular form can also be reflected by multiplying the values in the input and output rows or columns accordingly. See .
9. A function presented as an equation can be reflected by applying transformations one at a time. See .
10. Even functions are symmetric about the 
  axis, whereas odd functions are symmetric about the origin.
11. Even functions satisfy the condition 
     
 
12. Odd functions satisfy the condition 
     
    
13. A function can be odd, even, or neither. See .
14. A function can be compressed or stretched vertically by multiplying the output by a constant. See , , and .
15. A function can be compressed or stretched horizontally by multiplying the input by a constant. See , , and .
16. The order in which different transformations are applied does affect the final function. Both vertical and horizontal transformations must be applied in the order given. However, a vertical transformation may be combined with a horizontal transformation in any order. See  and .

### Section Exercises


### Verbal


### Algebraic

For the following exercises, write a formula for the function obtained when the graph is shifted as described.
For the following exercises, describe how the graph of the function is a transformation of the graph of the original function 
  
 
For the following exercises, determine the interval(s) on which the function is increasing and decreasing.

### Graphical

For the following exercises, use the graph of 
   shown in  to sketch a graph of each transformation of 
  
 
For the following exercises, sketch a graph of the function as a transformation of the graph of one of the toolkit functions.

### Numeric

For the following exercises, write an equation for each graphed function by using transformations of the graphs of one of the toolkit functions.
For the following exercises, use the graphs of transformations of the square root function to find a formula for each of the functions.
For the following exercises, use the graphs of the transformed toolkit functions to write a formula for each of the resulting functions.
For the following exercises, determine whether the function is odd, even, or neither.
For the following exercises, describe how the graph of each function is a transformation of the graph of the original function 
  
 
For the following exercises, write a formula for the function 
   that results when the graph of a given toolkit function is transformed as described.
For the following exercises, describe how the formula is a transformation of a toolkit function. Then sketch a graph of the transformation.
For the following exercises, use the graph in  to sketch the given transformations.