TH

ตัวหารร่วมมาก (ห.ร.ม.) หรือ Greatest Common Divisor (GCD) คือ จำนวนเต็มบวกที่มีค่ามากที่สุดที่สามารถนำไปหารจำนวนเต็มตั้งแต่ 2 จำนวนขึ้นไปได้ลงตัวพอดี ห.ร.ม. เป็นพื้นฐานสำคัญในการลดทอนเศษส่วนให้เป็นเศษส่วนอย่างต่ำ และการแก้โจทย์ปัญหาที่เกี่ยวกับการแบ่งสิ่งของให้มีขนาดเท่าๆ กันและได้ชิ้นใหญ่ที่สุด

EN

The Greatest Common Divisor (GCD), also known as the Greatest Common Factor (GCF), is the largest positive integer that divides two or more integers without leaving a remainder. It is fundamental for simplifying fractions and solving word problems involving dividing items into the largest possible equal parts.

1

🔍 การหา ห.ร.ม. โดยการพิจารณาตัวประกอบ 🔍 Finding GCD by Listing Factors

TH

วิธีนี้คือการหา ตัวประกอบทั้งหมด ของแต่ละจำนวน จากนั้นมองหาตัวประกอบที่มีซ้ำกัน (ตัวหารร่วม) และเลือกตัวที่มี ค่ามากที่สุด มาเป็นคำตอบ วิธีนี้เหมาะสำหรับตัวเลขที่มีค่าน้อย

EN

This method involves listing all factors of each number, identifying the common factors, and then selecting the greatest one as the answer. This is best suited for small numbers.

Example 1.1

จงหา ห.ร.ม. ของ 12 และ 18

$$ \begin{aligned} \text{ตัวประกอบของ } \color{#3949ab}{\mathbf{12}} \text{ คือ } &\color{#3949ab}{\mathbf{1}}, \color{#3949ab}{\mathbf{2}}, \color{#3949ab}{\mathbf{3}}, \color{#2e7d32}{\mathbf{6}}, 12 \\ \text{ตัวประกอบของ } \color{#3949ab}{\mathbf{18}} \text{ คือ } &\color{#3949ab}{\mathbf{1}}, \color{#3949ab}{\mathbf{2}}, \color{#3949ab}{\mathbf{3}}, \color{#2e7d32}{\mathbf{6}}, 9, 18 \\ \text{ตัวประกอบร่วมคือ } &\color{#3949ab}{1}, \color{#3949ab}{2}, \color{#3949ab}{3}, \color{#2e7d32}{\textbf{6}} \\ \text{ดังนั้น ห.ร.ม. คือ } &\color{#2e7d32}{\textbf{6}} \end{aligned} $$

Find the GCD of 12 and 18

$$ \begin{aligned} \text{Factors of } \color{#3949ab}{\mathbf{12}} \text{ are } &\color{#3949ab}{\mathbf{1}}, \color{#3949ab}{\mathbf{2}}, \color{#3949ab}{\mathbf{3}}, \color{#2e7d32}{\mathbf{6}}, 12 \\ \text{Factors of } \color{#3949ab}{\mathbf{18}} \text{ are } &\color{#3949ab}{\mathbf{1}}, \color{#3949ab}{\mathbf{2}}, \color{#3949ab}{\mathbf{3}}, \color{#2e7d32}{\mathbf{6}}, 9, 18 \\ \text{Common factors are } &\color{#3949ab}{1}, \color{#3949ab}{2}, \color{#3949ab}{3}, \color{#2e7d32}{\textbf{6}} \\ \text{Therefore, GCD is } &\color{#2e7d32}{\textbf{6}} \end{aligned} $$
Example 1.2

จงหา ห.ร.ม. ของ 16 และ 24

$$ \begin{aligned} \text{ตัวประกอบของ } \color{#3949ab}{\mathbf{16}} \text{ คือ } &\color{#3949ab}{\mathbf{1}}, \color{#3949ab}{\mathbf{2}}, \color{#3949ab}{\mathbf{4}}, \color{#2e7d32}{\mathbf{8}}, 16 \\ \text{ตัวประกอบของ } \color{#3949ab}{\mathbf{24}} \text{ คือ } &\color{#3949ab}{\mathbf{1}}, \color{#3949ab}{\mathbf{2}}, 3, \color{#3949ab}{\mathbf{4}}, 6, \color{#2e7d32}{\mathbf{8}}, 12, 24 \\ \text{ตัวประกอบร่วมคือ } &\color{#3949ab}{1}, \color{#3949ab}{2}, \color{#3949ab}{4}, \color{#2e7d32}{\textbf{8}} \\ \text{ดังนั้น ห.ร.ม. คือ } &\color{#2e7d32}{\textbf{8}} \end{aligned} $$

Find the GCD of 16 and 24

$$ \begin{aligned} \text{Factors of } \color{#3949ab}{\mathbf{16}} \text{ are } &\color{#3949ab}{\mathbf{1}}, \color{#3949ab}{\mathbf{2}}, \color{#3949ab}{\mathbf{4}}, \color{#2e7d32}{\mathbf{8}}, 16 \\ \text{Factors of } \color{#3949ab}{\mathbf{24}} \text{ are } &\color{#3949ab}{\mathbf{1}}, \color{#3949ab}{\mathbf{2}}, 3, \color{#3949ab}{\mathbf{4}}, 6, \color{#2e7d32}{\mathbf{8}}, 12, 24 \\ \text{Common factors are } &\color{#3949ab}{1}, \color{#3949ab}{2}, \color{#3949ab}{4}, \color{#2e7d32}{\textbf{8}} \\ \text{Therefore, GCD is } &\color{#2e7d32}{\textbf{8}} \end{aligned} $$
Example 1.3

จงหา ห.ร.ม. ของ 15 และ 28

$$ \begin{aligned} \text{ตัวประกอบของ } \color{#3949ab}{\mathbf{15}} \text{ คือ } &\color{#2e7d32}{\mathbf{1}}, 3, 5, 15 \\ \text{ตัวประกอบของ } \color{#3949ab}{\mathbf{28}} \text{ คือ } &\color{#2e7d32}{\mathbf{1}}, 2, 4, 7, 14, 28 \\ \text{ตัวประกอบร่วมคือ } &\color{#2e7d32}{\textbf{1}} \\ \text{ดังนั้น ห.ร.ม. คือ } &\color{#2e7d32}{\textbf{1}} \quad (\text{จำนวนเฉพาะสัมพัทธ์}) \end{aligned} $$

Find the GCD of 15 and 28

$$ \begin{aligned} \text{Factors of } \color{#3949ab}{\mathbf{15}} \text{ are } &\color{#2e7d32}{\mathbf{1}}, 3, 5, 15 \\ \text{Factors of } \color{#3949ab}{\mathbf{28}} \text{ are } &\color{#2e7d32}{\mathbf{1}}, 2, 4, 7, 14, 28 \\ \text{Common factors are } &\color{#2e7d32}{\textbf{1}} \\ \text{Therefore, GCD is } &\color{#2e7d32}{\textbf{1}} \quad (\text{Mutually prime numbers}) \end{aligned} $$
Example 1.4

จงหา ห.ร.ม. ของ 8, 12 และ 20

$$ \begin{aligned} \text{ตัวประกอบของ } \color{#3949ab}{\mathbf{8}} \text{ คือ } &\color{#3949ab}{\mathbf{1}}, \color{#3949ab}{\mathbf{2}}, \color{#2e7d32}{\mathbf{4}}, 8 \\ \text{ตัวประกอบของ } \color{#3949ab}{\mathbf{12}} \text{ คือ } &\color{#3949ab}{\mathbf{1}}, \color{#3949ab}{\mathbf{2}}, 3, \color{#2e7d32}{\mathbf{4}}, 6, 12 \\ \text{ตัวประกอบของ } \color{#3949ab}{\mathbf{20}} \text{ คือ } &\color{#3949ab}{\mathbf{1}}, \color{#3949ab}{\mathbf{2}}, \color{#2e7d32}{\mathbf{4}}, 5, 10, 20 \\ \text{ตัวประกอบร่วมคือ } &\color{#3949ab}{1}, \color{#3949ab}{2}, \color{#2e7d32}{\textbf{4}} \\ \text{ดังนั้น ห.ร.ม. คือ } &\color{#2e7d32}{\textbf{4}} \end{aligned} $$

Find the GCD of 8, 12 and 20

$$ \begin{aligned} \text{Factors of } \color{#3949ab}{\mathbf{8}} \text{ are } &\color{#3949ab}{\mathbf{1}}, \color{#3949ab}{\mathbf{2}}, \color{#2e7d32}{\mathbf{4}}, 8 \\ \text{Factors of } \color{#3949ab}{\mathbf{12}} \text{ are } &\color{#3949ab}{\mathbf{1}}, \color{#3949ab}{\mathbf{2}}, 3, \color{#2e7d32}{\mathbf{4}}, 6, 12 \\ \text{Factors of } \color{#3949ab}{\mathbf{20}} \text{ are } &\color{#3949ab}{\mathbf{1}}, \color{#3949ab}{\mathbf{2}}, \color{#2e7d32}{\mathbf{4}}, 5, 10, 20 \\ \text{Common factors are } &\color{#3949ab}{1}, \color{#3949ab}{2}, \color{#2e7d32}{\textbf{4}} \\ \text{Therefore, GCD is } &\color{#2e7d32}{\textbf{4}} \end{aligned} $$
Example 1.5

จงหา ห.ร.ม. ของ 9, 21 และ 30

$$ \begin{aligned} \text{ตัวประกอบของ } \color{#3949ab}{\mathbf{9}} \text{ คือ } &\color{#3949ab}{\mathbf{1}}, \color{#2e7d32}{\mathbf{3}}, 9 \\ \text{ตัวประกอบของ } \color{#3949ab}{\mathbf{21}} \text{ คือ } &\color{#3949ab}{\mathbf{1}}, \color{#2e7d32}{\mathbf{3}}, 7, 21 \\ \text{ตัวประกอบของ } \color{#3949ab}{\mathbf{30}} \text{ คือ } &\color{#3949ab}{\mathbf{1}}, 2, \color{#2e7d32}{\mathbf{3}}, 5, 6, 10, 15, 30 \\ \text{ตัวประกอบร่วมคือ } &\color{#3949ab}{1}, \color{#2e7d32}{\textbf{3}} \\ \text{ดังนั้น ห.ร.ม. คือ } &\color{#2e7d32}{\textbf{3}} \end{aligned} $$

Find the GCD of 9, 21 and 30

$$ \begin{aligned} \text{Factors of } \color{#3949ab}{\mathbf{9}} \text{ are } &\color{#3949ab}{\mathbf{1}}, \color{#2e7d32}{\mathbf{3}}, 9 \\ \text{Factors of } \color{#3949ab}{\mathbf{21}} \text{ are } &\color{#3949ab}{\mathbf{1}}, \color{#2e7d32}{\mathbf{3}}, 7, 21 \\ \text{Factors of } \color{#3949ab}{\mathbf{30}} \text{ are } &\color{#3949ab}{\mathbf{1}}, 2, \color{#2e7d32}{\mathbf{3}}, 5, 6, 10, 15, 30 \\ \text{Common factors are } &\color{#3949ab}{1}, \color{#2e7d32}{\textbf{3}} \\ \text{Therefore, GCD is } &\color{#2e7d32}{\textbf{3}} \end{aligned} $$
2

🧩 การหา ห.ร.ม. โดยการแยกตัวประกอบ 🧩 Finding GCD by Prime Factorization

TH

การแยกตัวประกอบ คือการเขียนจำนวนในรูปผลคูณของ จำนวนเฉพาะ (Prime Numbers) จากนั้นให้เลือก จำนวนเฉพาะที่มีร่วมกันในทุกบรรทัด มาคูณกัน ผลลัพธ์ที่ได้คือ ห.ร.ม.

EN

Prime factorization involves writing a number as a product of prime numbers. To find the GCD, select the common prime factors present in all rows and multiply them together.

Example 2.1

จงหา ห.ร.ม. ของ 24 และ 36

$$ \begin{aligned} \color{#3949ab}{\mathbf{24}} &= \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times 2 \times \color{#2e7d32}{\mathbf{3}} \\ \color{#3949ab}{\mathbf{36}} &= \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{3}} \times 3 \\ \text{ห.ร.ม.} &= \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{3}} \\ &= \color{#2e7d32}{\mathbf{12}} \end{aligned} $$

Find the GCD of 24 and 36

$$ \begin{aligned} \color{#3949ab}{\mathbf{24}} &= \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times 2 \times \color{#2e7d32}{\mathbf{3}} \\ \color{#3949ab}{\mathbf{36}} &= \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{3}} \times 3 \\ \text{GCD} &= \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{3}} \\ &= \color{#2e7d32}{\mathbf{12}} \end{aligned} $$
Example 2.2

จงหา ห.ร.ม. ของ 45 และ 60

$$ \begin{aligned} \color{#3949ab}{\mathbf{45}} &= \color{#2e7d32}{\mathbf{3}} \times 3 \times \color{#2e7d32}{\mathbf{5}} \\ \color{#3949ab}{\mathbf{60}} &= 2 \times 2 \times \color{#2e7d32}{\mathbf{3}} \times \color{#2e7d32}{\mathbf{5}} \\ \text{ห.ร.ม.} &= \color{#2e7d32}{\mathbf{3}} \times \color{#2e7d32}{\mathbf{5}} \\ &= \color{#2e7d32}{\mathbf{15}} \end{aligned} $$

Find the GCD of 45 and 60

$$ \begin{aligned} \color{#3949ab}{\mathbf{45}} &= \color{#2e7d32}{\mathbf{3}} \times 3 \times \color{#2e7d32}{\mathbf{5}} \\ \color{#3949ab}{\mathbf{60}} &= 2 \times 2 \times \color{#2e7d32}{\mathbf{3}} \times \color{#2e7d32}{\mathbf{5}} \\ \text{GCD} &= \color{#2e7d32}{\mathbf{3}} \times \color{#2e7d32}{\mathbf{5}} \\ &= \color{#2e7d32}{\mathbf{15}} \end{aligned} $$
Example 2.3

จงหา ห.ร.ม. ของ 42, 105 และ 147

$$ \begin{aligned} \color{#3949ab}{\mathbf{42}} &= 2 \times \color{#2e7d32}{\mathbf{3}} \times \color{#2e7d32}{\mathbf{7}} \\ \color{#3949ab}{\mathbf{105}} &= \color{#2e7d32}{\mathbf{3}} \times 5 \times \color{#2e7d32}{\mathbf{7}} \\ \color{#3949ab}{\mathbf{147}} &= \color{#2e7d32}{\mathbf{3}} \times \color{#2e7d32}{\mathbf{7}} \times 7 \\ \text{ห.ร.ม.} &= \color{#2e7d32}{\mathbf{3}} \times \color{#2e7d32}{\mathbf{7}} \\ &= \color{#2e7d32}{\mathbf{21}} \end{aligned} $$

Find the GCD of 42, 105 and 147

$$ \begin{aligned} \color{#3949ab}{\mathbf{42}} &= 2 \times \color{#2e7d32}{\mathbf{3}} \times \color{#2e7d32}{\mathbf{7}} \\ \color{#3949ab}{\mathbf{105}} &= \color{#2e7d32}{\mathbf{3}} \times 5 \times \color{#2e7d32}{\mathbf{7}} \\ \color{#3949ab}{\mathbf{147}} &= \color{#2e7d32}{\mathbf{3}} \times \color{#2e7d32}{\mathbf{7}} \times 7 \\ \text{GCD} &= \color{#2e7d32}{\mathbf{3}} \times \color{#2e7d32}{\mathbf{7}} \\ &= \color{#2e7d32}{\mathbf{21}} \end{aligned} $$
Example 2.4

จงหา ห.ร.ม. ของ 18, 27 และ 45

$$ \begin{aligned} \color{#3949ab}{\mathbf{18}} &= 2 \times \color{#2e7d32}{\mathbf{3}} \times \color{#2e7d32}{\mathbf{3}} \\ \color{#3949ab}{\mathbf{27}} &= \color{#2e7d32}{\mathbf{3}} \times \color{#2e7d32}{\mathbf{3}} \times 3 \\ \color{#3949ab}{\mathbf{45}} &= \color{#2e7d32}{\mathbf{3}} \times \color{#2e7d32}{\mathbf{3}} \times 5 \\ \text{ห.ร.ม.} &= \color{#2e7d32}{\mathbf{3}} \times \color{#2e7d32}{\mathbf{3}} \\ &= \color{#2e7d32}{\mathbf{9}} \end{aligned} $$

Find the GCD of 18, 27 and 45

$$ \begin{aligned} \color{#3949ab}{\mathbf{18}} &= 2 \times \color{#2e7d32}{\mathbf{3}} \times \color{#2e7d32}{\mathbf{3}} \\ \color{#3949ab}{\mathbf{27}} &= \color{#2e7d32}{\mathbf{3}} \times \color{#2e7d32}{\mathbf{3}} \times 3 \\ \color{#3949ab}{\mathbf{45}} &= \color{#2e7d32}{\mathbf{3}} \times \color{#2e7d32}{\mathbf{3}} \times 5 \\ \text{GCD} &= \color{#2e7d32}{\mathbf{3}} \times \color{#2e7d32}{\mathbf{3}} \\ &= \color{#2e7d32}{\mathbf{9}} \end{aligned} $$
Example 2.5

จงหา ห.ร.ม. ของ 32, 48 และ 80

$$ \begin{aligned} \color{#3949ab}{\mathbf{32}} &= \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times 2 \\ \color{#3949ab}{\mathbf{48}} &= \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times 3 \\ \color{#3949ab}{\mathbf{80}} &= \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times 5 \\ \text{ห.ร.ม.} &= \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \\ &= \color{#2e7d32}{\mathbf{16}} \end{aligned} $$

Find the GCD of 32, 48 and 80

$$ \begin{aligned} \color{#3949ab}{\mathbf{32}} &= \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times 2 \\ \color{#3949ab}{\mathbf{48}} &= \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times 3 \\ \color{#3949ab}{\mathbf{80}} &= \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times 5 \\ \text{GCD} &= \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \times \color{#2e7d32}{\mathbf{2}} \\ &= \color{#2e7d32}{\mathbf{16}} \end{aligned} $$
3

➗ การหา ห.ร.ม. โดยการหารสั้น ➗ Finding GCD by Short Division

TH

นำจำนวนทั้งหมดตั้ง หารสั้น โดยหา จำนวนเฉพาะที่หารทุกตัวได้ลงตัว มาหารไปเรื่อยๆ จนกว่าจะไม่มีจำนวนเฉพาะใดหารได้ลงตัวครบทุกตัวอีก จากนั้นนำ ตัวหารทั้งหมดมาคูณกัน

EN

Set up short division. Find a prime number that divides all numbers evenly and repeat until no such prime number exists. Then, multiply all the divisors together.

Example 3.1

จงหา ห.ร.ม. ของ 24 และ 36 โดยการหารสั้น

$$ \begin{array}{r|rr} \color{#2e7d32}{\mathbf{2}} & 24 & 36 \\ \hline \color{#2e7d32}{\mathbf{2}} & 12 & 18 \\ \hline \color{#2e7d32}{\mathbf{3}} & 6 & 9 \\ \hline & 2 & 3 \end{array} $$
$$ \begin{aligned} \text{ห.ร.ม.} &= \color{#2e7d32}{2} \times \color{#2e7d32}{2} \times \color{#2e7d32}{3} \\ &= \color{#2e7d32}{\mathbf{12}} \end{aligned} $$

Find the GCD of 24 and 36 by short division.

$$ \begin{array}{r|rr} \color{#2e7d32}{\mathbf{2}} & 24 & 36 \\ \hline \color{#2e7d32}{\mathbf{2}} & 12 & 18 \\ \hline \color{#2e7d32}{\mathbf{3}} & 6 & 9 \\ \hline & 2 & 3 \end{array} $$
$$ \begin{aligned} \text{GCD} &= \color{#2e7d32}{2} \times \color{#2e7d32}{2} \times \color{#2e7d32}{3} \\ &= \color{#2e7d32}{\mathbf{12}} \end{aligned} $$
Example 3.2

จงหา ห.ร.ม. ของ 30, 45 และ 60

$$ \begin{array}{r|rrr} \color{#2e7d32}{\mathbf{3}} & 30 & 45 & 60 \\ \hline \color{#2e7d32}{\mathbf{5}} & 10 & 15 & 20 \\ \hline & 2 & 3 & 4 \end{array} $$
$$ \begin{aligned} \text{ห.ร.ม.} &= \color{#2e7d32}{3} \times \color{#2e7d32}{5} \\ &= \color{#2e7d32}{\mathbf{15}} \end{aligned} $$

Find the GCD of 30, 45 and 60

$$ \begin{array}{r|rrr} \color{#2e7d32}{\mathbf{3}} & 30 & 45 & 60 \\ \hline \color{#2e7d32}{\mathbf{5}} & 10 & 15 & 20 \\ \hline & 2 & 3 & 4 \end{array} $$
$$ \begin{aligned} \text{GCD} &= \color{#2e7d32}{3} \times \color{#2e7d32}{5} \\ &= \color{#2e7d32}{\mathbf{15}} \end{aligned} $$
Example 3.3

จงหา ห.ร.ม. ของ 56, 84 และ 140

$$ \begin{array}{r|rrr} \color{#2e7d32}{\mathbf{2}} & 56 & 84 & 140 \\ \hline \color{#2e7d32}{\mathbf{2}} & 28 & 42 & 70 \\ \hline \color{#2e7d32}{\mathbf{7}} & 14 & 21 & 35 \\ \hline & 2 & 3 & 5 \end{array} $$
$$ \begin{aligned} \text{ห.ร.ม.} &= \color{#2e7d32}{2} \times \color{#2e7d32}{2} \times \color{#2e7d32}{7} \\ &= \color{#2e7d32}{\mathbf{28}} \end{aligned} $$

Find the GCD of 56, 84 and 140

$$ \begin{array}{r|rrr} \color{#2e7d32}{\mathbf{2}} & 56 & 84 & 140 \\ \hline \color{#2e7d32}{\mathbf{2}} & 28 & 42 & 70 \\ \hline \color{#2e7d32}{\mathbf{7}} & 14 & 21 & 35 \\ \hline & 2 & 3 & 5 \end{array} $$
$$ \begin{aligned} \text{GCD} &= \color{#2e7d32}{2} \times \color{#2e7d32}{2} \times \color{#2e7d32}{7} \\ &= \color{#2e7d32}{\mathbf{28}} \end{aligned} $$
Example 3.4

จงหา ห.ร.ม. ของ 72 และ 108

$$ \begin{array}{r|rr} \color{#2e7d32}{\mathbf{2}} & 72 & 108 \\ \hline \color{#2e7d32}{\mathbf{2}} & 36 & 54 \\ \hline \color{#2e7d32}{\mathbf{3}} & 18 & 27 \\ \hline \color{#2e7d32}{\mathbf{3}} & 6 & 9 \\ \hline & 2 & 3 \end{array} $$
$$ \begin{aligned} \text{ห.ร.ม.} &= \color{#2e7d32}{2} \times \color{#2e7d32}{2} \times \color{#2e7d32}{3} \times \color{#2e7d32}{3} \\ &= \color{#2e7d32}{\mathbf{36}} \end{aligned} $$

Find the GCD of 72 and 108

$$ \begin{array}{r|rr} \color{#2e7d32}{\mathbf{2}} & 72 & 108 \\ \hline \color{#2e7d32}{\mathbf{2}} & 36 & 54 \\ \hline \color{#2e7d32}{\mathbf{3}} & 18 & 27 \\ \hline \color{#2e7d32}{\mathbf{3}} & 6 & 9 \\ \hline & 2 & 3 \end{array} $$
$$ \begin{aligned} \text{GCD} &= \color{#2e7d32}{2} \times \color{#2e7d32}{2} \times \color{#2e7d32}{3} \times \color{#2e7d32}{3} \\ &= \color{#2e7d32}{\mathbf{36}} \end{aligned} $$
Example 3.5

จงหา ห.ร.ม. ของ 48, 72 และ 120

$$ \begin{array}{r|rrr} \color{#2e7d32}{\mathbf{2}} & 48 & 72 & 120 \\ \hline \color{#2e7d32}{\mathbf{2}} & 24 & 36 & 60 \\ \hline \color{#2e7d32}{\mathbf{2}} & 12 & 18 & 30 \\ \hline \color{#2e7d32}{\mathbf{3}} & 6 & 9 & 15 \\ \hline & 2 & 3 & 5 \end{array} $$

*หมายเหตุ: บรรทัดสุดท้าย (2, 3, 5) ไม่มีตัวหารใดที่หารลงตัวครบทั้ง 3 ตัวอีกแล้ว จึงยุติการหาร

$$ \begin{aligned} \text{ห.ร.ม.} &= \color{#2e7d32}{2} \times \color{#2e7d32}{2} \times \color{#2e7d32}{2} \times \color{#2e7d32}{3} \\ &= \color{#2e7d32}{\mathbf{24}} \end{aligned} $$

Find the GCD of 48, 72 and 120

$$ \begin{array}{r|rrr} \color{#2e7d32}{\mathbf{2}} & 48 & 72 & 120 \\ \hline \color{#2e7d32}{\mathbf{2}} & 24 & 36 & 60 \\ \hline \color{#2e7d32}{\mathbf{2}} & 12 & 18 & 30 \\ \hline \color{#2e7d32}{\mathbf{3}} & 6 & 9 & 15 \\ \hline & 2 & 3 & 5 \end{array} $$

*Note: At the last line (2, 3, 5), there is no common divisor for all 3 numbers, so division stops.

$$ \begin{aligned} \text{GCD} &= \color{#2e7d32}{2} \times \color{#2e7d32}{2} \times \color{#2e7d32}{2} \times \color{#2e7d32}{3} \\ &= \color{#2e7d32}{\mathbf{24}} \end{aligned} $$
4

⚙️ ขั้นตอนวิธีของยูคลิด ⚙️ Euclidean Algorithm

TH

ใช้สำหรับหา ห.ร.ม. ของตัวเลขที่มีค่ามากๆ โดยอาศัยหลักการ ตั้งหารเอาเศษ ทำได้โดยการนำตัวเลขที่มากกว่าเป็นตัวตั้ง และนำตัวเลขที่น้อยกว่าไปหาร นำเศษที่เหลือมาเป็นตัวหารรอบต่อไป ทำสลับไปเรื่อยๆ จนกว่า เศษจะเป็น 0 ตัวหารตัวสุดท้ายจะเป็น ห.ร.ม.

EN

Used to find the GCD of very large numbers based on division with remainder. Divide the larger number by the smaller number. Then, divide the previous divisor by the remainder. Repeat until the remainder is 0. The last non-zero divisor is the GCD.

Example 4.1

จงหา ห.ร.ม. ของ 18 และ 48 โดยขั้นตอนวิธีของยูคลิด

$$ \begin{aligned} 48 &= 18(2) + \color{#c2185b}{\mathbf{12}} \quad &\text{(เอา 18 ไปหาร 48 ได้ 2 เศษ 12)} \\ 18 &= \color{#c2185b}{\mathbf{12}}(1) + \color{#2e7d32}{\mathbf{6}} \quad &\text{(เอาเศษ 12 ไปหาร 18 ได้ 1 เศษ 6)} \\ \color{#c2185b}{\mathbf{12}} &= \color{#2e7d32}{\mathbf{6}}(2) + 0 \quad &\text{(เอาเศษ 6 ไปหาร 12 ได้ 2 เศษ 0)} \end{aligned} $$

เนื่องจากเศษเป็น 0 แล้ว ตัวหารตัวสุดท้ายคือ 6 ดังนั้น ห.ร.ม. = 6

Find the GCD of 18 and 48 using the Euclidean Algorithm.

$$ \begin{aligned} 48 &= 18(2) + \color{#c2185b}{\mathbf{12}} \quad &\text{(48 divided by 18 is 2 remainder 12)} \\ 18 &= \color{#c2185b}{\mathbf{12}}(1) + \color{#2e7d32}{\mathbf{6}} \quad &\text{(18 divided by 12 is 1 remainder 6)} \\ \color{#c2185b}{\mathbf{12}} &= \color{#2e7d32}{\mathbf{6}}(2) + 0 \quad &\text{(12 divided by 6 is 2 remainder 0)} \end{aligned} $$

Since the remainder is 0, the last divisor is 6. Therefore, GCD = 6

Example 4.2

จงหา ห.ร.ม. ของ 105 และ 252

$$ \begin{aligned} 252 &= 105(2) + \color{#c2185b}{\mathbf{42}} \\ 105 &= \color{#c2185b}{\mathbf{42}}(2) + \color{#2e7d32}{\mathbf{21}} \\ \color{#c2185b}{\mathbf{42}} &= \color{#2e7d32}{\mathbf{21}}(2) + 0 \end{aligned} $$

ดังนั้น ห.ร.ม. คือ 21

Find the GCD of 105 and 252

$$ \begin{aligned} 252 &= 105(2) + \color{#c2185b}{\mathbf{42}} \\ 105 &= \color{#c2185b}{\mathbf{42}}(2) + \color{#2e7d32}{\mathbf{21}} \\ \color{#c2185b}{\mathbf{42}} &= \color{#2e7d32}{\mathbf{21}}(2) + 0 \end{aligned} $$

Therefore, the GCD is 21

Example 4.3

จงหา ห.ร.ม. ของ 52 และ 124

$$ \begin{aligned} 124 &= 52(2) + \color{#c2185b}{\mathbf{20}} \\ 52 &= \color{#c2185b}{\mathbf{20}}(2) + \color{#c2185b}{\mathbf{12}} \\ \color{#c2185b}{\mathbf{20}} &= \color{#c2185b}{\mathbf{12}}(1) + \color{#c2185b}{\mathbf{8}} \\ \color{#c2185b}{\mathbf{12}} &= \color{#c2185b}{\mathbf{8}}(1) + \color{#2e7d32}{\mathbf{4}} \\ \color{#c2185b}{\mathbf{8}} &= \color{#2e7d32}{\mathbf{4}}(2) + 0 \end{aligned} $$

ดังนั้น ห.ร.ม. คือ 4

Find the GCD of 52 and 124

$$ \begin{aligned} 124 &= 52(2) + \color{#c2185b}{\mathbf{20}} \\ 52 &= \color{#c2185b}{\mathbf{20}}(2) + \color{#c2185b}{\mathbf{12}} \\ \color{#c2185b}{\mathbf{20}} &= \color{#c2185b}{\mathbf{12}}(1) + \color{#c2185b}{\mathbf{8}} \\ \color{#c2185b}{\mathbf{12}} &= \color{#c2185b}{\mathbf{8}}(1) + \color{#2e7d32}{\mathbf{4}} \\ \color{#c2185b}{\mathbf{8}} &= \color{#2e7d32}{\mathbf{4}}(2) + 0 \end{aligned} $$

Therefore, the GCD is 4

Example 4.4

จงหา ห.ร.ม. ของ 156 และ 348

$$ \begin{aligned} 348 &= 156(2) + \color{#c2185b}{\mathbf{36}} \\ 156 &= \color{#c2185b}{\mathbf{36}}(4) + \color{#2e7d32}{\mathbf{12}} \\ \color{#c2185b}{\mathbf{36}} &= \color{#2e7d32}{\mathbf{12}}(3) + 0 \end{aligned} $$

ดังนั้น ห.ร.ม. คือ 12

Find the GCD of 156 and 348

$$ \begin{aligned} 348 &= 156(2) + \color{#c2185b}{\mathbf{36}} \\ 156 &= \color{#c2185b}{\mathbf{36}}(4) + \color{#2e7d32}{\mathbf{12}} \\ \color{#c2185b}{\mathbf{36}} &= \color{#2e7d32}{\mathbf{12}}(3) + 0 \end{aligned} $$

Therefore, the GCD is 12

Example 4.5

จงหา ห.ร.ม. ของ 462 และ 1071

$$ \begin{aligned} 1071 &= 462(2) + \color{#c2185b}{\mathbf{147}} \\ 462 &= \color{#c2185b}{\mathbf{147}}(3) + \color{#2e7d32}{\mathbf{21}} \\ \color{#c2185b}{\mathbf{147}} &= \color{#2e7d32}{\mathbf{21}}(7) + 0 \end{aligned} $$

ดังนั้น ห.ร.ม. คือ 21

Find the GCD of 462 and 1071

$$ \begin{aligned} 1071 &= 462(2) + \color{#c2185b}{\mathbf{147}} \\ 462 &= \color{#c2185b}{\mathbf{147}}(3) + \color{#2e7d32}{\mathbf{21}} \\ \color{#c2185b}{\mathbf{147}} &= \color{#2e7d32}{\mathbf{21}}(7) + 0 \end{aligned} $$

Therefore, the GCD is 21

5

📝 โจทย์ปัญหา ห.ร.ม. 📝 Word Problems involving GCD

TH

การประยุกつ์ใช้ ห.ร.ม. ในโจทย์ปัญหา มักจะมีคำใบ้ หรือคีย์เวิร์ดซ่อนอยู่ เช่นคำว่า "แบ่งให้เท่าๆ กัน", "มากที่สุด", "ยาวที่สุด", "ใหญ่ที่สุด" โดยที่ "ไม่เหลือเศษ" หากพบคำเหล่านี้ ให้สันนิษฐานไว้ก่อนว่าต้องใช้ ห.ร.ม. ในการหาคำตอบ

EN

Applying GCD in word problems often involves keywords such as "divide equally", "maximum", "longest", "largest" with "no remainder". When you spot these phrases, it's highly likely a GCD problem.

Example 5.1

มีแอปเปิล $30$ ผล และส้ม $45$ ผล ต้องการแบ่งใส่ตะกร้าให้แต่ละตะกร้ามีผลไม้ชนิดเดียวกันและจำนวนเท่าๆ กัน โดยให้มี จำนวนผลไม้ต่อตะกร้ามากที่สุด จะแบ่งได้ตะกร้าละกี่ผล?

วิธีทำ: หา ห.ร.ม. ของ 30 และ 45

$$ \begin{aligned} 30 &= \mathbf{15} \times 2 \\ 45 &= \mathbf{15} \times 3 \\ \text{ห.ร.ม.} &= \color{#2e7d32}{\mathbf{15}} \end{aligned} $$

ดังนั้น จะแบ่งผลไม้ได้ ตะกร้าละ 15 ผล

There are $30$ apples and $45$ oranges. We want to distribute them into baskets so that each basket has the same type and same number of fruits, with the maximum number of fruits per basket. How many fruits per basket?

Method: Find the GCD of 30 and 45.

$$ \begin{aligned} 30 &= \mathbf{15} \times 2 \\ 45 &= \mathbf{15} \times 3 \\ \text{GCD} &= \color{#2e7d32}{\mathbf{15}} \end{aligned} $$

Therefore, we can put 15 fruits per basket.

Example 5.2

มีเชือก 3 เส้น ยาว $48$ เมตร, $72$ เมตร และ $120$ เมตร ต้องการตัดเป็นเส้นสั้นๆ ให้ยาวเท่ากันทุกเส้นและ ยาวที่สุดเท่าที่จะทำได้ โดยไม่เหลือเศษ เชือกแต่ละเส้นจะยาวกี่เมตร?

วิธีทำ: หา ห.ร.ม. ของ 48, 72, 120 (จากตัวอย่างที่ 3.5)

$$\text{ห.ร.ม. ของ 48, 72 และ 120 คือ } 24$$

ดังนั้น จะตัดเชือกได้ยาวที่สุด เส้นละ 24 เมตร

There are 3 ropes measuring $48$ m, $72$ m, and $120$ m. We want to cut them into smaller equal pieces that are as long as possible with no remainders. How long will each piece be?

Method: Find the GCD of 48, 72, 120 (from Example 3.5)

$$\text{The GCD of 48, 72 and 120 is } 24$$

Therefore, each piece will be 24 meters long.

Example 5.3

ห้องสี่เหลี่ยมผืนผ้ากว้าง $300$ เซนติเมตร ยาว $450$ เซนติเมตร ต้องการปูกระเบื้องรูปสี่เหลี่ยมจัตุรัสให้เต็มพื้นที่พอดี โดยใช้กระเบื้องแผ่นใหญ่ที่สุด จะต้องใช้กระเบื้องขนาดเท่าใด?

วิธีทำ: ขนาดของกระเบื้องจัตุรัสที่ใหญ่ที่สุด คือ ห.ร.ม. ของความกว้างและความยาวห้อง

$$ \begin{aligned} 300 &= \mathbf{150} \times 2 \\ 450 &= \mathbf{150} \times 3 \\ \text{ห.ร.ม.} &= 150 \end{aligned} $$

ดังนั้น จะต้องใช้กระเบื้องขนาด $150 \times 150$ เซนติเมตร

A rectangular room is $300$ cm wide and $450$ cm long. We want to tile the floor perfectly using the largest possible square tiles. What should be the dimension of the tiles?

Method: The dimension of the largest square tile is the GCD of the width and length.

$$ \begin{aligned} 300 &= \mathbf{150} \times 2 \\ 450 &= \mathbf{150} \times 3 \\ \text{GCD} &= 150 \end{aligned} $$

Therefore, the tiles should be $150 \times 150$ cm.

Example 5.4

สนามหญ้ารูปสี่เหลี่ยมผืนผ้ากว้าง $120$ เมตร ยาว $160$ เมตร ต้องการปลูกต้นไม้รอบสนามให้มีระยะห่างระหว่างต้นเท่าๆ กัน และ ห่างกันมากที่สุด โดยให้มีต้นไม้อยู่ที่มุมทั้งสี่พอดี ระยะห่างระหว่างต้นไม้คือเท่าใด?

วิธีทำ: หาระยะห่างที่มากที่สุดจาก ห.ร.ม. ของ 120 และ 160

$$ \begin{aligned} 120 &= \mathbf{40} \times 3 \\ 160 &= \mathbf{40} \times 4 \\ \text{ห.ร.ม.} &= 40 \end{aligned} $$

ดังนั้น ระยะห่างระหว่างต้นไม้คือ 40 เมตร

A rectangular field is $120$ m wide and $160$ m long. Trees are to be planted around the perimeter at equal maximum distances apart, with a tree at each of the four corners. What is the distance between the trees?

Method: Find the maximum distance using the GCD of 120 and 160.

$$ \begin{aligned} 120 &= \mathbf{40} \times 3 \\ 160 &= \mathbf{40} \times 4 \\ \text{GCD} &= 40 \end{aligned} $$

Therefore, the distance between the trees is 40 meters.

Example 5.5

นักเรียน 3 กลุ่ม มีจำนวน $42$ คน, $63$ คน และ $84$ คน ต้องการจัดนักเรียนเป็นแถว แถวละเท่าๆ กัน โดยไม่ให้แต่ละกลุ่มปะปนกัน และต้องการให้ได้ จำนวนนักเรียนต่อแถวมากที่สุด จะจัดได้แถวละกี่คน?

วิธีทำ: หา ห.ร.ม. ของ 42, 63 และ 84

$$ \begin{array}{r|rrr} \mathbf{3} & 42 & 63 & 84 \\ \hline \mathbf{7} & 14 & 21 & 28 \\ \hline & 2 & 3 & 4 \end{array} $$
$$ \begin{aligned} \text{ห.ร.ม.} &= 3 \times 7 \\ &= \color{#2e7d32}{\mathbf{21}} \end{aligned} $$

ดังนั้น จะจัดนักเรียนได้ แถวละ 21 คน

Three groups of students have $42$, $63$, and $84$ people respectively. We want to arrange them into rows of equal length without mixing the groups, and we want the maximum number of students per row. How many students will be in each row?

Method: Find the GCD of 42, 63, and 84.

$$ \begin{array}{r|rrr} \mathbf{3} & 42 & 63 & 84 \\ \hline \mathbf{7} & 14 & 21 & 28 \\ \hline & 2 & 3 & 4 \end{array} $$
$$ \begin{aligned} \text{GCD} &= 3 \times 7 \\ &= \color{#2e7d32}{\mathbf{21}} \end{aligned} $$

Therefore, we can arrange them into rows of 21 students.

คำศัพท์ที่น่าสนใจ Key Vocabulary

คำศัพท์คณิตศาสตร์ภาษาอังกฤษ พร้อมรากศัพท์

คำศัพท์ รากศัพท์ / Root ความหมาย / Meaning
Greatest Common Divisor (GCD) greatest + communis + dividere ตัวหารร่วมมาก (ห.ร.ม.) · จำนวนเต็มบวกที่มีค่ามากที่สุดที่สามารถหารจำนวนต่างๆ เหล่านั้นได้ลงตัว
Divisor dividere (to divide) ตัวหาร · ตัวเลขที่นำไปหารจำนวนอื่น
Factor facere (to do, to make) ตัวประกอบ · จำนวนเต็มที่หารจำนวนเต็มอีกจำนวนหนึ่งได้ลงตัว
Prime Number primus (first) จำนวนเฉพาะ · จำนวนที่มีตัวประกอบเพียงสองตัว คือ 1 และตัวมันเอง
Algorithm Al-Khwarizmi (Persian mathematician) อัลกอริทึม / ขั้นตอนวิธี · กระบวนการแก้ปัญหาที่สามารถอธิบายออกมาเป็นขั้นตอนที่ชัดเจน