Sufficient conditions for ideal to be in kernel of ring homomorphism Let $R,M$ be commutative rings and $I$ be any ideal of the ring $R$.


*

*What is (are) sufficient (and necessary) condition(s) on $R$, so that given any ideal $I\neq R$ of ring, there is a ring homomorphism from $R$ to $R$ whose kernel is $I$.





*In general, what is (are) sufficient (and necessary) condition(s) on $R$ and $M$ , so that given any ideal $I\neq R$ of ring $R$, there is a ring homomorphism from $R$ to $M$ whose kernel is $I$.


It is not always  true as we see in integers (1) doesn't hold. But I wonder if there is a ring $M$ such that (2) holds for integers. I couldn't find any conditions for which it holds, please help me with this.
 A: I can't say for sure but I feel like this is a difficult question to answer in general.
As mentioned in a comment, we will have to exclude $I=R$ otherwise the only ring with this property will be $R=0$. Additionally, I will just assume $R\neq0$.
I'll first provide a quick argument as to why $\Bbb Z$ cannot satisfy property (2). In corollary A below I provide a necessary and sufficient condition for property (2) to hold in general, but I'm not sure what to do about property (1).
Note that when considering property (2), we will only be considering those $M$ which have $R$ as a subring: indeed, just by taking $I = (0)$, we would need an embedding $R\hookrightarrow M$, so we may as well identify $R$ with its image in $M$.
Claim: Fix $0\neq R\subseteq M$. If property (2) holds, then the image of the unique homomorphism $\Bbb Z\to R$ is a field. In particular, a necessary condition for (2), and thus (1), is that $R$ contains a field as a subring.

Proof. Let $1\in R$ be the identity element, and $n = n\cdot1$ be some integer multiple of it. If $n$ is not a unit, then it generates a proper ideal in $R$, so by property (2) we have a ring homomorphism $\varphi:R\to M$ sending $n\mapsto0$. However, since $\varphi(1)=1$, it must necessarily fix all integer multiples of the identity, so in particular this means $n=\varphi(n)=0$.

Corollary: There does not exist a ring $M$ for which $\Bbb Z$ will satisfy property (2).
However, I'm not sure if I can say much more in this level of generality, because it seems like all sorts of rings can have these properties. A trivial example would be if $R$ is a field, since then the only proper ideal is trivial and thus the identity map on $R$ suffices to show $R$ has property (1). However, these aren't the only examples:
Example: If $R=\Bbbk[x]$ for $\Bbbk$ a field, then $R$ cannot satisfy property (1), but satisfies property (2).

Proof. Since $R$ is a PID, the ideals are easy to characterise. To see that $R$ cannot satisfy property (1), let $p(x)\in R$ be any nonconstant polynomial, then $R/p(x)^2$ is not an integral domain and thus cannot be embedded into $R$.
As for property (2), take $M := \Bbbk[X_p\mid p\in R, \deg p(x)>0]/J$ where $J$ is the ideal generated by $p(X_p)$ for $p(x)\in R$ with $\deg p(x)>0$. This is the ring where we have chosen a root $X_p$ for each nonconstant polynomial $p(x)$. Thus, for any nonconstant polynomial $p(x)\in R$, we can realise it as the kernel of the ring homomorphism $R\to M$ given by fixing $\Bbbk$ and sending $x\mapsto X_p$.

Remark. The argument showing that $R$ cannot satisfy property (1) readily generalises to show that an integral domain cannot satisfy property (1) unless it is a field.
Note. If we relax condition (1) to only concern itself with prime ideals, then $R=\Bbbk[x]$ will satisfy this weaker condition whenever $\Bbbk$ is algebraically closed.
This construction was really just a tensor product (coproduct) of $\Bbbk$-algebras $M = \bigotimes_{I\subsetneq R}R/I$. In fact, we can perform this construction in general, though it won't always work (for example, $\bigotimes_n\Bbb Z/n\Bbb Z=0$ because all the rings in question have different characteristic). That being said, we can say this:
Claim: If $R$ satisfies property (2), then we may take $M := \bigotimes_{I\subsetneq R}R/I$, as a tensor product of $\Bbb Z$-algebras.

Proof. Let $M$ be the ring that witnesses property (2) for $R$, then by the first isomorphism theorem we have monomorphisms $\varphi_I:R/I\hookrightarrow M$ for every proper ideal $I\subsetneq R$. By the universal property of the tensor product as a coproduct (in the category of $\Bbb Z$-algebras), this induces a unique ring homomorphism $\varphi:\bigotimes_IR/I\to M$ through which all $\varphi_I$ factor.
Denote the canonical inclusions by $\iota_J:R/J\to\bigotimes_IR/I$, then in particular we have that the $\varphi_I=\varphi\circ\iota_I$ are all injective. Therefore, $\iota_I$ is injective for all $I$. Therefore, for any proper ideal $J\subsetneq R$, the homomorphism $R\twoheadrightarrow R/J\xrightarrow{\iota_J}\bigotimes_IR/I$ will have kernel $J$, as desired.

Corollary A: $R$ has property (2) iff the canonical inclusions $R/J\to\bigotimes_{I\subsetneq R}R/I$ are injective for all $J\subsetneq R$, where the tensor product is taken over $\Bbb Z$-algebras.
Remark. In fact, this same argument can be used to prove a slightly more general result: if $R$ is a commutative ring, and $\Phi$ is some property for ideals (so far we used the property $\Phi(I)$ saying "$I$ is proper"), then there exists a ring $M$ such that any ideal $I$ satisfying $\Phi(I)$ is realised as the kernel of some ring homomorphism $R\to M$ iff for any ideal $J$ satisfying $\Phi(J)$, the canonical inclusion $R/J\to\bigotimes_{I:\Phi(I)}R/I$ is injective.
For example, we could take the special case $\Phi(J)$ saying "$J=I$" for some fixed ideal $I$, then this will just say that the ideal $I$ is the kernel of the canonical homomorphism $R\to R/I$.
On the other hand, if $\Phi$ is "no constraint" (so that we include the ideal $I=R$), then the canonical inclusion $R\to\bigotimes_{I\subseteq R}R/I=0$ being injective forces $R=0$.
However, this doesn't mean that $R$ has property (1) if and only if $R\cong\bigotimes_IR/I$: we don't have to take such a large ring in general.
Example: The ring $R:=\Bbb C[x]/(x^2)$ has property (1) and is not isomorphic to $\bigotimes_IR/I$.

Proof. The only nontrivial ideal of $R$ is generated by $x$. Indeed, $ax+b$ is a unit whenever $b\neq0$ since we can take $(ax+b)(\frac{-a}{b^2}x+\frac1b)=1$. In this case, we can just take the homomorphism $\varphi:R\to R$ sending $x\mapsto0$, and thus $R$ has property (1).
However, the tensor product on the right is $R\otimes_{\Bbb Z}\Bbb C$, which is remarkably larger than $R$.

Remark. $R=\Bbbk[x]/(x^2)$ will always satisfy property (1), but if we take for example $\Bbbk=\Bbb Q$, then it will be isomorphic to $\bigotimes_IR/I$.
A: As a complement to Shibai's answer, which deals with (2), here is a partial answer for (1).
If $R$ is an integral domain , then $R$ satisfies (1) if and only if $R$ is a field.
Indeed, let $a\in R$ which is not zero nor a unit. Thus $a^2$ is not zero either since $R$ is an integral domain, nor a unit. Hence $(a^2)\neq R$. $(1)$ implies that $R/(a^2)$ is a subring of $R$, hence an integral domain. Thus, $(a^2)$ is prime. In particular, $a^2$ is irreducible (this uses again the fact that $R$ is an integral domain), which is absurd since $a^2=a\cdot a$ and $a$ is not a unit.
Consequently, any element of $R$ is either $0$ or a unit, and $R$ is a field.
Edit. One may wonder if we can replace "$R$ is an integral domain" by "$R$ is a local ring" or "$R$ has no non trivial idempotents". Unfortunately, the answer is NO, and I suspect that there is no satisfactory answer for (1) in the general case.
For a counterexample, take the local ring $R=\mathbb{Z}/4\mathbb{Z}$, which has no non trivial idempotents.  There is only one ring morphism $R\to R$ (because it sends $\bar{1}$ to $\bar{1}$), which is precisely $Id_R$. This morphism is injective. In particular, the ideal $(\bar{2})$ is not the kernel a morphism $R\to R$.
