My 16-year-old daughter has just finished her mathematics GCSE (an exam that people in England take at that age), which means that she can now give up the subject and concentrate on other subjects that interest her more. She told me before the exams that she found functions difficult, so I gave her a bit of help with them, which was quite revealing. A standard type of question is to be given two functions and asked to compose them. So I tried out a couple of questions of that form on her. What follows is an account that won't be fully accurate in its details (because I can't remember precisely how our conversations went), but accurate enough not to be misleading.
I began by asking her something like "If f(x) = x^2 and g(y) = y+1, then what is g(f(x))?" I thought I was making things clearer by saying that g was a function of y, so that one could substitute y=x^2 rather than substituting x=x^2. This, however, was a mistake and led to her making statements like, "Well, y must be x^2 -1," which I couldn't really do much about given that I couldn't talk about quantifiers.
Actually, I tried to talk about quantifiers without explicitly mentioning them, by saying things like "f takes any number and squares it, while g adds 1." But it didn't really help. When I gave up and said "f(x) = x^2 and g(x) = x+1," she was no longer confused, even though in some sense she ought to have been confused.
Well, I say she wasn't, but then a new problem emerged, which was that she consistently composed functions the wrong way round. So I'd ask her what g(f(x)) was when g(x)=x+1 and f(x)=x^2 and she would say (x+1)^2. I tried hard to think what could possibly be going on in her mind, which was difficult when I find the notation g(f(x)) utterly transparent: obviously you rewrite f(x) as x^2 to get g(x^2), and then since g(x) is x+1, g(x^2) must be x^2+1. But somehow she wasn't seeing it like that.
Writing this, I now think that perhaps she read the g and thought "OK, that gives me x+1," then read the f and thought "That's x^2, so I must square the x+1," ending up with (x+1)^2. In other words, she was simply doing the functions in the order they were written. So she wasn't reading g(f(x)) as "Do g to f(x)". Rather, she was reading it as "Do g and then f to x".
At some point in the conversation I discovered something that suddenly shed light on the situation. When I was her age, if I had been told that f(x) = sin(x+30) and had then been asked to work out f(10) on a calculator, I would have had to type in 1 0 + 3 0 = SIN. Similarly, if I had had to work out exp(sqrt(log 20)) I would have had to type in 2 0 LN SQRT EXP. But she had been issued with a calculator where you simply type in the expression as it is written on the page. So for those examples, she would have typed SIN ( 1 0 + 3 0 ) = and EXP ( SQRT ( LN 2 0 ) ) =. The result: without being conscious of it, I was internalizing the way functions worked, every time I used my calculator, while she could simply switch off her brain and copy expressions directly from the page, with no need to consider what they meant. This calculator, by the way, is the standard one that everyone in the country taking the exam is supposed to use.
The end of the story is that she did in the end get the idea and did her functions questions without any problem. So this post is not about her but about the way she, and presumably hundreds of thousands of others, have been taught mathematics.