# Is "$f$" the function or is "$f(x)$" the function? [duplicate]

This may be a weak question but I'm just confused on what the function actually is. Say we have $$f(x) = x^2$$. So what is the function? $$x^2$$? $$f$$? $$f(x)$$? $$f(x) = x^2$$?

I just always thought that $$f(x)$$ is what we refer to as the function but my textbook for calculus says stuff like "if there exists functions $$f$$ where ..."

• I will let someone else answer, but thank you for asking this. Feb 19, 2019 at 20:02
• All of the notations and the expressions: $x^2$, $f$, $f(x)$, $f(x) = x^2$ represent the same function. Feb 19, 2019 at 20:27
• $f$ is the function. $f(x)$ denotes the value of $f$ at an arbitrary point $x$. Feb 20, 2019 at 0:48

In my opinion the function is $$f.$$

It is the "name" of this "machine" that acts on numbers, you give a number to it and it gives back a number (you are of course not restricted only to numbers, so let us call this as input from now on and you can give it more than only one input, as it can also give you back more than only one number which we call as output from now on).

But we call the function itself just $$f$$. Now, only calling it $$f$$ doesn´t say much about what $$f$$ is doing. So you can make its name more informative as writing it as

$$f(x)$$ which means that $$f$$ would like to recieve $$1$$ input to act on. You can think of $$f(x)$$ as the output of $$f$$. If $$f$$ can take more than only one input, say $$n$$, so you may write $$f(x_1,x_2,x_3,\ldots,x_n).$$ Using this way of writing $$f$$ also allows us to talk about what kind of inputs does $$f$$ can handle, you may say that $$x\in\mathbb{N}$$ or $$x_1,x_2,\ldots,x_n\in\mathbb{Q}$$

All this still doesn´t say much about what $$f$$ is doing so you may tell us about it in the following way

$$f(x)= x^2$$

which tells us that whatever $$f$$ gets will be squared. At this point we can make a rather compact and neat way describing what $$f$$ does, namely

$$f: A\to B, \ f(x)= \text{some expression involving x}$$

which can be read as "$$f$$ takes one element from the set $$A$$ and substitutes it into the expression given above and returns an element of the set $$B$$". This way you can think of $$f$$ as linking elements between the two sets $$A$$ and $$B$$ according to some rules that would make my answer even longer so we skip them.

All in all I think a function is an abstract mathematical concept which we usually name $$f$$ as it may stand for function.

• This was exactly what I was looking for, thanks!
– ming
Feb 19, 2019 at 20:30
• You are welcome! Feb 19, 2019 at 20:31

A function is a mapping $$f:A\rightarrow B$$ that associates each element from the set $$A$$ with one and only one element from the set $$B$$. So, informally speaking, the function $$f$$ is the rule that specifies the result you get when you apply the function to an input value.

While we may often call $$x^2$$ a function, a function is fully specified only if the sets $$A$$ and $$B$$ are specified as well.

$$f(x)$$ is the value of the function $$f$$ for a specific value of the input variable $$x$$.

• I like the mapping idea, thanks!
– ming
Feb 19, 2019 at 20:31
• @ming You are welcome! Feb 19, 2019 at 20:31

The function is $$f$$. However, we often say $$f(x)$$ or $$f(x)= x^2$$ so that we don't have to mention what variable it depends on, or what its expression is.

Think of it as a colloqualism.

The function $$f$$ is actually the collection of $$\{(x,x^2)|x \in \mathbb R^2\}$$ and that is the proper reference to "the function".

$$f(x)$$ is ambiguous but in terms of saying "the function $$f(x)$$" I believe it can be interpreted as "the function $$f$$ with an indication that the 'free variable' (that is the first terms of the ordered pairs $$\{(x,x^2)\}$$ will be indicated with the variable '$$x$$'". In my opinion this is acceptable. (Your professor may disagree.)

$$f(x) = x^2$$ to my way of thinking is way of defining a function. "The function $$f(x) = x^2$$" is barely acceptable (although grammatically abusive) as meaning "the function $$f$$ being defined as $$\{(x, f(x))| x\in \mathbb R; f(x) = x^2\}$$. But I would say it is acceptable. (Your professor may again disagree.)

Technically a function is $$f \subset A\times B$$ then for every element $$a\in A$$ there will exactly one $$b \in B$$ so that $$(a,b) \in f$$. Notation such as $$f:A \to B$$ or $$f(x) = whatever$$ or reference to $$f(x)$$ of $$f: a\mapsto b$$ are ways of highlighting various aspects of that. But the function itself as an object... that is the set of ordered pairs....

... which for practical purposes and for learning and intuitive purposes...is, admittedly, one of the more difficult and obscure ways of interpreting it. But it is the only rigorous and formal way to do it.

People do often say "the function $$f(x)$$". That's a bad idea for several reasons, but an example illlustrates one of the good ones. Let $$U$$ denote the set of all function from the reals to the reals. I'm going to define a function $$g : \Bbb Z \to U$$ by saying that $$g(n)$$ is the function that takes $$x$$ to $$x^n$$. I suppose that I could even write $$g(n)(x) = x^n,$$ or, to use the definition that some folks like --- "a function is a triple $$(D, C, R)$$, where $$R$$ is a subset of $$D \times C$$ such that ... " --- I could say that $$g(n) = (\Bbb R, \Bbb R, \{(x, x^n) \mid x \in \Bbb R\}).$$

The point here though is that for any number $$n$$ --- say $$n = 2$$, the object denoted by $$g(2)$$ is a particular function -- in this case the "squaring function".

So when you say "the function $$g(n)$$", are you referring to the thing that takes integers to element of $$U$$, or are you referring to the $$n$$th-power function? I claim that it's the latter, and that if you want to refer to the former, you should say "the function $$g$$".

When you do computer programming, and actually have to give explicit names and types to things, this sort of distinction matters a lot, although I have to say that many of my colleagues are exceptionally sloppy in the way they describe functions (unless they're actually programming, where the programming language may force them to be precise).

If you think my example is contrived, let me give another. Let $$C$$ be the set of all everywhere-differentiable functions from the reals to the reals. Then I can define a function $$H: C \to U : f \mapsto f'$$ i.e., for any differentiable function $$f$$, there's a new function $$H(f)$$, which is the derivative of $$f$$. [Not surprisingly, $$H(f)$$ is often written with some notation involving the letter "d", but I wanted to stay out of that quagmire.] The function $$H$$ comes up all the time.

And now what do you mean when you speak of "the function $$H(f)$$? Are you referring to the derivative of some particular function $$f$$, or are you referring the function $$H$$ itself? Both are objects of interest, and it really helps to have one way to refer to each.

If you encounter someone who insists that the function is called $$f(x)$$ rather than $$f$$, ask them if $$f(y)$$ is also a function, and whether it's the same function. [Most reasonable people should say that it is a function, and once you admit that, you kinda have to say it's the same one...] You can then ask whether $$f(x) - f(y)$$ is in fact zero, because the two things are "the same". At this point, they'll get annoyed with you and say things like "You know what I mean! Don't play the goat!" I recommend walking away, mumbling quietly to yourself "f of x minus f of y...should be zero...hmmm..."