Understanding GCD: Why gcd(36, 24) = gcd(24, 12) = gcd(12, 0) = 12

The greatest common divisor (GCD) is a fundamental concept in number theory that helps simplify fractions, solve equations, and uncover the underlying structure of integers. One elegant property of the GCD is that it remains unchanged when you replace one or both arguments with one of the zeros — a fact clearly demonstrated by the chain:

gcd(36, 24) = gcd(24, 12) = gcd(12, 0) = 12

Understanding the Context

In this article, we’ll explore this relationship step by step, explain the mathematical reasoning, and show how the GCD works across these calculations using efficient methods and principles.


What is the GCD?

The greatest common divisor (GCD) of two integers is the largest positive integer that divides both numbers evenly — it represents their highest shared factor. For example, the factors of 36 are 1, 2, 3, 4, 6, 9, 12, 18, 36, and the factors of 24 are 1, 2, 3, 4, 6, 8, 12, 24. The largest number that appears in both lists is 12, so gcd(36, 24) = 12

Key Insights


Step 1: Computing gcd(36, 24)

To compute gcd(36, 24) efficiently, we apply the Euclidean Algorithm, which relies on the principle that gcd(a, b) = gcd(b, a mod b).

Step-by-step:

  • 36 ÷ 24 = 1 with a remainder of 12 → gcd(36, 24) = gcd(24, 12)
  • 24 ÷ 12 = 2 with a remainder of 0 → gcd(24, 12) = gcd(12, 0)

Final Thoughts

When the second number becomes 0, the GCD is the non-zero number:

gcd(36, 24) = 12


Step 2: Simplifying gcd(24, 12)

From Step 1, we already have:

gcd(24, 12)

Apply the Euclidean Algorithm again:

  • 24 ÷ 12 = 2 with remainder 0
  • Since remainder is 0, gcd(24, 12) = 12

This shows:
gcd(36, 24) = gcd(24, 12) = 12