Prove that in $\mathbb{Z}$ every subring is an ideal.
Proof:
Let $S$ be a subring of $\mathbb{Z}$. Since $S$ is a ring, $(S,+)$ is a group. If $m\in \mathbb{Z}, s\in S$, then adding $s$ by $m$ times gives $s+\cdots+s=sm$. So for all $m\in\mathbb Z, s \in S$, we have $sm \in S$. Hence, $S$ is an ideal.
Question:
Is this proof valid? Also, is commutativity assumed in $S$ or is this property inherited from the original ring? How does one know whether it matters that $sm$ should be in $S$ rather than $ms$ when it comes to say other rings?
The proof is valid, and is pretty much how I'd go about it. And yes, commutativity is inherited from the parent ring: if $ab=ba$ "upstairs", they're the same "downstairs," too, since multiplication is the same operation in either case. Finally, for commutative rings, the order of multiplication obviously doesn't matter. For non commutative rings, you talk about left ideals and right ideals, depending on how you mean the multiplication.