# Product of a sequence (product)

Product of an expression over one or more ranges.

## How to write it

### product(f, k = a..b)

The product over the range.

**f**

The expression or function to work on. Takes an expression.

**k = a..b**

The index and its bounds; a bound may be inf. Takes a variable with its range.

### product(f, i = a..b, j = a..b)

A double product.

**f**

The expression or function to work on. Takes an expression.

**i = a..b**

The first index and its range. Takes a variable with its range.

**j = a..b**

The second index and its range. Takes a variable with its range.

## Examples

- $\displaystyle \prod_{k=1}^{5} k = 120$

  `product(k, k = 1..5)`

  In the solver, `product(k, k = 1..5)` gives `120`.

  [Open in the solver](https://hilberon.com/?q=product%28k%2C%20k%20%3D%201..5%29)
- $\displaystyle \prod_{k=1}^{4} \left(1+\frac{1}{k}\right) = 5$

  `product(1 + 1/k, k = 1..4)`

  In the solver, `product(1 + 1/k, k = 1..4)` gives `5`.

  [Open in the solver](https://hilberon.com/?q=product%281%20%2B%201%2Fk%2C%20k%20%3D%201..4%29)
- $\displaystyle \prod_{i=1}^{2} \prod_{j=1}^{2} (i+j) = 72$

  `product(i + j, i = 1..2, j = 1..2)`

  In the solver, `product(i + j, i = 1..2, j = 1..2)` gives `72`.

  [Open in the solver](https://hilberon.com/?q=product%28i%20%2B%20j%2C%20i%20%3D%201..2%2C%20j%20%3D%201..2%29)

## Related functions

- [numeric_product](https://hilberon.com/library/numeric_product)

  Multiply an expression over a range, as a decimal.
- [series](https://hilberon.com/library/series)

  Series expansion of an expression about a point.
- [numeric_sum](https://hilberon.com/library/numeric_sum)

  Add up an expression over a range, as a decimal.
- [series_coefficient](https://hilberon.com/library/series_coefficient)

  The coefficient of the term of a given order in the series of an expression.
- [sum](https://hilberon.com/library/sum)

  Sum of an expression over one or more ranges.
- [next_terms](https://hilberon.com/library/next_terms)

  The terms that follow a list, given only when a rule explains it and predicts two more.

---
Source: https://hilberon.com/library/product
