Tuesday, October 11, 2016

understanding transformed functions with arrows

I am taking a stroll down memory lane, helping a student with "Grade 11 Functions" (Ontario, MCR3U). An early topic is "introduction to functions." Here is a sample question that students are answering by the end of the unit:

I find that questions like this, and many others, are best answered by drawing simple arrow diagrams. Here's what we would draw in this case:

Which gives us the image point as (-5/4, 10).

Look interesting? You can start using these diagrams pretty quickly, after getting used to a few things.

basic arrows
We can write basic operations between two variables as an arrow diagram. For example b = a + 2 can be written like this:

This is instructing us: when you follow the arrow to get a b from an a, you add 2.
Other operations are similar, for example y = 5x:

The letters at the beginning and end of the arrows are just placeholders here - in this context they don't have to mean much. Just as you can choose any letters to represent the variables in the equations, you can choose any letters in the arrow diagrams, at least when you are using them in this informal conceptual way.  You could make these diagrams work leaving the letters out completely, but I like having them there, since they make these diagrams resemble other more grown up arrow diagrams, where the start and end of the arrows matter more and the letters mean something.

You can also use arrows to represent functions. In grade 11, students are just learning about the notation y = f(x), the arrow diagram reminds them that f is a rule that for every x a y is produced.

One thing to note here: to some people, arrow diagrams like this look backwards when compared with how we write functions inline as  y = f(x). When we use the function notation, the input is on the right (inside the f) and the output is on the left, but most times we draw the arrows left-to-right, with output (X) on the left and output () on the right. Although this is can sometimes cause confusion early on, I think this is just a healthy bit of cognitive dissonance, and helps to shake us out of the common mistake of seeing f as something that you are multiplying x by, and other natural errors that come up in reading function notation. Translating from function notation to arrow notation is not too tricky, but just tricky enough to make us think more about what is  happening.

evaluating arrows
We can add information about what happens to a particular value when it interacts with an arrow.

In the diagram above, the input is given as 3, and the output is unknown. The output is the operation of the arrow applied to the input - in this case "times 4" applied to 3, giving us 12.

Suppose we know that the point (-1, 7) is an element of f . This allows us to evaluate the arrow diagram below, since we know what value f will produce when 0 is provided as input. So, if we are presented with a diagram like this:
We can complete it:

Sometimes we may have a formula for the function that we are representing as an arrow.

So, here we could put in any value for x, and use the definition of the function we are given to find the y value. For example, we can put in -10:

backwards evaluation
In some cases we can evaluate arrows in a backwards direction.
What value would produce 10 under the +4 arrow?  It must be 6.

We can't always do this. If an arrow represents a function or operation for which different inputs can produce the same output, then we can't travel backwards along it. We can only travel backwards for all values along invertable functions.

chaining arrows
We can chain together arrows, and evaluate the chain.

As mentioned above, the letters here don't have a lot of meaning at this point. Each one is a placeholder representing "things that can go in" and "things that can come out" of the arrow - if you wanted to be more precise, you could use these to represent the specific sets that are involved. The letter at the start of the arrow would represent the domain, and the letter at the end would represent a set containing the range (officially, it represents something called the co-domain).

We could just use dots, or any other symbol - the values we get following the arrows are the same:

using arrows to describe and evaluate transformed functions
Drawing the arrow diagrams for a transformed function is a good exercise in unpacking the function notation. Suppose we have a function g(x), that is defined in terms of some other function f(x), like this: g(x) = 2f(x) +1. We could write g as a diagram of chained arrows that includes f.

In the diagram I used Y's for the last three positions, simply because I think of the "times 2" and "plus 1" as "things I do to the y value after it comes out of f" but as noted above, you can use other symbols. Suppose we know that f(1) = 2; we can evaluate g(1) by following the chain of arrows:

Suppose a function h is defined by h(x) = f(3(x-1)). We could write this using arrows as:

finding transformed points using arrows
Now we can answer questions like the one at the start of the post.

First we draw the arrow diagram for the transformed function.

To find the image of the point (1, 4), we start by putting that point on the diagram.

Then follow the chain back to the initial x value and the final y value of the transformed function.

arrows are good for other high school function topics
Using diagrams like this can help with visualizing and understanding other topics in the high school study of functions. For example, the chains of arrows are exactly expressing function composition, and students introduced to arrow diagrams here will be ready for the next step of understanding or friends g(f(x)) and f(g(x).

what is up with these transformed functions?
None of what follows is important in using arrow diagrams to solve problems - it is just my attempt at trying to better understand how these altered functions are connected to the idea of a transformation of the XY plane that maps points of one function to another.

A key goal in introducing this overall topic is to have students become familiar with a set of core functions, and then recognize that everything they know about them (maximum or minimum value, asymptotes, domain and range) is essentially preserved when the function is tweaked slightly - their essential attributes are only moved around a little. There are many things that you can do to functions that will not preserve their nice features, so the slight tweaking we will do is limited to composition with linear functions, which preserves their characteristic shapes. It is conventional in some textbooks to write a transformation g(x) as g(x) = af(k(x-d)) + h, where a, k, d, and h are real numbers.

All these letters are just pre-composing with a function i(x) =k(x-d) and then post-composing with a function  j(x) = ax + h. Writing those functions using short forms, and bending the diagram to show how following g is the same as following the transformed f, we have a diagram that looks like this:

When you do this pre and post composition of f with linear functions to obtain g, you can think of the points of f as being transformed into the points of g, by a transformation T, which can be expressed in terms of the same linear functions.
The reason why the function i(x) = k(x-d) is written in an unusual backwards kind of way is that we need to invert it when we think of things in terms of the transformation T that is acting on x values - its inverse will have a more standard 'slope intercept' form.