What is the difference between writing $f$ and $f(x)$?

It's not a stupid question. It's actually quite valid. Due to heavy abuse of notation (that is often harmless, though confusing), $f$ and $f(x)$ are often used interchangeably. Formally, $f:A \to B$ is a certain kind of subset of the cartesian product $A \times B$. A little less formally, $f$ is a rule that assigns to each $a \in A$ a unique value $b \in B$. We often denote this unique value as $f(a)$. So $f(a)$ is the function $f$ evaluated at some point $a$, while $f$ is actually the more abstract object that associates elements of $A$ to elements of $B$.


Sometimes people write something like $f(x)$ for a function and $f(s)$ for its Laplace transform, and then the question is, does $f(3)$ mean the original function evaluated at $x=3$ or the Laplace transform evaluated at $s=3$? The point is that $f(x)$ should refer to the value of the function when the argument (or "input") to the function is the number called $x$.

Similarly, some write $f(x)$ and $f(y)$ for the probability density functions of two random variables called (capital) $X$ and (capital) $Y$. So what's $f(3)$? The point again, is one shouldn't do that; $f(x)$ should refer to the value of the function when the argument (or "input") to the function is the number called $x$. A better notation is $f_X(x)$ where (capital) $X$ is the random variable and (lower-case) $x$ is the argument to the function. Then it's clear what $f_X(3)$ is and what $f_Y(3)$ is.

Then if you write about $f(x)$ and $f(w)$, you've got the same function evaluated at two different arguments. What is the same is $f$.


Usually $f$ and $f(x)$ are used interchangeably. But rigorously they should be used in the following way.

The single letter $f$ denotes the function, i.e. the machine in which you can plug in a value and get another value out. Yes, this might be confusing at first, because you are accustomed to using single letters for variables. However, variables can be of all kind of types. There are numbers, letters, truth values, ..., and functions. Functions are just another possible type of variables. The fact that $f$ is a function must be stated somewhere in the text before it is used. E.g. like this:

Let $f:A\to B$ be a function. Then $f$ is ...

After this line you just have to remember that it is a function. In contrast, $f(x)$ denotes the value of $f$ when plugging in $x$ for the argument of the function. Usually, $f(x)$ is not a function, but whatever $f$ spits out (e.g. a real number).

Example. Let $f:\Bbb R\to\Bbb R$ be a function defined by $f(x)=x^2$.

Then $f$ denotes the "process of squaring", while $f(x)$ is just another way to write $x^2$, and $f(2)$ is just another way to write $4$. Also the variable used to be plugged into $f$ has no fixed name. So $f(s)$ means $s^2$ and no different function than $f$. However, you can see all kind of abuse of this notation, e.g. denoting the Laplace transform of $f$ by $f(s)$.


No doubt f(x) means the image of x under f, but x is not a single value; conventionally it is considered to be a variable representing the points that belong to the domain of f.

So saying "f(x) is a function" is nothing different from saying "f is a function", as long as x is used to represent all points in the domain of f.