Can $f(x)=\frac{1}{\frac{1}{x}}$ always simplify to $f(x)=x$? Is f(0) = 0 or undefined? [duplicate]

In the context of projectively extended real line $\widehat{\mathbb{R}}$, if $f(x)=\frac{1}{\frac{1}{x}}$, then $$f(0)=\frac{1}{\frac{1}{0}}=\frac{1}{\infty}=0.$$

But in the context of $\mathbb{R}$, if $f(x)=\frac{1}{\frac{1}{x}}$, is $f(0)$ undefined or is it zero?

On the one hand, if $g(x)=\frac{1}{x}$ is undefined at $x=0$, then $\frac{1}{g(x)}$ should be undefined as well, therefore in the context of $\mathbb{R}$, $\frac{1}{\frac{1}{x}}$ should be undefined at $x=0$.

On the other hand, if $g(x)=\frac{1}{x}$ and $x=0$, then $g(x)$ can be either $\infty$ or $-\infty$ and that would be the reason why is it undefined, but if we write $\frac{1}{0}=\pm\infty$ instead of saying that it's undefined, can we use

$$\frac{1}{\infty}=\frac{1}{-\infty}=0$$

and then say that, in the context of $\mathbb{R}$, $$\frac{1}{\frac{1}{0}}=0?$$


In the reals $\dfrac 1{\left(\frac 1x\right)}$ is undefined for $x=0$. The limit as $x \to 0$ does exist and is $0$. It is a removable singularity in the function, which just looks like a hole in the graph. You can extend the function to one that is continuous everywhere by defining $f(0)=0$.

The same thing happens for $g(x)=\frac{x^2-1}{x-1}$. This function has a removable singularity at $x=1$, but if you add in the definition $g(1)=2$ it becomes continuous.


There is no way to define the object $\frac{1}{\frac{1}{0}}$ in the real numbers without presuming the definition of $\frac{1}{0}$, but if $\frac{1}{0}$ is defined, i.e. is equal to some real number, then $$ 1 = 0 \cdot \frac{1}{0} = 0 $$ which is absurd. The best we can hope to do is to define $\frac{1}{\frac{1}{0}}$ not as a real number beholden to the properties of the real numbers but as some kind of symbol that extends the usual operations of addition and multiplication on the real numbers. This is exactly what we do when we create the extended real numbers.