# Lesson 15

Inverse Functions

• Let’s define functions forward and backward.

### 15.1: What Does It Say?

Here is an encoded message, a message that has been converted into a code.

WRGDB LV D JRRG GDB.

Can you figure out what it says in English? How was the original message encoded?

### 15.2: Caesar Says Shift

1. Now it’s your turn to write a secret code!

1. Write a short and friendly message with 3–4 words.
2. Pick a number from 1 to 10. Then, encode your message by shifting each letter that many steps forward or backward in the alphabet, wrapping around from Z to A as needed.

Consider using this table to create a key for your cipher.

 plain text cipher text A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
3. Give your encoded message to a partner to decode. If requested, give the number you used.
4. Decode the message from your partner. Ask for their number, if needed.
2. Suppose $$m$$ and $$c$$ each represent the position number of a letter in the alphabet, but $$m$$ represents the letters in the original message and $$c$$ the letters in your secret code.

1. Complete the table.

letter in message $$m$$ $$c$$ letter in code 6 9 19 8
2. Use $$m$$ and $$c$$ to write an equation that can be used to encode an original message into your secret code.
3. Use $$m$$ and $$c$$ write an equation that can be used to decode your secret code into the original message.

There are 26 letters in the alphabet, so only the numbers 1–26 make sense for $$m$$ and $$c$$.

1. Try using the equation that you wrote to encode the letters A, B, Y, and Z. Did you end up with position numbers or $$c$$ values that are less than 1 or greater than 26? For which letters?
2. Use your encoding equation to plot the $$(m, c)$$ pairs for all the letters in the alphabet.

3. Look for the points whose $$c$$ value is less than 1 or greater than 26. What letters should they be in the code? Plot the points where they should be according to the rule of your cipher.
4. Did you end up with a graph of a piecewise function? If so, can you describe the different rules that apply to different domains of the function?

### 15.3: U.S. Dollars and Mexican Pesos

An American traveler who is heading to Mexico exchanges some U.S. dollars for Mexican pesos. At the time of his travel, 1 dollar can be exchanged for 19.32 pesos.

At the same time, a Mexican businesswoman who is in the United States is exchanging some Mexican pesos for U.S. dollars at the same exchange rate.

1. Find the amount of money in pesos that the American traveler would get if he exchanged:

1. 100 dollars
2. 500 dollars
2. Write an equation that gives the amount of money in pesos, $$p$$, as a function of the dollar amount, $$d$$, being exchanged.
3. Find the amount that the Mexican businesswoman would get if she exchanged:

1. 1,000 pesos
2. 5,000 pesos
4. Explain why it might be helpful to write the inverse of the function you wrote earlier. Then, write an equation that defines the inverse function.

### Summary

Sometimes it is useful to reverse a function so that the original output is now the input.

Suppose Han lives 400 meters from school and walks to school. A linear function gives Han's distance to school, $$D$$, in meters, after he has walked $$w$$ meters from home, and is defined by:

$$D= 400 - w$$

With this equation, if we know how far Han has walked from home, $$w$$, we can easily find his remaining distance to school, $$D$$. Here, $$w$$ is the input and $$D$$ is the output.

What if we know Han's remaining distance to school, $$D$$, and want to know how far he has walked, $$w$$?

We can find out by solving for $$w$$:

\begin {align} D &= 400 - w\\ D+w &= 400\\ w &=400 - D \end{align}

The equation $$w=400-D$$ represents the inverse of the original function.

With this equation, we can easily find how far Han has walked from home if we know his remaining distance to school. Here, $$w$$ and $$D$$ have switched roles: $$w$$ is now the output and $$D$$ the input.

In general, if a function takes $$a$$ as its input and gives $$b$$ as its output, its inverse function takes $$b$$ as the input and $$a$$ as the output.

### Glossary Entries

• inverse (function)

Two functions are inverses to each other if their input-output pairs are reversed, so that if one function takes $$a$$ as input and gives $$b$$ as an output, then the other function takes $$b$$ as an input and gives $$a$$ as an output.

You can sometimes find an inverse function by reversing the processes that define the first function in order to define the second function.