Proof (dimension and transcendence degree of function field)
Recall birational varieties have equal dimensions and $k$-isomorphic function fields hence equal transcendence degree. Therefore it suffices to show $\dim X = \op{trdeg}_k X$ where $X = Z(f)\subseteq \mathbb{A}^n$ and $f\in k[x_1, \ldots, x_n]$ is non-constant and irreducible.
To see $\op{trdeg}_k X = n-1$, WLOG assume $f$ involves $x_n$. Then $x_1, \ldots, x_{n-1}\in k(X)$ are algebraically independent, because any algebraic relation must be divisible by $f$. Moreover $x_{n}$ is algebraic over $k[x_1, \ldots, x_n]$ due to $f$, and $k(X)$ is generated by $x_1, \ldots, x_n$.
To see $\dim X = n-1$, note $$ \begin{align*} \dim T_{X,P} = \begin{cases} n, &\text{if $\d f_P = 0$}, \\ n-1, &\text{otherwise}. \end{cases} \end{align*} $$
If $\d f_P = 0$ for all $P\in Z(f)$, then $\pdfd{f}{x_i}\in I(Z(f)) = (f)$ so $f\mid \pdfd{f}{x_i}$ for all $i$. Considering the degree of $x_i$, we have $\pdfd{f}{x_i} = 0$ for all $i$. This implies $f$ is constant (as $\op{char} k = 0$), contradicting that $f$ is irreducible.
Hence there exists $P\in Z(f)$ such that $\d f_P \neq 0$, so $\dim X = n-1$.