Let $D$ be an integral domain and $R$ a subdomain , I'm trying to show that both $R$ and $D$ have the same unity. I did it using the fact that $1$ and $0$ are the only idempotent elements inside any integral domain. I'm trying to do it in another way which is the following:
Since $R$ is a subdomain it has unity call it $c$, let $a\in R$ then $ac=a$ since we can cancel we get that $c$ which is in $R$ is equal to $1$ then $1\in R$.
I'm not really confident this right. If this is wrong what other way is there that does not use the fact that there are two idempotent elements in an integral domain.
Assuming that your definition of subdomain requires that the unity is non zero, then you have for this unity $c\in R$
$$ cc=ce $$
where $e$ is the unity of $D$, because both, by definition, give $c$. Hence
$$ c(c-e)=0 $$
and, since $c\ne0$, $c=e$.
Of course, this is just using that $c$ is idempotent. Which it is, so why bother?