In abstract algebra, the transcendence degree of a field extension L /K is a certain rather coarse measure of the "size" of the extension. Specifically, it is defined as the largest cardinality of an algebraically independent subset of L over K.
A subset S of L is a transcendence basis of L /K if it is algebraically independent over K and if furthermore L is an algebraic extension of the field K(S) (the field obtained by adjoining the elements of S to K). One can show that every field extension has a transcendence basis, and that all transcendence bases have the same cardinality; this cardinality is equal to the transcendence degree of the extension and is denoted trdegK L or trdeg(L /K).
If no field K is specified, the transcendence degree of a field L is its degree relative to the prime field of the same characteristic, i.e., Q if L is of characteristic 0 and Fp if L is of characteristic p.
The field extension L /K is purely transcendental if there is a subset S of L that is algebraically independent over K and such that L = K(S).
There is an analogy with the theory of vector space dimensions. The analogy matches algebraically independent sets with linearly independent sets; sets S such that L is algebraic over K(S) with spanning sets; transcendence bases with bases; and transcendence degree with dimension. The fact that transcendence bases always exist (like the fact that bases always exist in linear algebra) requires the axiom of choice. The proof that any two bases have the same cardinality depends, in each setting, on an exchange lemma.