i am told in my math book that 'a rational function is one where both numerator and denominator are polynomial'

as an example i am given such functions as '1/x' or '3x+1/x'

but neither x nor 1 are polynomials, what is this?? or are they just 'zero degree' polynomials? then they are not polynomials, they are monomials, and what is the relevance of the definition in that case?