TITLE: Non finitely-generated subalgebra of a finitely-generated algebra
QUESTION [28 upvotes]: Ok, I feel a little bit ashamed by my question.
This afternoon in the train, I looked for a counter-example:
— $k$ a field 
— $A$ a finitely generated $k$-algebra 
— $B$ a $k$-subalgebra of $A$ that is not finitely generated 
Finally, I have found this: 
— $k$ any field
— $A=k[x,y]$
— $B=k[xy, xy^2, xy^3, \dots]$
(proof : exercise)
My questions are: 
1) What is your usual counter-example ?
2) Under which conditions can we conclude that $B$ is f.g. ?
3) How would you interpret geometrically this counter-example ?

REPLY [12 votes]: Dear Nicojo, since you now have many counter-examples, let me give you a situation where $B$ is finitely generated, in line with your question 2). I am going to adopt your notations with the important caveat that $k$ is a ring which needn't be a field .
Theorem of Artin-Tate Consider the inclusions of rings  $k \subset B  \subset A$ .  Suppose that $k$ is Noetherian, that $A$ is a finitely generated algebra over $k$ and that $A$ is a finitely generated module over $B$. Then $B$ is a finitely generated algebra over $k$.
You might interpret this as saying that when $B$ is  sufficiently close to $A$, finite generation is preserved.
You can find the proof in Atiyah-Macdonald, Proposition 7.8, page 81.
From this theorem you can then prove Zariski's result that an extension of fields that is finitely generated as an algebra is actually a finite-dimensional extension (Proposition 7.9 page 82 loc.cit.) and then  Hilbert's Nullstellensatz is literally an exercise: exercise 14, page 85 . So this result of Artin-Tate is really basic in commutative algebra and algebraic geometry, not surprisingly if you consider the authors (the Artin here is Emil, Mike's father.)