Let $R$ be a commutative ring and $A$ an $m \times n$ matrix with entries in $R$. In other, words, an $R$-linear map $R^n \to R^m$. Let $K =\ker(A) \subseteq R^n$ and suppose that $X$ is a finite $R$-generating set for $K$. Now suppose that $S$ is a commutative ring containing $R$ as a subring (I'm assuming $R$ and $S$ are unital with the same unit). We may also regard $A$ as a matrix with entries in $S$ i.e. a map $S^n \to S^m$. So now, we have another (larger) kernel to consider. The kernel $K'$ of $A$ considered as a map $S^n \to S^m$.
Question: Is $X$ still an $S$-generating set for $K'$? Or, equivalently, is $K'$ generated by $K = K' \cap R^n$?
I only really care about the case where $X$ is finite, i.e. $K$ is finitely-generated over $R$. In fact, $R$ can be Noetherian. I'm not sure how relevant that would be here though.
In the linear algebra setting, i.e. when $R$ and $S$ are fields, this is pretty obvious. You can think of it as a consequence of the Gauss-Jordan elimination algorithm. Indeed, if you bring $A$ to echelon form over $R$, then that must also be the echelon form over $S$ (by uniqueness) so the basis for the null space which you read off from the echelon form works for either $R$ or $S$.
I don't know much about commutative algebra, but I think this also has to hold in the case where $A$ is surjective. Then, applying $\otimes_R S$ to $$ 0 \to K \to R^n \overset{A}{\to} R^m \to 0 $$ gives $$ \cdots \to \mathrm{Tor}_1^R(R^m,S) \to \ker_R(A) \otimes_R S \to S^n \overset{A}{\to} S^m \to 0$$ and the Tor group above is zero, because $R^m$ is projective, so we see that $\ker_R(A) \otimes_R S$ coincides with $K'$, as needed.
So what do you think, does this hold in general? And, do we really need any commutative algebra tools to prove it if so? I feel like, because the statement is so transparent in the field case, if it is true in general it should hold for some fairly transparent reason.
This is not true in general. For a very simple example, let $R=\mathbb{Z}$ and let $S=\mathbb{Z}\times\mathbb{F}_2$. Then the map $R\to R$ given by multiplication by $2$ is injective (so the kernel is generated by $X=\emptyset$), but the map $S\to S$ given by multiplication by $2$ is not.
In general, a sufficient condition for this to hold is for $S$ to be flat over $R$. Indeed, the statement that $X$ generates the kernel of $A$ just means that the sequence $$R^{\oplus X}\to R^n\stackrel{A}\to R^m$$ is exact where the first map is induced by the inclusion $X\to R^n$. The corresponding statement for $S$ is then obtained by just tensoring this sequence with $S$ over $R$. If $S$ is flat over $R$, then the sequence remains exact after tensoring with $S$, and so $X$ generates the kernel of $A$ over $S$ as well.