Consider the function
that sends a rational number q ∈ Q {\displaystyle {}q\in \mathbb {Q} } to q {\displaystyle {}q} , and all the irrational numbers to 0 {\displaystyle {}0} . Is this a linear map? Is it compatible with multiplication by a scalar?