[Math] Are two mathematically alike functions equal

elementary-set-theoryfunctions

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?

Best Answer

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.