My question comes out of Exercise 5.16 of the book by Atiyah-Macdonald.
Let $k$ be an infinite field and let $A \neq 0$ be a finitely generated $k$-algebra. Let $x_1, \dots , x_n$ generate $A$ as a $k$-algebra. We can renumber the $x_i$ so that $x_1, \dots , x_r$ are algebraically independent over $k$ and each of $x_{r+1}, \dots , x_n$ is algebraic over $k[x_1, \dots , x_r]$.
I don't understand the sentence "We can renumber the $x_i$ so that $x_1, \cdots , x_r$ are algebraically independent over $k$ and each of $x_{r+1}, \cdots , x_n$ is algebraic over $k[x_1, \cdots , x_r]$"
[My try]
There is a maximal algebraically independent subset of generators and I renumber these elements by $x_1, \cdots , x_r$. But I can't show that each of the remainder ,say $x_{r+1}, \cdots , x_n$, is algebraic over $k[x_1, \cdots , x_r]$.
How can I suitably renumber the generators.
Thanks in advance.
EDIT
There was a typo. $x_{r+1}, \cdots x_r$ is algebraic over $k[x_1, \cdots, x_r]$ not $k[x_1, \cdots , x_n]$.
$x_{r+1}, \cdots , x_{n}$ is trivially algebraic over $k[x_1, \cdots, x_n]$. But I don't know why it is algebraic over $k[x_1, \cdots, x_r]$.