Chapterبەش 2 · Lectureوانە 2.3

Product (Π) Notationنیشانەی پی (Π)

Π is to multiplication what Σ is to addition. Learn to read and expand Π, the ten rules (constants become powers, roots and fractions move over the whole product, logarithms turn Π into Σ), the course's full worked example, the classic ana^n mistake, and Π in Python with math.prod().

Π بۆ لێکدان وەک Σـە بۆ کۆکردنەوە. فێر دەبیت Π بخوێنیتەوە و بیکەیتەوە، دە یاساکە ( دەبنە ، ڕەگ و بەسەر هەموو لێکدانەکەدا دەڕۆن، Π دەکاتە Σ)، نموونە شیکراوە تەواوەکەی کۆرسەکە، هەڵە باوەکەی ana^n و Π لە Pythonـدا بە math.prod().

13 min read14 خولەک خوێندنەوە · 14 stepsهەنگاو

What you will learnچی فێر دەبیت

  • Read and expand a product written with Π.
  • Use the ten product rules, and explain why a constant becomes ana^n.
  • Turn a product into a sum with logarithms.
  • Compute products in Python with math.prod() or a loop that starts at 1.
  • لێکدانێک کە بە Π نووسراوە بخوێنیتەوە و بیکەیتەوە.
  • دە یاسای لێکدان بەکار بهێنیت و ڕوونی بکەیتەوە بۆچی دەبێتە ana^n.
  • بە لێکدانێک بکەیتە کۆ.
  • لە Pythonـدا بە math.prod() یان کە لە 1 دەست پێدەکات لێکدان بژمێریت.

From Σ to Π: a short way to write a long multiplicationلە Σـەوە بۆ Π: ڕێگایەکی کورت بۆ نووسینی لێکدانێکی درێژ

In Sigma notation you met Σ, a short way to write a long sum. Statistics also needs long products. For example, the geometric mean in a later lesson multiplies all the values together. For a long product we use the Greek capital letter Π (pi). Think of it as the letter P for product.

لە نیشانەی سیگما Σـت ناسی، ڕێگایەکی کورت بۆ نووسینی کۆکردنەوەیەکی درێژ. پێویستی بە لێکدانی درێژیش هەیە. بۆ نموونە ناوەندی ئەندازەیی لە وانەیەکی داهاتوودا هەموو نرخەکان پێکەوە لێک دەدات. بۆ لێکدانێکی درێژ پیتی گەورەی گریکیی Π (پی) بەکار دەهێنین. وەک پیتی Pـی وشەی ئینگلیزیی product (لێکدان) بیری لێ بکەرەوە.

Definitionپێناسە

A short way to write a long multiplication with the Greek capital Π\Pi (pi): ∏i=1nXi=X1⋅X2⋯Xn\prod_{i=1}^{n} X_i = X_1 \cdot X_2 \cdots X_n.

ڕێگایەکی کورتە بۆ نووسینی لێکدانێکی درێژ بە پیتی گەورەی گریکیی Π\Pi (پی): ∏i=1nXi=X1⋅X2⋯Xn\prod_{i=1}^{n} X_i = X_1 \cdot X_2 \cdots X_n.

∏i=1nXi=X1⋅X2⋅X3⋯Xn\prod_{i=1}^{n} X_i = X_1 \cdot X_2 \cdot X_3 \cdots X_n

Read it as “the product of X sub i, for i from 1 to n”. The subscript i starts at the number under Π and stops at the number on top. For every value of i you write one factor, and then you multiply all the factors.

بەم شێوەیە بیخوێنەرەوە: «لێکدانی X ژێر i، بۆ i لە 1 تا n». i لەو ژمارەیەوە دەست پێدەکات کە لە ژێر Πـەوەیە و لەو ژمارەیەدا دەوەستێت کە لە سەرییەتی. بۆ هەر نرخێکی i یەک بەش دەنووسیت، پاشان هەموو بەشەکان لێک دەدەیت.

Σ and Π work the same way. The only difference is the operation: Σ adds, Π multiplies. Because of that, they also start from different numbers:

Σ و Π بە هەمان شێوە کار دەکەن. تاکە جیاوازی ئەو ژمێریارییەیە کە دەیکەن: Σ کۆ دەکاتەوە و Π لێک دەدات. لەبەر ئەمە لە دوو ژمارەی جیاوازیشەوە دەست پێدەکەن:

Two rows of boxes for X = 2, 3, 4, 5. Top row, Σ adds: it starts at 0, then +2 gives 2, +3 gives 5, +4 gives 9, +5 gives 14, so ΣXᵢ = 14. Bottom row, Π multiplies: it starts at 1, then ×2 gives 2, ×3 gives 6, ×4 gives 24, ×5 gives 120, so ΠXᵢ = 120.دوو ڕیز چوارگۆشە بۆ X = 2، 3، 4، 5. ڕیزی سەرەوە، Σ کۆ دەکاتەوە: لە 0 دەست پێدەکات، پاشان +2 دەکاتە 2، +3 دەکاتە 5، +4 دەکاتە 9، +5 دەکاتە 14، کەواتە ΣXᵢ = 14. ڕیزی خوارەوە، Π لێک دەدات: لە 1 دەست پێدەکات، پاشان ×2 دەکاتە 2، ×3 دەکاتە 6، ×4 دەکاتە 24، ×5 دەکاتە 120، کەواتە ΠXᵢ = 120.
A sum starts at 0 and a product starts at 1, because adding 0 and multiplying by 1 change nothing.کۆ لە 0 دەست پێدەکات و لێکدان لە 1، چونکە کۆکردنەوەی 0 و لێکدان لە 1 هیچ ناگۆڕن.CêIT
Quick checkپشکنینی خێراLet X1=2, X2=3, X3=4X_1 = 2,\ X_2 = 3,\ X_3 = 4. What is ∏i=13Xi\prod_{i=1}^{3} X_i?با X1=2, X2=3, X3=4X_1 = 2,\ X_2 = 3,\ X_3 = 4 بێت. ∏i=13Xi\prod_{i=1}^{3} X_i چەندە؟

Reading Π step by stepخوێندنەوەی Π هەنگاو بە هەنگاو

Expanding a productکردنەوەی لێکدانێک
  1. Write one factor for each iبۆ هەر iـیەک یەک بەش بنووسە

    With n=4n = 4: ∏i=14Xi=X1⋅X2⋅X3⋅X4\prod_{i=1}^{4} X_i = X_1 \cdot X_2 \cdot X_3 \cdot X_4.

    بە n=4n = 4: ∏i=14Xi=X1⋅X2⋅X3⋅X4\prod_{i=1}^{4} X_i = X_1 \cdot X_2 \cdot X_3 \cdot X_4.

  2. Put in the valuesنرخەکان دابنێ

    If X=2,3,4,5X = 2, 3, 4, 5, the product is 2⋅3⋅4⋅52 \cdot 3 \cdot 4 \cdot 5.

    ئەگەر X=2,3,4,5X = 2, 3, 4, 5 بێت، 2⋅3⋅4⋅52 \cdot 3 \cdot 4 \cdot 5 بەدەست دێت.

  3. Multiplyلێکیان بدە

    2⋅3=62 \cdot 3 = 6, 6⋅4=246 \cdot 4 = 24, 24⋅5=12024 \cdot 5 = 120. So ∏i=14Xi=120\prod_{i=1}^{4} X_i = 120.

    2⋅3=62 \cdot 3 = 6، 6⋅4=246 \cdot 4 = 24، 24⋅5=12024 \cdot 5 = 120. کەواتە ∏i=14Xi=120\prod_{i=1}^{4} X_i = 120.

Quick checkپشکنینی خێراWhich expression is the same as ∏i=13Yi\prod_{i=1}^{3} Y_i?کام دەربڕین هەمان ∏i=13Yi\prod_{i=1}^{3} Y_iـە؟

Reading Π step by stepخوێندنەوەی Π هەنگاو بە هەنگاو

Products in daily life: price changesلێکدان لە ژیانی ڕۆژانەدا: گۆڕانی نرخ

Price changes in the bazaarگۆڕانی نرخ لە بازاڕدا

A phone in the Sulaimani bazaar gets 10% more expensive in one month (×1.10\times 1.10), 5% more the next month (×1.05\times 1.05), and then 10% cheaper (×0.90\times 0.90). The total change is a product: ∏=1.10⋅1.05⋅0.90=1.0395\prod = 1.10 \cdot 1.05 \cdot 0.90 = 1.0395, so the price went up by 3.95% — not by 10%+5%−10%=5%10\% + 5\% - 10\% = 5\%. Changes that multiply are combined with Π, not with Σ.

مۆبایلێک لە بازاڕی سلێمانی لە مانگێکدا ⁦10%⁩ گران دەبێت (×1.10\times 1.10)، مانگی دواتر ⁦5%⁩ (×1.05\times 1.05) و پاشان ⁦10%⁩ هەرزان دەبێت (×0.90\times 0.90). کۆی گۆڕانەکە لێکدانێکە: ∏=1.10⋅1.05⋅0.90=1.0395\prod = 1.10 \cdot 1.05 \cdot 0.90 = 1.0395، کەواتە نرخەکە ⁦3.95%⁩ بەرز بووەتەوە — نەک 10%+5%−10%=5%10\% + 5\% - 10\% = 5\%. گۆڕانە لێکدراوەکان بە Π پێکەوە دەبەسترێن، نەک بە Σ.

Where the analogy stops workingسنووری ئەم نموونەیە

This works only for changes in per cent (factors). If the shop simply adds 5,000 dinars each month, the changes add up and Σ is the right tool.

ئەمە تەنها بۆ گۆڕانی لە سەدا (لێکدەر) ڕاستە. ئەگەر دوکانەکە هەموو مانگێک تەنها ⁦5,000⁩ دینار زیاد بکات، گۆڕانەکان کۆ دەبنەوە و Σ ئامرازی دروستە.

Quick checkپشکنینی خێراA price rises by 20% and then falls by 20%. What is the total change?نرخێک ⁦20%⁩ بەرز دەبێتەوە و پاشان ⁦20%⁩ دادەبەزێت. کۆی گۆڕانەکە چەندە؟

Π in Python: math.prod() and a loopΠ لە Pythonـدا: math.prod() و خولێک

A Π is a loop that multiplies, just as a Σ is a loop that adds. Python can do it in two ways: the ready-made math.prod() (Python 3.8 and later) or your own for loop.

Π کە لێک دەدات، هەروەک چۆن Σ کە کۆ دەکاتەوە. Python دەتوانێت بە دوو ڕێگا بیکات: math.prod()ـی ئامادە (⁦Python 3.8⁩ و دواتر) یان کە خۆت دەینووسیت.

PYTHONType in a terminalلە تێرمیناڵدا بینووسە
import math

X = [2, 3, 4, 5]
print(math.prod(X))        # built-in product (Python 3.8+)

product = 1                # start at 1, not 0
for x in X:
    product = product * x
print(product)

print(math.prod([]))       # empty product
print(sum([]))             # empty sum
Explain the codeڕوونکردنەوەی کۆدەکە
Lineدێڕی 4

math.prod() multiplies every item of the list.

math.prod() هەموو ئەندامێکی لیستەکە لێک دەدات.

Lineدێڕی 6-8

The loop version. The running product must start at 1: starting at 0 would make every result 0.

وەشانی خول. لێکدانە بەردەوامەکە دەبێت لە 1 دەست پێبکات: دەستپێکردن لە 0 هەموو ئەنجامێک دەکاتە 0.

Lineدێڕی 11-12

With no factors at all, a product is 1 and a sum is 0 — the two starting values.

کاتێک هیچ بەشێک نییە، لێکدان دەکاتە 1 و کۆ دەکاتە 0 — هەمان دوو نرخی دەستپێک.

Quick checkپشکنینی خێراA student writes product = 0 before the loop above. What does the program print instead of 120?قوتابییەک پێش سەرەوە product = 0 دەنووسێت. بەرنامەکە لە جیاتی ⁦120⁩ چی چاپ دەکات؟

Rules 1–3: a constant becomes a powerیاساکانی ⁦1–3⁩: نەگۆڕ دەبێتە توان

In the rules of this lesson, X1,…,XnX_1, \dots, X_n and Y1,…,YnY_1, \dots, Y_n are two lists of nn values, and aa and bb are two constants (numbers that do not change with i).

لە یاساکانی ئەم وانەیەدا، X1,…,XnX_1, \dots, X_n و Y1,…,YnY_1, \dots, Y_n دوو لیستی nn نرخن و aa و bb دوو (ژمارەگەلێک کە بە گۆڕانی i ناگۆڕێن).

(1)∏i=1na=an(2)∏i=1naXi=an∏i=1nXi(3)∏i=1naXi bYi=anbn∏i=1nXiYi\begin{aligned} &(1)\quad \prod_{i=1}^{n} a = a^n \\ &(2)\quad \prod_{i=1}^{n} aX_i = a^n \prod_{i=1}^{n} X_i \\ &(3)\quad \prod_{i=1}^{n} aX_i\, bY_i = a^n b^n \prod_{i=1}^{n} X_iY_i \end{aligned}

Rule 1: n copies of the same number a multiply to a to the power n.

یاسای ⁦1: n⁩ دانە لە هەمان ژمارەی a لێک بدەیت، دەکاتە a بە n.

Why rule 2 has ana^n and not aa: write the product out. With n=4n = 4 it is (aX1)(aX2)(aX3)(aX4)(aX_1)(aX_2)(aX_3)(aX_4). Every factor brings its own a, so there are four a's: a⋅a⋅a⋅a=a4a \cdot a \cdot a \cdot a = a^4. Rule 3 is the same idea twice: n copies of a and n copies of b, so anbna^n b^n, which is also (ab)n(ab)^n.

بۆچی یاسای 2 ana^nـی تێدایە نەک aa: لێکدانەکە بە درێژی بنووسە. بە n=4n = 4 دەکاتە (aX1)(aX2)(aX3)(aX4)(aX_1)(aX_2)(aX_3)(aX_4). هەر بەشێک aـی خۆی لەگەڵ خۆیدا دەهێنێت، بۆیە چوار a هەیە: a⋅a⋅a⋅a=a4a \cdot a \cdot a \cdot a = a^4. یاسای 3 هەمان بیرۆکەیە دوو جار: n دانە a و n دانە b، کەواتە anbna^n b^n کە هەمان (ab)n(ab)^nـیشە.

Animation for Π(2·Xᵢ) with X = 2, 3, 4, 5. Four boxes show 2×2, 2×3, 2×4 and 2×5. The four 2s light up, then move to the front: 2·2·2·2·(2·3·4·5). This becomes 2⁴·120 = 16·120 = 1920. The last frame puts the correct 1920 next to the wrong 2·120 = 240, which counts only one of the four 2s.
Animation for Π(2·Xᵢ) with X = 2, 3, 4, 5. Four boxes show 2×2, 2×3, 2×4 and 2×5. The four 2s light up, then move to the front: 2·2·2·2·(2·3·4·5). This becomes 2⁴·120 = 16·120 = 1920. The last frame puts the correct 1920 next to the wrong 2·120 = 240, which counts only one of the four 2s.
Each factor carries its own 2, so the 2s collect into 2⁴.هەر بەشێک 2ـی خۆی هەڵدەگرێت، بۆیە 2ـەکان کۆ دەبنەوە بۆ 2⁴.CêIT
A constant comes out of Σ as a multiplier and out of Π as a power. لە Σ وەک لێکدەر دێتە دەرەوە و لە Π وەک .
Σ (sum)Σ (کۆ)Π (product)Π (لێکدان)
∑i=1nc=nc\sum_{i=1}^{n} c = nc∏i=1na=an\prod_{i=1}^{n} a = a^n
∑i=1ncXi=c∑i=1nXi\sum_{i=1}^{n} cX_i = c\sum_{i=1}^{n} X_i∏i=1naXi=an∏i=1nXi\prod_{i=1}^{n} aX_i = a^n\prod_{i=1}^{n} X_i
Quick checkپشکنینی خێراLet X=1,2,3X = 1, 2, 3. What is ∏i=135Xi\prod_{i=1}^{3} 5X_i?با X=1,2,3X = 1, 2, 3 بێت. ∏i=135Xi\prod_{i=1}^{3} 5X_i چەندە؟

Rules 4, 5, 7, 8 and 10: fractions, roots and powersیاساکانی 4، 5، 7، 8 و ⁦10⁩: کەرت، ڕەگ و توان

(4)∏i=1n1Xi=1∏i=1nXi(5)∏i=1naXi=an∏i=1nXi(7)∏i=1nXi=∏i=1nXi(8)∏i=1n(Xi)a=(∏i=1nXi)a(10)∏i=1nXiYi=∏i=1nXi∏i=1nYi\begin{aligned} &(4)\quad \prod_{i=1}^{n} \frac{1}{X_i} = \frac{1}{\prod_{i=1}^{n} X_i} \qquad (5)\quad \prod_{i=1}^{n} \frac{a}{X_i} = \frac{a^n}{\prod_{i=1}^{n} X_i} \\ &(7)\quad \prod_{i=1}^{n} \sqrt{X_i} = \sqrt{\prod_{i=1}^{n} X_i} \qquad (8)\quad \prod_{i=1}^{n} (X_i)^a = \Big(\prod_{i=1}^{n} X_i\Big)^a \\ &(10)\quad \prod_{i=1}^{n} \frac{X_i}{Y_i} = \frac{\prod_{i=1}^{n} X_i}{\prod_{i=1}^{n} Y_i} \end{aligned}

All five rules come from one fact: in a multiplication you may change the order of the factors and group them as you like. So you can multiply all the tops together and all the bottoms together (rules 4, 5, 10), or all the roots or powers together (rules 7, 8). Rule 5 is rule 4 with an a on every top, so the aa's collect into ana^n, as in rule 2.

هەر پێنج یاساکە لە یەک ڕاستییەوە دێن: لە لێکداندا دەتوانیت ڕیزبەندیی بەشەکان بگۆڕیت و چۆنت پێ خۆشە گرووپیان بکەیت. بۆیە دەتوانیت هەموو پێکەوە و هەموو پێکەوە لێک بدەیت (یاساکانی 4، 5، ⁦10⁩)، یان هەموو ڕەگەکان یان پێکەوە (یاساکانی 7، ⁦8⁩). یاسای 5 هەمان یاسای 4ـە، بەڵام لە هەموو a هەیە، بۆیە aaـەکان کۆ دەبنەوە بۆ ana^n، وەک یاسای 2.

Quick check of rule 7 with X=2,3,4,5X = 2, 3, 4, 5: 2⋅3⋅4⋅5≈1.4142⋅1.7321⋅2⋅2.2361≈10.95\sqrt2\cdot\sqrt3\cdot\sqrt4\cdot\sqrt5 \approx 1.4142 \cdot 1.7321 \cdot 2 \cdot 2.2361 \approx 10.95 and 120≈10.95\sqrt{120} \approx 10.95.

پشکنینێکی خێرای یاسای 7 بە X=2,3,4,5X = 2, 3, 4, 5: 2⋅3⋅4⋅5≈1.4142⋅1.7321⋅2⋅2.2361≈10.95\sqrt2\cdot\sqrt3\cdot\sqrt4\cdot\sqrt5 \approx 1.4142 \cdot 1.7321 \cdot 2 \cdot 2.2361 \approx 10.95 و 120≈10.95\sqrt{120} \approx 10.95.

Quick checkپشکنینی خێراWith X=2,3,4,5X = 2, 3, 4, 5 and Y=1,2,3,4Y = 1, 2, 3, 4, what is ∏i=14XiYi\prod_{i=1}^{4} \frac{X_i}{Y_i}?بە X=2,3,4,5X = 2, 3, 4, 5 و Y=1,2,3,4Y = 1, 2, 3, 4، ∏i=14XiYi\prod_{i=1}^{4} \frac{X_i}{Y_i} چەندە؟

Rules 6 and 9: a logarithm turns Π into Σیاساکانی 6 و 9: لۆگاریتم Π دەکاتە Σ

(6)log⁡∏i=1nXi=∑i=1nlog⁡Xi(9)log⁡∏i=1n(Xi)ai=∑i=1nailog⁡Xi\begin{aligned} &(6)\quad \log \prod_{i=1}^{n} X_i = \sum_{i=1}^{n} \log X_i \\ &(9)\quad \log \prod_{i=1}^{n} (X_i)^{a_i} = \sum_{i=1}^{n} a_i \log X_i \end{aligned}

In this course log⁡\log means the base-10 logarithm, log⁡10\log_{10}. The values XiX_i must be positive.

لەم کۆرسەدا log⁡\log واتە بە ⁦10⁩، واتە log⁡10\log_{10}. نرخەکانی XiX_i دەبێت بن.

Both rules come from two laws of logarithms: the log of a product is the sum of the logs, log⁡(ab)=log⁡a+log⁡b\log(ab) = \log a + \log b, and a power comes down in front, log⁡(xk)=klog⁡x\log(x^k) = k\log x. Rule 9 uses both: each factor XiaiX_i^{a_i} gives ailog⁡Xia_i \log X_i, and the product turns into a sum. These laws are explained in Logarithmic functions.

هەردوو یاسا لە دوو یاسای دێن. لێکدانێک کۆی : log⁡(ab)=log⁡a+log⁡b\log(ab) = \log a + \log b. هەروەها دێتە پێشەوە: log⁡(xk)=klog⁡x\log(x^k) = k\log x. یاسای 9 هەردووکیان بەکار دەهێنێت: هەر بەشێکی XiaiX_i^{a_i} دەبێتە ailog⁡Xia_i \log X_i و لێکدانەکە دەبێتە کۆ. ئەم یاسایانە لە نەخشە لۆگاریتمییەکان ڕوون کراونەتەوە.

Check rule 6 with X=2,3,4,5X = 2, 3, 4, 5: log⁡2+log⁡3+log⁡4+log⁡5=0.3010+0.4771+0.6021+0.6990=2.0792\log 2 + \log 3 + \log 4 + \log 5 = 0.3010 + 0.4771 + 0.6021 + 0.6990 = 2.0792, and log⁡120=2.0792\log 120 = 2.0792.

پشکنینی یاسای 6 بە X=2,3,4,5X = 2, 3, 4, 5: log⁡2+log⁡3+log⁡4+log⁡5=0.3010+0.4771+0.6021+0.6990=2.0792\log 2 + \log 3 + \log 4 + \log 5 = 0.3010 + 0.4771 + 0.6021 + 0.6990 = 2.0792 و log⁡120=2.0792\log 120 = 2.0792.

Quick checkپشکنینی خێراWhich sum is equal to log⁡(X1X2X3)\log (X_1 X_2 X_3)?کام کۆ یەکسانە بە log⁡(X1X2X3)\log (X_1 X_2 X_3)؟

Worked example: the ten rules on one data setنموونەی شیکراوە: دە یاساکە لەسەر یەک کۆمەڵە نرخ

The course's product example uses four values of three lists and two constants:

نموونەی لێکدانی کۆرسەکە چوار نرخی سێ لیست و دوو بەکار دەهێنێت:

Xi=2,3,4,5Yi=1,2,3,4ai=2,4,6,3a=2,  b=3,  n=4X_i = 2, 3, 4, 5 \qquad Y_i = 1, 2, 3, 4 \qquad a_i = 2, 4, 6, 3 \qquad a = 2,\; b = 3,\; n = 4

First find the three basic products once: ∏Xi=120\prod X_i = 120, ∏Yi=24\prod Y_i = 24, ∏XiYi=2880\prod X_iY_i = 2880. Every rule then needs only one or two more steps.

سەرەتا سێ لێکدانە سەرەکییەکە یەک جار بدۆزەرەوە: ∏Xi=120\prod X_i = 120، ∏Yi=24\prod Y_i = 24، ∏XiYi=2880\prod X_iY_i = 2880. پاشان هەر یاسایەک تەنها پێویستی بە یەک یان دوو هەنگاوی ترە.

Worked example: the ten rules on one data setنموونەی شیکراوە: دە یاساکە لەسەر یەک کۆمەڵە نرخ

Rules 1–5 workedیاساکانی ⁦1–5⁩ بە شیکردنەوە

Rules 1–5یاساکانی ⁦1–5⁩
  1. Rule 1یاسای 1

    ∏i=14a=a4=2⋅2⋅2⋅2=16\prod_{i=1}^{4} a = a^4 = 2 \cdot 2 \cdot 2 \cdot 2 = 16

    ∏i=14a=a4=2⋅2⋅2⋅2=16\prod_{i=1}^{4} a = a^4 = 2 \cdot 2 \cdot 2 \cdot 2 = 16

  2. Rule 2یاسای 2

    ∏aXi=a4∏Xi=16⋅120=1920\prod aX_i = a^4 \prod X_i = 16 \cdot 120 = 1920

    ∏aXi=a4∏Xi=16⋅120=1920\prod aX_i = a^4 \prod X_i = 16 \cdot 120 = 1920

  3. Rule 3یاسای 3

    ∏aXi bYi=a4b4∏XiYi=16⋅81⋅2880=3,732,480\prod aX_i\,bY_i = a^4 b^4 \prod X_iY_i = 16 \cdot 81 \cdot 2880 = 3{,}732{,}480. Here XiYi=2,6,12,20X_iY_i = 2, 6, 12, 20 and 2⋅6⋅12⋅20=28802 \cdot 6 \cdot 12 \cdot 20 = 2880.

    ∏aXi bYi=a4b4∏XiYi=16⋅81⋅2880=3,732,480\prod aX_i\,bY_i = a^4 b^4 \prod X_iY_i = 16 \cdot 81 \cdot 2880 = 3{,}732{,}480. لێرەدا XiYi=2,6,12,20X_iY_i = 2, 6, 12, 20 و 2⋅6⋅12⋅20=28802 \cdot 6 \cdot 12 \cdot 20 = 2880.

  4. Rule 4یاسای 4

    ∏1Xi=12⋅3⋅4⋅5=1120≈0.0083\prod \frac{1}{X_i} = \frac{1}{2 \cdot 3 \cdot 4 \cdot 5} = \frac{1}{120} \approx 0.0083

    ∏1Xi=12⋅3⋅4⋅5=1120≈0.0083\prod \frac{1}{X_i} = \frac{1}{2 \cdot 3 \cdot 4 \cdot 5} = \frac{1}{120} \approx 0.0083

  5. Rule 5یاسای 5

    ∏aXi=a4∏Xi=16120=215≈0.1333\prod \frac{a}{X_i} = \frac{a^4}{\prod X_i} = \frac{16}{120} = \frac{2}{15} \approx 0.1333

    ∏aXi=a4∏Xi=16120=215≈0.1333\prod \frac{a}{X_i} = \frac{a^4}{\prod X_i} = \frac{16}{120} = \frac{2}{15} \approx 0.1333

Quick checkپشکنینی خێراWhich rule gives the smallest answer for this data set?کام یاسا بچووکترین وەڵام بۆ ئەم نرخانە دەدات؟

Worked example: the ten rules on one data setنموونەی شیکراوە: دە یاساکە لەسەر یەک کۆمەڵە نرخ

Rules 6–10 workedیاساکانی ⁦6–10⁩ بە شیکردنەوە

Rules 6–10یاساکانی ⁦6–10⁩
  1. Rule 6یاسای 6

    log⁡∏Xi=log⁡120=2.0792\log \prod X_i = \log 120 = 2.0792

    log⁡∏Xi=log⁡120=2.0792\log \prod X_i = \log 120 = 2.0792

  2. Rule 7یاسای 7

    ∏Xi=120=10.9545\prod \sqrt{X_i} = \sqrt{120} = 10.9545

    ∏Xi=120=10.9545\prod \sqrt{X_i} = \sqrt{120} = 10.9545

  3. Rule 8یاسای 8

    ∏(Xi)a=(∏Xi)a=1202=14,400\prod (X_i)^a = (\prod X_i)^a = 120^2 = 14{,}400

    ∏(Xi)a=(∏Xi)a=1202=14,400\prod (X_i)^a = (\prod X_i)^a = 120^2 = 14{,}400

  4. Rule 9یاسای 9

    log⁡∏Xiai=log⁡(22⋅34⋅46⋅53)=log⁡(4⋅81⋅4096⋅125)=log⁡165,888,000=8.2198\log \prod X_i^{a_i} = \log(2^2 \cdot 3^4 \cdot 4^6 \cdot 5^3) = \log(4 \cdot 81 \cdot 4096 \cdot 125) = \log 165{,}888{,}000 = 8.2198. With rule 9 directly: 2log⁡2+4log⁡3+6log⁡4+3log⁡5=0.60206+1.90849+3.61236+2.09691=8.21982≈8.21982\log 2 + 4\log 3 + 6\log 4 + 3\log 5 = 0.60206 + 1.90849 + 3.61236 + 2.09691 = 8.21982 \approx 8.2198. Keep extra digits in the middle steps: with logs rounded to 4 places first you would get 8.2200.

    log⁡∏Xiai=log⁡(22⋅34⋅46⋅53)=log⁡(4⋅81⋅4096⋅125)=log⁡165,888,000=8.2198\log \prod X_i^{a_i} = \log(2^2 \cdot 3^4 \cdot 4^6 \cdot 5^3) = \log(4 \cdot 81 \cdot 4096 \cdot 125) = \log 165{,}888{,}000 = 8.2198. ڕاستەوخۆ بە یاسای 9: 2log⁡2+4log⁡3+6log⁡4+3log⁡5=0.60206+1.90849+3.61236+2.09691=8.21982≈8.21982\log 2 + 4\log 3 + 6\log 4 + 3\log 5 = 0.60206 + 1.90849 + 3.61236 + 2.09691 = 8.21982 \approx 8.2198. لە هەنگاوەکانی ناوەڕاستدا ژمارەی زیاتر بهێڵەرەوە: ئەگەر سەرەتا بۆ 4 خانە نزیک بکەیتەوە، ⁦8.2200⁩ بەدەست دێت.

  5. Rule 10یاسای ⁦10⁩

    ∏XiYi=2⋅3⋅4⋅51⋅2⋅3⋅4=12024=5\prod \frac{X_i}{Y_i} = \frac{2 \cdot 3 \cdot 4 \cdot 5}{1 \cdot 2 \cdot 3 \cdot 4} = \frac{120}{24} = 5

    ∏XiYi=2⋅3⋅4⋅51⋅2⋅3⋅4=12024=5\prod \frac{X_i}{Y_i} = \frac{2 \cdot 3 \cdot 4 \cdot 5}{1 \cdot 2 \cdot 3 \cdot 4} = \frac{120}{24} = 5

Checking rules 2, 3, 6 and 9 in Pythonپشکنینی یاساکانی 2، 3، 6 و 9 لە PythonـداPYTHONType in a terminalلە تێرمیناڵدا بینووسە
import math

X = [2, 3, 4, 5]
Y = [1, 2, 3, 4]
A = [2, 4, 6, 3]
a, b, n = 2, 3, 4

print(math.prod(a * x for x in X))              # rule 2
print(a ** n * math.prod(X))                    # a^n * prod X
print(math.prod(a * x * b * y for x, y in zip(X, Y)))   # rule 3
print(round(math.log10(math.prod(X)), 4))       # rule 6, left side
print(round(sum(math.log10(x) for x in X), 4))  # rule 6, right side
print(round(sum(k * math.log10(x) for x, k in zip(X, A)), 4))  # rule 9
Quick checkپشکنینی خێراWhich rule turns a product into a sum?کام یاسا لێکدانێک دەکاتە کۆ؟

Common mistakesهەڵە باوەکان

MistakeهەڵەWhy it is wrongبۆچی هەڵەیەCorrectدروست
∏aXi=a∏Xi\prod aX_i = a\prod X_i∏aXi=a∏Xi\prod aX_i = a\prod X_iEach of the n factors has its own a.هەر یەک لە n بەشەکە aـی خۆی هەیە.an∏Xia^n\prod X_i
Starting a product loop at 0دەستپێکردنی لێکدان لە 00 times anything is 0.0 جارانی هەر شتێک 0ـە.Start at 1لە 1 دەست پێبکە
∏(Xi+Yi)=∏Xi+∏Yi\prod(X_i+Y_i) = \prod X_i + \prod Y_i∏(Xi+Yi)=∏Xi+∏Yi\prod(X_i+Y_i) = \prod X_i + \prod Y_iΠ has no rule for a sum inside it (945≠144945 \ne 144).Π هیچ یاسایەکی بۆ کۆ لە ناو خۆیدا نییە (945≠144945 \ne 144).Multiply the sums one by oneکۆکان یەک بە یەک لێک بدە
log⁡∏Xi=∏log⁡Xi\log \prod X_i = \prod \log X_ilog⁡∏Xi=∏log⁡Xi\log \prod X_i = \prod \log X_iThe log of a product is a sum of logs. لێکدان کۆی .∑log⁡Xi\sum \log X_i
Rounding each log early (log⁡2≈0.3\log 2 \approx 0.3) هەر logـێک زوو (log⁡2≈0.3\log 2 \approx 0.3)Small errors add up in the sum.هەڵە بچووکەکان لە کۆکەدا کەڵەکە دەبن.Keep 4 decimal places, round at the end4 بهێڵەرەوە و لە کۆتاییدا نزیکی بکەرەوە

Rounding to 4 decimal places is explained in the next lesson, Rounding and decimal places.

بۆ 4 لە وانەی داهاتوودا ڕوون کراوەتەوە: نزیککردنەوە و خانە دەییەکان.

Quick checkپشکنینی خێراWhich answer for ∏i=142Xi\prod_{i=1}^{4} 2X_i with X=2,3,4,5X = 2, 3, 4, 5 is right?کام وەڵام بۆ ∏i=142Xi\prod_{i=1}^{4} 2X_i بە X=2,3,4,5X = 2, 3, 4, 5 دروستە؟

Exercisesڕاهێنانەکان

ExerciseڕاهێنانSpot the mistakeهەڵەکە بدۆزەرەوە

A solution page says: ∏i=14aXi=a[X1X2X3X4]=2[2⋅3⋅4⋅5]=240\prod_{i=1}^{4} aX_i = a[X_1X_2X_3X_4] = 2[2\cdot3\cdot4\cdot5] = 240 and ∏2Xi 3Yi=6∏XiYi=17,280\prod 2X_i\,3Y_i = 6\prod X_iY_i = 17{,}280 (X=2,3,4,5X = 2, 3, 4, 5; Y=1,2,3,4Y = 1, 2, 3, 4). Find the mistake and correct both answers.

لاپەڕەیەکی چارەسەر دەڵێت: ∏i=14aXi=a[X1X2X3X4]=2[2⋅3⋅4⋅5]=240\prod_{i=1}^{4} aX_i = a[X_1X_2X_3X_4] = 2[2\cdot3\cdot4\cdot5] = 240 و ∏2Xi 3Yi=6∏XiYi=17,280\prod 2X_i\,3Y_i = 6\prod X_iY_i = 17{,}280 (X=2,3,4,5X = 2, 3, 4, 5؛ Y=1,2,3,4Y = 1, 2, 3, 4). هەڵەکە بدۆزەرەوە و هەردوو وەڵامەکە ڕاست بکەرەوە.

Hintئاماژە

Write the product out factor by factor.

لێکدانەکە بەش بە بەش بە درێژی بنووسە.

Show answerوەڵامەکە پیشان بدە

The constant must appear once in each of the four factors. ∏2Xi=24⋅120=1920\prod 2X_i = 2^4 \cdot 120 = 1920 and ∏2Xi 3Yi=24⋅34⋅2880=64⋅2880=3,732,480\prod 2X_i\,3Y_i = 2^4 \cdot 3^4 \cdot 2880 = 6^4 \cdot 2880 = 3{,}732{,}480.

دەبێت لە هەر یەک لە چوار بەشەکەدا یەک جار دەربکەوێت. ∏2Xi=24⋅120=1920\prod 2X_i = 2^4 \cdot 120 = 1920 و ∏2Xi 3Yi=24⋅34⋅2880=64⋅2880=3,732,480\prod 2X_i\,3Y_i = 2^4 \cdot 3^4 \cdot 2880 = 6^4 \cdot 2880 = 3{,}732{,}480.

ExerciseڕاهێنانThe homework items (5), (7) and (8)بڕگەکانی ڕاهێنانی ماڵەوە ⁦(5)⁩، ⁦(7)⁩ و ⁦(8)⁩

With X=2,3,4,5X = 2, 3, 4, 5 and a=2a = 2, find ∏aXi\prod \frac{a}{X_i}, ∏Xi\prod \sqrt{X_i} and ∏(Xi)a\prod (X_i)^a. Give decimals to 4 places.

بە X=2,3,4,5X = 2, 3, 4, 5 و a=2a = 2، ∏aXi\prod \frac{a}{X_i}، ∏Xi\prod \sqrt{X_i} و ∏(Xi)a\prod (X_i)^a بدۆزەرەوە. ژمارە دەییەکان بە 4 بنووسە.

Show answerوەڵامەکە پیشان بدە
∏aXi=a4∏Xi=16120=215≈0.1333∏Xi=120≈10.9545∏(Xi)a=1202=14,400\begin{aligned} \prod \tfrac{a}{X_i} &= \tfrac{a^4}{\prod X_i} = \tfrac{16}{120} = \tfrac{2}{15} \approx 0.1333 \\ \prod \sqrt{X_i} &= \sqrt{120} \approx 10.9545 \\ \prod (X_i)^a &= 120^2 = 14{,}400 \end{aligned}

Exercisesڕاهێنانەکان

More exercisesڕاهێنانی زیاتر

ExerciseڕاهێنانΠ and the factorialΠ و فاکتۆریێل

Compute ∏i=15i\prod_{i=1}^{5} i. Which well-known number is it?

∏i=15i\prod_{i=1}^{5} i بدۆزەرەوە. ئەمە کام ژمارەی ناسراوە؟

Show answerوەڵامەکە پیشان بدە

1⋅2⋅3⋅4⋅5=1201\cdot2\cdot3\cdot4\cdot5 = 120. This is 5!5! (5 factorial). In general n!=∏i=1nin! = \prod_{i=1}^{n} i; factorials are used for counting in Counting and permutations.

1⋅2⋅3⋅4⋅5=1201\cdot2\cdot3\cdot4\cdot5 = 120. ئەمە 5!5!ـە ( ⁦5⁩). بە گشتی n!=∏i=1nin! = \prod_{i=1}^{n} i؛ لە ژماردن و گۆڕینەکان بۆ ژماردن بەکار دێت.

ExerciseڕاهێنانCounting passwordsژماردنی تێپەڕەوشەکان

A very short code has 2 lowercase English letters followed by 2 digits, for example ka47. Write the number of possible codes as a product and compute it.

کۆدێکی زۆر کورت 2 پیتی بچووکی ئینگلیزی و دوای ئەوان 2 ژمارەی هەیە، بۆ نموونە ka47. ژمارەی کۆدە گونجاوەکان وەک لێکدانێک بنووسە و بیدۆزەرەوە.

Show answerوەڵامەکە پیشان بدە

∏=26⋅26⋅10⋅10=67,600\prod = 26 \cdot 26 \cdot 10 \cdot 10 = 67{,}600. That is far too few for a real password: a computer can try them all in a moment. Counting like this is taught in Counting passwords; what makes a password safe today is in Why length beats complexity.

∏=26⋅26⋅10⋅10=67,600\prod = 26 \cdot 26 \cdot 10 \cdot 10 = 67{,}600. ئەمە بۆ ڕاستەقینە زۆر کەمە: کۆمپیوتەرێک لە ساتێکدا هەموویان تاقی دەکاتەوە. ژماردنی لەم جۆرە لە ژماردنی تێپەڕەوشەکان فێر دەبیت؛ ئەوەی ئەمڕۆ سەلامەت دەکات لە بۆچی درێژی لە ئاڵۆزی بەهێزترەدایە.

ExerciseڕاهێنانRule 6 in Pythonیاسای 6 لە Pythonـدا

Write a short Python program that prints ∏Xi\prod X_i for X=2,3,4,5X = 2, 3, 4, 5, then checks rule 6 by printing both log⁡∏Xi\log \prod X_i and ∑log⁡Xi\sum \log X_i to 4 decimal places.

بەرنامەیەکی کورتی Python بنووسە کە ∏Xi\prod X_i بۆ X=2,3,4,5X = 2, 3, 4, 5 چاپ بکات، پاشان یاسای 6 بپشکنێت بە چاپکردنی log⁡∏Xi\log \prod X_i و ∑log⁡Xi\sum \log X_i بە 4 .

Show answerوەڵامەکە پیشان بدە
PYTHONType in a terminalلە تێرمیناڵدا بینووسە
import math

X = [2, 3, 4, 5]
p = math.prod(X)
print(p)
print(round(math.log10(p), 4))
print(round(sum(math.log10(x) for x in X), 4))

Summaryپوختە

  • ∏i=1nXi=X1X2⋯Xn\prod_{i=1}^{n} X_i = X_1 X_2 \cdots X_n: one factor for each i, all multiplied. A product starts at 1.
  • A constant comes out of Π as a power: ∏a=an\prod a = a^n, ∏aXi=an∏Xi\prod aX_i = a^n \prod X_i.
  • Fractions, roots and powers can be taken over the whole product (rules 4, 5, 7, 8, 10).
  • A logarithm turns Π into Σ: log⁡∏Xi=∑log⁡Xi\log \prod X_i = \sum \log X_i (rules 6 and 9).
  • In Python: math.prod(), or a loop that starts at 1.
  • ∏i=1nXi=X1X2⋯Xn\prod_{i=1}^{n} X_i = X_1 X_2 \cdots X_n: بۆ هەر iـیەک یەک بەش و هەموویان لێک دەدرێن. لێکدان لە 1 دەست پێدەکات.
  • لە Π وەک دێتە دەرەوە: ∏a=an\prod a = a^n، ∏aXi=an∏Xi\prod aX_i = a^n \prod X_i.
  • ، ڕەگ و دەکرێت بەسەر هەموو لێکدانەکەدا وەربگیرێن (یاساکانی 4، 5، 7، 8، ⁦10⁩).
  • Π دەکاتە Σ: log⁡∏Xi=∑log⁡Xi\log \prod X_i = \sum \log X_i (یاساکانی 6 و ⁦9⁩).
  • لە Pythonـدا: math.prod()، یان کە لە 1 دەست پێدەکات.
Review questionsپرسیارەکانی پێداچوونەوە
What is ∏i=143\prod_{i=1}^{4} 3?∏i=143\prod_{i=1}^{4} 3 چەندە؟

34=813^4 = 81 (rule 1).

34=813^4 = 81 (یاسای ⁦1⁩).

Why does a product loop start at 1?بۆچی خولی لێکدان لە 1 دەست پێدەکات؟

Because multiplying by 1 changes nothing; starting at 0 would make the result 0.

چونکە لێکدان لە 1 هیچ ناگۆڕێت؛ دەستپێکردن لە 0 ئەنجامەکە دەکاتە 0.

Which mean in this course is built on Π?کام ناوەند لەم کۆرسەدا لەسەر Π بنیات نراوە؟

The geometric mean, G=∏XinG = \sqrt[n]{\prod X_i}, usually found with logs (rule 6).

ناوەندی ئەندازەیی، G=∏XinG = \sqrt[n]{\prod X_i}، کە زۆرجار بە log دەدۆزرێتەوە (یاسای ⁦6⁩).

Lesson complete!وانەکە تەواو بوو!

Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.

Key termsزاراوە سەرەکییەکان

Next lessonوانەی داهاتوو

Rounding and Decimal Placesنزیککردنەوە و خانە دەییەکان

References and further readingسەرچاوەکان و خوێندنەوەی زیاتر

This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.