Functions – Are Two Functions with Same Formula but Different Codomains Equal?

functions

It is said for two functions $f,g$ to be equal they must have same domain and codomain and for each $x\in X$, $f(x)=g(x)$.

But shouldn't functions such as $f:\Bbb R \to \Bbb C$ where $f(x)=x^2$ and $g:\Bbb R \to \Bbb R$ where $g(x)=x^2$ still be considered equal functions for example? Even if codomain is different.

Best Answer

It might be worth noting that from a set theoretic standpoint, the copy of the reals contained in the complex numbers is not the same set as the reals on their own. They are isomorphic, but distinct as sets.

We usually construct $\mathbb{C}$ as an ordered pair $(x,y) \in \mathbb{R} \times \mathbb{R}$, and define multiplication on these pairs. Here $x$ is the real part of the complex number and $y$ is the imaginary part. We have a natural isometric embedding of $\mathbb{R}$ into $\mathbb{C}$ by $x \mapsto (x,0)$. Thus, if we're talking about the real number "$2$" in $\mathbb{C}$, we're really talking about the ordered pair $(2,0)$.

To bring it back, the two functions you described: $$f:\mathbb{R} \rightarrow \mathbb{R}, \quad f(x) = x^2$$ $$g:\mathbb{R} \rightarrow \mathbb{C}, \quad g(x) = x^2$$ Obviously $f$ and $g$ give the "same information" in some sense, but the objects in the image are set theoretically distinct, even if we interact with them in exactly the same way.