27
$\begingroup$

Consider the functions $f:\mathbb{R}\rightarrow\mathbb{R}$ and $g:\mathbb{R}\rightarrow\mathbb{R}$ defined by the formulas $f(x)=x^2$ and $g(y)=y^2$ $\forall x,y \epsilon \mathbb{R}$. Is it true that $f=g$ as functions?

My thoughts so far: Intuitively, yes. Since the two functions are equal at every point where they are defined and are defined on the same points, the are effectively the same function. What concerns me here is the different notation of $x$ and $y$. How does that play into the problem? Are the functions still equivalent?

$\endgroup$
  • 17
    $\begingroup$ They are identical. The confusion may come from having been trained with "x and y axes" forcing $y$ to be a function of $x$ $\endgroup$ – David Peterson Aug 21 '16 at 19:03
  • 5
    $\begingroup$ Yes, they are the same function. The name of the variables doesnt care. $\endgroup$ – Masacroso Aug 21 '16 at 20:38
  • 1
    $\begingroup$ This is the axiom of functional extensionality. In some theories, it is not provable. It is true in ZF and in conventional mathematics. $\endgroup$ – Lily Chung Aug 21 '16 at 21:26
  • 3
    $\begingroup$ Related concept: alpha-equivalence in lambda calculus. The functions are identical when you alpha-rename their parameter to the same name. $\endgroup$ – Rhymoid Aug 21 '16 at 22:34
  • 1
    $\begingroup$ Note that we could avoid using variable names at all. Just define a function having its positional arguments, replace any occurrence in the definition of the function with a pointer to the argument. This is actually used in some implementations in software, since it avoids having to do renames when you have like nested quantifiers on the same name (the pointers to the outer or inner name would be different). $\endgroup$ – Bakuriu Aug 23 '16 at 7:38
48
$\begingroup$

Yes, the functions are equal. The choice of $x$ or $y$ (or any other symbol) doesn't carry any meaning; those are what are sometimes referred to as dummy variables (link to MathWorld). I could define $h:\mathbb{R}\to\mathbb{R}$ by $$h(\&)=\& ^2$$ and then $h$ would again be the same function as $f$ and $g$.


More generally, if $A$ and $B$ are sets, then a function from $A$ to $B$ is usually defined formally to be a subset $R\subseteq A\times B$ such that, for all $a\in A$, there is exactly one element of $R$ whose first entry is $a$. The collection of all functions from $A$ to $B$ is usually written $B^A$. Under this system, $f$ refers to the subset $$\{(x,x^2):x\in\mathbb{R}\}\subset \mathbb{R}\times\mathbb{R}$$ and $g$ refers to the subset $$\{(y,y^2):y\in\mathbb{R}\}\subset \mathbb{R}\times\mathbb{R}$$ But the subsets are the same, since they have the same elements! $\,(3,9)$, $\,(-1.1,1.21)$, $\,(\pi,\pi^2)$, etc., all the elements of one are elements of the other and vice versa. By the axiom of extensionality (Wikipedia) they are equal. This more formal argument is what Andrea Mori's answer is about.

$\endgroup$
  • $\begingroup$ Do you mean h(&) = &^2? If so, I think I understand. $\endgroup$ – user322548 Aug 21 '16 at 19:07
  • 28
    $\begingroup$ Why aren't we using functions like $♫(☺) = ☺^2$ haha. $\endgroup$ – Kevin Aug 21 '16 at 20:59
  • 2
    $\begingroup$ Interestingly, determining if two functions are equal is an undecidable problem. In other words, specific instances may be solvable, but there is no general algorithm (and there may even be specific instances that are unsolvable, I'm unsure of that one) $\endgroup$ – BlueRaja - Danny Pflughoeft Aug 22 '16 at 5:39
  • 9
    $\begingroup$ @BlueRaja-DannyPflughoeft -- to be precise, you need to specify how the functions are specified in your model of computation. What you say is correct if, say, $f$ and $g$ are given as specifications of Turing machines, since the Halting Problem can be reduced to this one. $\endgroup$ – ajd Aug 22 '16 at 6:16
  • 2
    $\begingroup$ FTR, the arguably better name for dummy variables is bound variables. And I'd add that what makes the variable bound is actually the $\forall$ quantor in the definition (which is often not written out but assumed implicitly). $\endgroup$ – leftaroundabout Aug 22 '16 at 11:48
9
$\begingroup$

A function $f:\Bbb R\rightarrow\Bbb R$ can be seen as a (certain) subset of $\Bbb R^2$ (Note: in fact the functions are usually defined to be certain subsets, but you can ignore this now)

Two functions are the same when the corresponding subsets are the same. The names you choose for the coordinates in $f:\Bbb R\rightarrow\Bbb R$ are irrelevant.

$\endgroup$
5
$\begingroup$

In elementary schools these days students might see the function described this way $$ f(\quad) = (\quad)^2 $$ or $$ f(\text{weird symbol}) = (\text{weird symbol})^2 $$ so when they get as far as you they wouldn't have to ask this good question.

$\endgroup$
5
$\begingroup$

Are you a different person whether I refer to you as "Ethan Zell" or as "the person who asked the question"? You surely aren't. That's because both are only names given to you; they are not you. Similarly, in $f(x)$ and $g(y)$, $x$ resp. $y$ is the name that is given to the function's argument, and thus it doesn't matter what it is.

Well, OK, it almost doesn't matter. Should you decide to call your argument $1$, then you'd run into trouble, because for example the name $1$ is, by convention, reserved for the number one, or some constant that closely resembles that number in whatever topic you are working. This is similar how it would be wrong to call you "the president of the United States" (unless you actually happen to be the president of the United States, of course), because that is also a name that is reserved for a specific meaning, namely the president of the United States.

$\endgroup$
  • $\begingroup$ Then again, the reserved name $1$ is used for the cardinality of singleton sets, for the smallest positive integer, for the neutral element of a non-abelian group, ... $\endgroup$ – Hagen von Eitzen Aug 22 '16 at 12:20
  • $\begingroup$ @HagenvonEitzen: Good point (although I'd argue that the smallest positive integer is the number one). I've amended the answer accordingly. $\endgroup$ – celtschk Aug 22 '16 at 12:35
2
$\begingroup$

A function is defined by two sets, $E$ and $F$, and a rule that to $x\in E$ make corresponds an unique element $y\in F$. The notation is not relevant so yours $f$ and $g$ are equal.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy