# When is a localization of a commutative ring finitely generated as an algebra?

Prove or counterexample: If A is a commutative ring and $A_p$ is a finitely generated algebra over A for all prime ideal p of A, then A is a product of local rings.

In the case that $A$ is noetherian and we replace finitely generated as an algebra with finitely generated as a module we can argue as follows. We have for any choice of minimal prime ideal $P$ of $\mathrm{Spec} A$ that $A_P$ is flat and finitely presented hence projective. It is also an artinian local ring. As it is projective the corresponding sheaf is locally free on $\mathrm{Spec} A$. But $$\mathrm{Supp} A_P = \mathrm{Spec} A_P$$ so that if $\mathrm{Spec} A$ were connected it would have to agree with the spectrum of $A_P$ since a locally free sheaf has constant rank on connected components. Thus $A$ is in fact artinian and local.  If $A$ does not have connected spectrum then we can rewrite $A$ as $A_P \times A_1$. Where $A_P$ doesn't split up at all. We then just keep playing the same game (next with $A_1$) which terminates since $A$ is noetherian so has finitely many connected components and we in fact see that $A$ is a product of artinian local rings.