Euclid's lemma

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Not to be confused with Euclid's theorem or Euclidean algorithm.

In number theory, Euclid's lemma is a lemma that captures a fundamental property of prime numbers, namely: If a prime divides the product of two numbers, it must divide at least one of those numbers. It is also called Euclid's first theorem[1][2] although that name more properly belongs to the side-angle-side condition for showing that triangles are congruent.[3] For example, 133 × 143 = 19019, and since 19019 is divisible by 19, the lemma implies that one or both of 133 or 143 must be as well. In fact, 133 = 19 × 7.

This property is the key[4] in the proof of the fundamental theorem of arithmetic. It is used to define prime elements, a generalization of prime numbers to arbitrary commutative rings.

The lemma is not true for composite numbers. For example, 4 divides neither 6 nor 10, yet 4 does divide their product, 60.


Let p be a prime number, and assume p divides the product of two integers a and b. (In symbols this is written p|ab. Its negation, p does not divide ab is written pab.) Then p|a or p|b (or both). Equivalent statements are:

  • If pa and pb, then pab.
  • If pa and p|ab, then p|b.

Euclid's lemma can be generalized from prime numbers to any integers:

If n|ab, and n is relatively prime to a, then n|b.

This is a generalization because if n is prime, either

  • n|a or
  • n is relatively prime to a. In this second possibility, na so n|b.


The lemma first appears as proposition 30 in Book VII of Euclid's Elements. It is included in practically every book that covers elementary number theory.[5]:14[6][7][8][9]

The generalization of the lemma to integers appeared in Jean Prestet's textbook Nouveaux Elémens de Mathématiques in 1681.[10]

In Carl Friedrich Gauss's treatise Disquisitiones Arithmeticae, the statement of the lemma is Euclid's Proposition 14 (Section 2), which he uses to prove the uniqueness of the decomposition product of prime factors of an integer (Theorem 16), admitting the existence as "obvious." From this existence and uniqueness he then deduces the generalization of prime numbers to integers.[5]:Article 19 For this reason, the generalization of Euclid's lemma is sometimes referred to as Gauss's lemma, but some believe this usage to be incorrect[11] due to confusion with Gauss's lemma on quadratic residues.


The usual proof involves another lemma called Bézout's identity. This states that if x and y are relatively prime integers (i.e. they share no common divisors other than 1) there exist integers r and s such that

Let a and n be relatively prime, and assume that n|ab. By Bézout's identity, there are r and s making

Multiply both sides by b:

The first term on the left is divisible by n, and the second term is divisible by ab which by hypothesis is divisible by n. Therefore their sum, b, is also divisible by n. This is the generalization of Euclid's lemma mentioned above.

See also[edit]


  1. ^ Bajnok, Béla (2013), An Invitation to Abstract Mathematics, Undergraduate Texts in Mathematics, Springer, Theorem 14.5, ISBN 9781461466369 .
  2. ^ Joyner, David; Kreminski, Richard; Turisco, Joann (2004), Applied Abstract Algebra, JHU Press, Proposition 1.5.8, p. 25, ISBN 9780801878220 .
  3. ^ Martin, G. E. (2012), The Foundations of Geometry and the Non-Euclidean Plane, Undergraduate Texts in Mathematics, Springer, p. 125, ISBN 9781461257257 .
  4. ^ In general, to show that a domain is a unique factorization domain, it suffices to prove Euclid's lemma and ACCP.
  5. ^ a b Gauss, Carl Friedrich (1986), Disquisitiones Arithmeticae, translated by Arthur A. Clarke (2nd ed.), New York: Springer, ISBN 0387962549 
  6. ^ Hardy, G. H.; Wright, E. M. (1980), An Introduction to the Theory of Numbers (5th ed.), Oxford: Oxford University Press, Theorem 3, ISBN 978-0198531715 
  7. ^ Ireland, Kenneth; Rosen, Michael (1990), A Classical Introduction to Modern Number Theory (2nd ed.), New York: Springer, Proposition 1.1.1, ISBN 0-387-97329-X 
  8. ^ Landau, Edmund (1966), Elementary Number Theory, New York: Chelsea, Theorem 15 
  9. ^ Riesel, Hans (1994), Prime Numbers and Computer Methods for Factorization (2nd ed.), Boston: Birkhäuser, Theorem A2.1, ISBN 0-8176-3743-5 
  10. ^ Euclid. Les Éléments, traduction, commentaires et notes (in French) 2. Translated by Bernard Vitrac. pp. 338–339. 
  11. ^ Weisstein, Eric W., "Euclid's Lemma", MathWorld.