11

The title pretty much explains my question. While studying theory of numbers I came across this problem. The way I did LCM in childhood gave me a negative result.Maybe the method I used is wrong.

But according to the book, LCM(-8,20)= 40

If I use the formula LCM(a,b)= |a.b|/GCD(a,b), Then I get the right answer. But this involves finding out gcd first. Is there a direct way to solve this problem?

Thank you in advance.

Sunny
  • 111
  • 1
    The lowest common multiple of $[a,b]$ is the least positive integer such that both numbers divide into. And any other multiple of those two numbers, the lcm divides into as well. – user60887 Oct 27 '13 at 16:41
  • The only difference of negative and positive number is that the LCM of negative numbers, factor is negative and positive number, factor is positive. – Guides Jul 25 '21 at 07:59

4 Answers4

6

It is defined that: the least common multiple of two integers a and b, usually denoted by LCM(a, b), is the smallest POSITIVE integer that is divisible by both a and b. So the result must always be positive. Direct way to solve :Ignore the negative signs. Calculate as if everything's positive. Hope I answered your question :)

3

An alternative to using the $\operatorname{lcm}(a,b)=\frac{|a\cdot b|}{\gcd(a,b)}$ relationship, is to break the absolute value of the numbers into their prime factors, and then multiply the highest powers of each prime (lcm by prime factorization).

For example, $|-8|=2^3$, and $|20|=2^2\cdot 5$, and so $\operatorname{lcm}(-8,20)=2^3\cdot5$.

J. W. Perry
  • 5,447
  • 3
  • 22
  • 28
1

LCM of $a$ and $b$ can be defined in any commutative ring by the following universal property: $$a,b \mid c\quad\text{and}\quad a,b\mid d\implies c\mid d$$ It's easy to prove that in integral domains, it's unique up to a multiplication by a unit.

In $\mathbb Z$, the units are $1, -1$, so LCM is unique up to a sign, so it would be more correct to say $\text{lcm}(-8,20)=\{40,-40\}$, but I guess your convention is always to take the positive result.

user2345215
  • 16,422
1

Note : The LCM is defined as the least common multiple of the numbers that is positive. Or else, the answer would be $- \infty$. This explains it.

zscoder
  • 1,043
  • 1
    The LCM is defined to be the least positive integer such that both input integers divide it; there is no restriction on the integers provided as input, except that they must be nonzero. – apnorton May 08 '15 at 14:19