What is the rigorous definition of the ratio of two numbers?

I have tried learning about ratios and proportions from a couple of books, but I have problems with the approaches they take.

First of all, a definition is never actually given. Examples are given concerning only natural numbers. For example one definition I encountered was the ratio of object $x$ to object $y$ is $m:n$ if for every $m$ $x's$ there are $n$ $y's$. Good enough but what about rational and real numbers ?

Secondly, if a ratio is supposed to be a relation between two quantities (which it is defined vaguely in many books) then why is it treated as a number, for example saying things like the ratio of a to b is greater than that of c to d and so on.

So the question is:

What is a definition of the ratio between two real numbers $a$ and $b$. Is it fair to say that $a$ and $b$ have ratio $m:n$ if $\frac{a}{m} = \frac{b}{n}$, for example?

• The ratio of the real numbers $a$ and $b$ is the real number $\frac ab$. You are freely allowed to expand or simplify that fraction if you so desire, and what makes two ratios equal are exactly the same as makes two normal fractions equal. – Arthur Dec 23 '15 at 14:17
• I think you switched $m$ and $n$: if for every $m x$ there are $n y$ then the ration $x:y$ is $n\colon m$ ( think $m$ large compared to $n$). – Orest Bucicovschi Dec 23 '15 at 14:45
• if for every 2 apples there are 3 oranges then the ratio of apples to oranges is 2:3,no ? – alexgiorev Dec 23 '15 at 14:47

I don't know if this explanation will be sufficient for your purposes, but at a high level, a ratio $a/b$ is simply the product of $a$ and the multiplicative inverse of $b$.