LCM Calculator with step by step solution



Tutorial

The LCM(Least Common Multiple) of two positive integers a,b, is defined as the smallest positive integer that's divisible by both a and b.For example, the LCM of 18 and 24 is 72.To work out the LCM of two positive integers, one fact one can use is \begin{equation} gcd(a,b)\times lcm(a,b)=a \times b \end{equation} Where $gcd(a,b)$ denote the greatest common divisor, or greatest common factor(GCF) of a and b. Hence, to work out $lcm(a,b)$, it's suffice to work out $gcd(a,b)$, which can be done by using Euclidean Algorithm, after which one can use $(1)$, to deduce $$ lcm(a,b)=\frac{a \times b}{gcd(a,b)} $$ For example, to find $lcm(56,84)$, one find $gcd(56,84)=28$, hence $$ lcm(56,84)=\frac{56 \times 84}{28}= \frac{(28 \times 2) \times 84}{28} $$ cancel out 28, we get $$ lcm(56,84)=2 \times 84=168 $$ The fact $(1)$ is the key for such method to work, but why equation $(1)$ holds? A proof goes as follows:
Suppose a and b are two positive integers. Let $s$ be a multiple of both a and b, ie. $$ s=k\times a $$ $$ s=m \times b$$ k and m are positive integers,from the two above equation, we know $$ k \times a=m \times b $$ Hence $$ k \times (\frac{a}{gcd(a,b)})=m \times (\frac{b}{gcd(a,b)})$$ Since $$ gcd(\frac{a}{gcd(a,b)},\frac{b}{gcd(a,b)})=1 $$ so m is divisible by $ \frac{a}{gcd(a,b)} $, in other words, $$ m=t \times \frac{a}{gcd(a,b)} $$ Here t is an integer, to continue, we found, $$ s=m \times b=t \times \frac{a}{gcd(a,b)} \times b\geq 1 \times \frac{a}{gcd(a,b)} \times b = \frac{a \times b}{gcd(a,b)} $$ Since $ \frac{a \times b}{gcd(a,b)} $ is obviously an multiple of both a and b, so,$$ lcm(a,b)=\frac{a \times b}{gcd(a,b)} $$ rearrange the equation, we get $(1)$.