Defining a function, $\Pi(x_1, x_2, ... x_n)$ that will multiply all inputs together.

38 Views Asked by At

I want to define a function that outputs the product of all numbers I input. My reasoning is I have defined say 10 variables: $a$ through $k$. If I want to multiply them all together, writing:

$a \times b \times c \times d \times etc...$ is not what I would like.

Also, I don't think I could use $\prod_i^n$ notation without defining a function because each variable is a unique letter, rather than say $x_1, x_2, x_3$, etc.

Right now, I have:

$\Pi(x_1, x_2 \ldots x_n) := \prod_{i=1}^ni$

with the intent of seeing

$\Pi(a,b,c,d,e,f,g,h,i,j,k)$ rather than $a \times b \times c \times d \times e \times f \times g \times h \times j \times k$ between each variable.

Can I get some help or tips on correctly formatting?