TITLE: Why does $K \leadsto K(X)$ preserve the degree of field extensions?
QUESTION [18 upvotes]: The following is a problem in an algebra textbook, probably a well-known fact, but I just don't know how to Google it. 

Let $K/k$ be a finite field extension. Then $K(X)/k(X)$ is also finite with the same degree as $K/k$. 

Obviously if $v_1,...,v_n$ is a $k$-Basis of $K$, any polynomial in $K(X)$ can be written as a $k(X)$-linear combination of $v_1,...,v_n$, but I have no idea what to do with a nontrivial denominator.
Is there perhaps a more elegant way of proving this?

REPLY [6 votes]: Let $K/k$ be a field extension. Then $K \otimes_k k(X)$ is a localization of the integral domain $K \otimes_k k[X] = K[X]$, thus the natural map $K \otimes_k k(X) \to K(X)$ is injective. Now we have the following equivalence:
a) $K/k$ is algebraic
b) Every polynomial over $K$ divides some polynomial over $k$.
c) $K \otimes_k k(X) = K(X)$.
$a \Rightarrow b$: Because of uniqueness of the division algorithm, it suffices to prove divisibilty in an algebraic extension. So take a splitting field of the polynomial and reduce to the case of linear factors $x-a$. But they divide the minimal polynomial over $k$.
$b \Rightarrow c$: $K \otimes_k k(X)$ is the localization of $K[X]$ at all nontrivial polynomials over $k$. Since we have $b$, we localize at all nontrivial polynomials  over $K$, i.e. we get $K(X)$.
$c \Rightarrow a$: Take $u \in K$. Then $1/(X-u) = p/q$ for $p \in K[X], q \in k[X]$, i.e. $p (X-u)$ is a polynomial over $k$ with root $u$. QED
In particular, if $K/k$ is algebraic, we have $[K(X):k(X)] = [K:k]$.