Product Operator

Product Operator

The product operator is shorthand for multiplying many expressions together. The operator can be expanded into the equivalent multiplication by substituting the initial index variable into the expression to get the first sub-expression, then incrementing the index variable by one and substituting its new value into the expression to get the second sub-expression, repeating this process until the end value is reached. Finally, the result is calculated by multiplying all of the sub-expressions together. For example, the product operator is used in the expression below:

The starting value for the index variable is declared by the statement below the operator . The expression being multiplied is defined by . Start by substituting the initial value of into the body expression to get the value , then increment the variable by one and substitute it again into the expression to get the value of the second sub-expression: 2. Then, increment the variable by one again and substitute it into the body expression to get the the third subexpression . Finally, since the variable is equal to which is the end value, we are done and can compute the final result by multiplying all of the sub-expressions together.