I have a problem that I'm just curious to check.. we've had a number of "is this ..." questions in this course, and the answer has always been yes, so I'm a little thrown off that it seems to be a no this time, so I'm just hoping to make sure I'm not missing small things.
The problem
Let $A$ and $B$ be two commutative rings and $\phi$ and $\psi$ two ring homomorphisms from $A$ to $B$. Is the set of $f\in A$ such that $\phi(f) = \psi(f)$ a subring of $A$?
Let denote the set of $f\in A$ such that $\phi(f) = \psi(f)$ by $I$. To show that $I$ is an ideal, we would need that $I$ is an additive subgroup of $A$ and that $I$ absorbs multiplication in $A$.
Showing that $I$ is an additive subgroup is fairly simple (i.e., $fg^{-1}\in I$ for any $f,g\in I$) but to show it absorbs multiplication, letting $a\in A$ and $f\in I$, we would require $ \phi(af) = \phi(a)\phi(f) = \phi(a)\psi(f) = \psi(a)\psi(f) = \psi(af)$ and hence, $\phi(a) = \psi(a)$, which would mean the ideal would always have to be trivial (so that $\psi(f) \phi(f) = 0$) or the entire ring ($I = A$), which makes it seem plausible to be able to come up with a counterexample.
Let $A = \mathbb{R}[x], B = \mathbb{C}[x], f = 1 + x, a = 1, \phi:A\to B$ be given by $\phi(\sum_j r_jx^j) = \sum_j r_ji^j$ (i.e., every polynomial gets mapped to its evaluation at $i$) and $\psi:A\to B$ simply be the inclusion map.
Then $\phi(af) = \phi(1+x) = 1+i \neq 1 + x = \psi(1 + x) = \psi(af)$ and $I$ is not an ideal of $A$.
To make a formal question,
Is this correct?
Also, in case question with the potential accepted answer of "Yes" aren't very nice here, I can also ask, any nice examples of this not being an ideal? Any slick examples (i.e., my `counter example' boils down to $x \neq i$. Any other examples less non-trivial?)
Thanks!