I am looking into this proof: If $m$$>$ $n$, then any $f_1,...,f_m$ (non-zero polynomials) in $K[X_1,...,X_n]$ are algebraically dependent over $K$ ($K$ is a field).

The proof starts by assuming that $f_1,...,f_m$ are algebraically independent over $K$. But I don't understand how we can now deduce that $f_1,...,f_m$ forms a transcendence basis of $K[X_1,...,X_n]$ over $K$. In other words, why is $K[X_1,...,X_n]$ algebraic over $K(f_1,...,f_m)$?

The proof then goes on to say that $X_1,...,X_n$ forms a transcendence basis of $K[X_1,...,X_n]$ over $K$. Could someone explain why this is true?

The contradiction at the end is now straightforward since all transcendence bases must have the same cardinality.

Would appreciate any sort of explanation as I am not very competent in this area of mathematics.