Starting narration…
بِسْمِ ٱللَّهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ
In the name of Allah, the Most Merciful, the Especially Merciful
Wisdom · Three Famous Problems · Infographic Study

The Mathematical Brilliance
of Hazrat Ali (RA)

Three classic accounts of the Gate of Knowledge — solved not with heavy calculation, but with a clear way of seeing the problem. Read each in under a minute; the workings are shown.

🔢 The Perfect Number — 2520 🐪 The 17 Camels 🍞 Bread & Dirhams

Who & why

Ali ibn Abi Talib (RA) — cousin and son-in-law of the Prophet ﷺ — was famed for a sharp, structured mind. The Prophet ﷺ said, "I am the city of knowledge and Ali is its gate." These three problems are well-known traditional accounts passed down to illustrate his wisdom; treat them as teaching stories rather than authenticated hadith. Each makes the same point: frame the problem the right way and the answer becomes simple.

Problem 1 · The Perfect Number

The Number That Amazed the Scholar

A scholar challenged him: "Give me a whole number that, divided by any number from 1 to 10, still gives a whole number — no fractions."

His method — think in structures, not abstractly
360days in a year
×
7days in a week
=
2520the answer
2520
divides perfectly by 1 – 10
Verification — every division is whole
÷ 1
2520
÷ 2
1260
÷ 3
840
÷ 4
630
÷ 5
504
÷ 6
420
÷ 7
360
÷ 8
315
÷ 9
280
÷ 10
252

💡 The wisdom

1
Use domain knowledge (the calendar) to crack an abstract question.
2
Think in structures and multiples, not brute force.
3
Mathematics becomes a tool for clarity, not just calculation.
Footnote for the curious: 2520 is exactly the least common multiple of 1–10 — the smallest number that 1 through 10 all divide into. The calendar (360 × 7) is the memorable way the story arrives at it.
Problem 2 · Justice in Fractions

How to Divide 17 Camels Without Harming One

A man's will: eldest son ½, second son , youngest son . Total camels: 17. None of these divide cleanly into 17 — so do you cut a camel?

First, the insight — the will doesn't cover the whole herd
½ + ⅓ + ⅑ = 17⁄18  —  not a whole 1
His solution — borrow 1, divide, return it
Eldest · ½ Second · ⅓ Youngest · ⅑ Borrowed, returned
🐪
🐪
🐪
🐪
🐪
🐪
🐪
🐪
🐪
🐪
🐪
🐪
🐪
🐪
🐪
🐪
🐪
🐪
½ of 18
Eldest
9 camels
⅓ of 18
Second
6 camels
⅑ of 18
Youngest
2 camels
9 + 6 + 2 = 17 given away  ·  the 18th camel goes back to the treasury

💡 The wisdom

1
Sometimes the fastest fix is to change the problem space (17 → 18), solve cleanly, then revert.
2
Justice respects both the will and the integrity of living things.
3
It's the ancestor of "add a helper resource → compute → remove it" in modern algorithms and finance.
Problem 3 · Contribution-Based Sharing

How 3 Loaves Became 1 Dirham & 5 Became 7

Two travellers share bread — one has 5 loaves, the other 3. A third joins. They cut every loaf into 3 equal pieces and all eat equally. The guest leaves 8 dirhams in thanks. How is it split?

The setup — equal eating
8loaves
×
3pieces each
=
24pieces
8each man eats
The real contribution to the guest
3 loaves → 9
Man A · ate 8
1 piece to guest
5 loaves → 15
Man B · ate 8
7 pieces to guest
The guest's 8 pieces came from…
1 piece from the 3-loaf man
7 pieces from the 5-loaf man
The ruling — one dirham per piece eaten by the guest
1
dirham · 3-loaf man
not 4–4
not 5–3
7
dirhams · 5-loaf man

💡 The wisdom

1
Share value by actual contribution, not by surface-level "equality."
2
Under a fair system, one unit of reward = one unit of real input.
3
The same logic powers modern revenue-sharing, equity splits and commissions.

"Frame the problem the right way, and the answer is already half-solved."

— The thread running through all three