27

I see a lot of professors in my calculus courses using $f$ and $f(x)$ in a way that looks interchangeable. Sometimes it drives me crazy because I always thought of them as being different. ($f$ means an independent variable, $f(x)$ means a variable which is dependent on $x$.) I also can't keep up with which variable is dependent on which...

So, when a professor writes down $f$ instead of $f(x)$ or $x$ instead of $x(t)$, do they actually mean that $x$ is in/dependent? Or are they intentionally not writing it fully?

Thanks!

  • 8
    That's analysts for you. They're scared of using proper notation. – Git Gud Jan 13 '13 at 00:51
  • 2
    Related: http://math.stackexchange.com/q/6870/1242 – Hans Lundmark Jan 13 '13 at 13:33
  • Your professor is not writing all of the details out, perhaps because of time constraints. I think a lot of early confusion stems from not distinguishing $f$ from $f(x)$, etc. appropriately. Other abuses are with notations for derivatives. – copper.hat Dec 21 '16 at 15:45

4 Answers4

29

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$.

anonymous
  • 3,090
  • Oh, I see...so I guess f would be (incorrectly) used as f(x), even if f(x) is used again in the same equation but is actually written as f(x) in that part of it? E.g. f + y = f(x) / t ? – Mohamed Moustafa Jan 13 '13 at 00:57
  • 3
    Reminds me of JavaScript, where functions are variables. – zzzzBov Jan 13 '13 at 02:45
  • 2
    @zzzzBov: This is no less true in mathematics. Given the right structure, you can add, subtract, and multiply functions, or calculate the distance or angle between two functions. – Dietrich Epp Jan 13 '13 at 06:34
  • 5
    In Calculus especially, this ambiguity can be a source of confusion. For example, we usually think of $f(x/2)$ as the abstract object you get when you compose division by 2 with $f$, since there is no convenient alternative notation for the former. But then $f'(x/2)$ usually means the derivative of $f$ evaluated at $x/2$, not the derivative of $f \circ \frac{\cdot}{2}$. – user7530 Jan 13 '13 at 06:51
  • @DietrichEpp "calculate the distance or angle between two functions" are you referring to conic sections by this remark? – Gaurang Tandon Feb 08 '18 at 14:48
  • Functions are not a certain kind of subset of $A\times B$. This confuses what functions are with one possible way to construct them from sets. It's like saying "real numbers are equivalence classes of Cauchy sequences of rational numbers" or "integers are equivalence classes of pairs of natural numbers". – M. Winter Feb 08 '18 at 14:56
  • @GaurangTandon: No, this is not a reference to conic sections. Consider the question, "What is an angle?" In a general sense, an angle is a measure of how aligned two vectors are, and we can define it in terms of the inner product with the formula $\langle u, v \rangle = \lVert u \rVert \cdot \lVert v \rVert \cdot \cos \theta$. For square integrable functions on $[0,1]$, we can define the inner product as $\langle f, g \rangle = \int_0^1 f(x) g(x),\mathrm{d}x$, which lets us calculate the angle between functions. This is called $L^2$ space. (Please forgive the simplifications here.) – Dietrich Epp Feb 08 '18 at 15:48
  • @DietrichEpp Oh, it's some higher maths I am not yet familiar with. Nevermind, thanks for the elaborated response ^_^ – Gaurang Tandon Feb 08 '18 at 16:00
10

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$.

7

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)$.

M. Winter
  • 29,928
  • When we say $f$ do wo mean just the "process of squaring" or also the domain and the codomain? – user599310 Sep 26 '20 at 18:21
  • @user599310 I think there is no right answer to this, except maybe "it depends". If one states $f(x)=x^2$ in a more informal context I would have no problem to apply this to integers, real numbers, complex numbers, matrices, etc. But in other subjects the information of domain/codomain might be more important and should be part of $f$. Do you have something specific in mind? – M. Winter Sep 26 '20 at 19:54
2

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.