Thursday 24 October 2013

elementary number theory - GCD of rationals



Disclaimer: I'm an engineer, not a mathematician



Somebody claimed that $\gcd$ only is applicable for integers, but it seems I'm perfectly able to apply it to rationals also:



$$ \gcd\left(\frac{13}{6}, \frac{3}{4} \right) = \frac{1}{12} $$



I can do this for a number of cases on sight, but I need a method. I tried Euclid's algorithm, but I'm not sure about the end condition: a remainder of 0 doesn't seem to work here.




So I tried the following:



$$\gcd\left(\frac{a}{b}, \frac{c}{d} \right) = \frac{\gcd(a\cdot d, c \cdot b)}{b \cdot d}$$



This seems to work, but I'm just following my intuition, and I would like to know if this is a valid equation, maybe the correct method. (It is in any case consistent with $\gcd$ over the natural numbers.)



I'm not a mathematician, so please type slowly :-)


Answer



In the ancient Greek sense, if we have two quantities $x$ and $y$, then the quantity $z$ is a common measure of $x$ and $y$ if each of $x$ and $y$ is an integer multiple of $z$. The quantities involved were not thought of as numbers, but of course they were what we think of as positive. So for example the diagonal of a square, and the diagonal of a square whose sides are $50\%$ bigger, have a common measure. But some pairs of quantities are incommensurable, like the side and diagonal of a square.




Any two rationals, unless they are both $0$, have a greatest common measure. You are therefore perfectly correct. The two rationals also have a least number that they both measure. So if you had further argued that two rationals, not both $0$, have a least positive common multiple, you would also be right.



Your calculation method is also correct. One brings the two rationals to a common denominator $q$, say as $\frac{x}{q}$ and $\frac{y}{q}$. Then the $\gcd$ is
$\frac{\gcd(x,y)}{q}$. You chose the common denominator $q=bd$. Any common denominator will do, and will produce the same $\gcd$.



Most of the standard theorems about $\gcd$ and lcm for integers extend in a straightforward way to results about the $\gcd$ and lcm for rationals. For example, a mild variant of what we nowadays call the Euclidean algorithm will compute the $\gcd$ of two positive rationals. Actually, this variant is the original Euclidean algorithm!



Remark: A number of programs, including Mathematica, accept rationals as inputs to their $\gcd$ function. The same appears to be true of WolframAlpha, which has the great advantage of being freely accessible. One way, perhaps, to (sort of) settle the argument in your favour is to type $\gcd(3/7, 12/22)$ into Alpha. It will, probably, return $\frac{3}{77}$ (it did when I used it). With other rationals, test first, Alpha is not bug-free.


No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...