# Help understanding Product (capital PI) notation

On the wikipedia article for lagrange interpolation (https://en.wikipedia.org/wiki/Lagrange_polynomial), it shows the definition for the lagrange basis functions in a strange way - well strange to me anyways.

$$\ell_j(x) := \prod_{\begin{smallmatrix}0\le m\le k\\ m\neq j\end{smallmatrix}} \frac{x-x_m}{x_j-x_m}$$

That product notation doesn't seem to indicate an explicit index or a range to operate on.

By guessing, it seems like $m$ is implicitly defined as the index, only because it is a previously undefined variable.

It also looks like $m$ should be greater than or equal to zero and less than or equal to $k$. It doesn't seem to say anything about the fact that m should go from 0 to $k$ though.

It does indicate of course to skip the value where $m=j$.

Can someone help me understand how to properly read this notation?

Thanks!

You’ve guessed correctly. It means the product over the set

$$\{m\in\Bbb Z:0\le m\le k\text{ and }m\ne j\}$$

of indices. Similarly,

$$\prod_{a\le n\le b}x_n$$

is synonymous with

$$\prod_{n=a}^bx_n\;.$$

You will occasionally see even more ‘exotic’ variants, e.g.,

$$\prod_{n\in\{2p+1:p\text{ is prime}\}}x_n$$

or

$$\prod_{5\le 3n+7<28}x_n\;.$$

• oh weird, does sigma also allow that range format? – Alan Wolfe Jul 8 '15 at 4:19
• @Alan: Yes, it does. – Brian M. Scott Jul 8 '15 at 4:19

The easiest way to read this is to say that the product extends over all indices $m$ with $m= 0, 1, \ldots, j-1,j+1, j+2, \ldots, k$. In other words, the indices go from $0$ to $k$, but you skip the index $j$.

It will be very clear if you write it out long-hand, without the $\Pi$ notation.