Empty product

Uses your system voice; voice and rate in settings.

Snapshot

≈ 5 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

In mathematics, an empty product, or nullary product or vacuous product, is the result of multiplying no factors. It is by convention equal to the multiplicative identity (assuming there is an identity for the multiplication operation in question; when numbers are implied, it becomes one), just as the empty sum — the result of adding no numbers — is by convention equal to the additive identity (zero). The term empty product is most often used in the above sense when discussing arithmetic operations. However, the term is sometimes employed when discussing set-theoretic intersections, categorical products, and products in computer programming.

In mathematics, an empty product, or nullary product or vacuous product, is the result of multiplying no factors. It is by convention equal to the multiplicative identity (assuming there is an identity for the multiplication operation in question; when numbers are implied, it becomes one), just as the empty sum — the result of adding no numbers — is by convention equal to the additive identity (zero). The term empty product is most often used in the above sense when discussing arithmetic operations. However, the term is sometimes employed when discussing set-theoretic intersections, categorical products, and products in computer programming. P_m = \prod_{i=1}^m a_i = a_1 \cdots a_m be the product of the first m elements of the sequence. Then P_m = P_{m-1} a_m for all m = 1, 2, ... provided that we use the convention P_0 = 1 . In other words, a "product" with no factors at all evaluates to 1. Allowing a "product" with zero factors reduces the number of cases to be considered in many mathematical formulas. Such a "product" is a natural starting point in induction proofs, as well as in algorithms. For these reasons, the "empty product is one" convention is common practice in mathematics and computer programming. For example, the empty products 0! = 1 (the factorial of zero) and x 0  = 1 shorten Taylor series notation (see zero to the power of zero for a discussion of when x = 0). Likewise, if M is an n × n matrix, then M 0 is the n × n identity matrix, reflecting the fact that applying a linear map zero times has the same effect as applying the identity map. As another example, the fundamental theorem of arithmetic says that every positive integer can be written uniquely as a product of primes. However, if we do not allow products with only 0 or 1 factors, then the theorem (and its proof) become longer. More examples of the use of the empty product in mathematics may be found in the binomial theorem (which assumes and implies that x 0 = 1 for all x), Stirling number, König's theorem, binomial type, binomial series, difference operator and Pochhammer symbol. \ln \prod_i x_i = \sum_i \ln x_i they map an empty product to an empty sum. Conversely, the exponential function maps sums into products: e^{\sum_i x_i} = \prod_i e^{x_i} and maps an empty sum to an empty product. \prod_{i \in I} X_i = \left\{ g : I \to \bigcup_{i \in I} X_i \mid \forall i\ g(i) \in X_i \right\}. If I is empty, the only such g is the empty function f_\varnothing , which is the unique subset of \varnothing\times\varnothing that is a function \varnothing \to \varnothing , namely the empty subset \varnothing (the only subset that \varnothing\times\varnothing = \varnothing has): \prod_\varnothing{} = \left\{ f_\varnothing: \varnothing \to \varnothing \right\} = \{\varnothing\}. Thus, the cardinality of the Cartesian product of no sets is 1. Under the perhaps more familiar n-tuple interpretation, \prod_\varnothing{} = \{ ( ) \}, that is, the singleton set containing the empty tuple. Note that in both representations the empty product has cardinality 1 – the number of all ways to produce 0 outputs from 0 inputs is 1. >>> math.prod([2, 3, 5]) 30 >>> math.prod([2, 3]) 6 >>> math.prod([2]) 2 >>> math.prod([]) 1 (Please note: prod is not available in the math module prior to version 3.8.) This convention helps avoid having to code special cases like "if length of list is 1" or "if length of list is zero." Multiplication is an infix operator and therefore a binary operator, complicating the notation of an empty product. Some programming languages handle this by implementing variadic functions. For example, the fully parenthesized prefix notation of Lisp languages gives rise to a natural notation for nullary functions: (* 2 2 2) ; evaluates to 8 (* 2 2) ; evaluates to 4 (* 2) ; evaluates to 2 (*) ; evaluates to 1

See also

Iterated binary operation Empty function

References

Text derived from https://en.wikipedia.org/w/index.php?oldid=1369367022 under CC BY-SA 4.0; modifications have been made.

Sources cited in this revision

3 named source(s) extracted from the cited revision. A source with no author is shown by its publication; nothing is invented.