To answer such question you need to define what $\frac{a}{b}$ symbol means. Math is a science of precision.
So in a typical setup you would have a pair $(R,\cdot)$, where $R$ is a set and $\cdot$ is a function $R\times R\to R$ typically called "multiplication". Of course "set" is a primitive object, while function and Cartesian product have their own definitions as well.
Additionally we would have a special element $1\in R$ such that $x\cdot 1=1\cdot x=x$ for any $x\in R$. Then you can prove that such $1$ is unique if it exists. This element is often called neutral or multiplicative identity.
Finally the symbol $\frac{a}{b}$ for $a,b\in R$ is defined as $a\cdot b^{-1}$, where $b^{-1}$ is defined as an element of $R$ such that $b\cdot b^{-1}=b^{-1}\cdot b=1$, i.e. the inverse of $b$. This is under assumption that $\cdot$ is commutative (not a strict requirement but without it $\frac{a}{b}$ behaves in a weird, counterintuitive way, e.g. $\frac{a}{b}\cdot\frac{c}{d}$ is not necessarily equal to $\frac{a\cdot c}{b\cdot d}$). Again if $b$ has an inverse then it has to be unique.
Note that the symbol "$-1$" here is not related to the special neutral element $1\in R$. These are two different things that share the same symbol. Also "$x^{-1}$" does not refer to exponentiation, it literally stands for "the inverse of $x$". Both might be confusing but it is a standard mathematical convention to use such symbols. Those two are connected with the standard meaning, but that's a story for another time.
With all of that we easily see that $1\cdot 1=1$ and therefore $1^{-1}=1$. And so for any $n\in R$ we have
$$\frac{n}{1}=n\cdot 1^{-1}=n\cdot 1=n$$