Previous Up Next

6.3.27  Products

The product command can find the products of elements of an expression (see Section 6.3.27), the elements of a list (see Section 6.3.27), the elements of the columns of a matrix (see Section 14.3.6), and the term-by-term (Hadamard) product of two matrices (see Section 14.3.8).

Product of values of an expression.

The product or mul command can find the product of the values of an expression as the variable changes.

Examples

product(x^2+1,x,1,4)

or:

mul(x^2+1,x,1,4)
     
1700           

Indeed, (12+1)(22+1)(32+1)(42+1)=1700.

product(x^2+1,x,1,5,2)

or:

mul(x^2+1,x,1,5,2)
     
520           

Indeed, (12+1)(32+1)(52+1)=520.

Product of elements of a list.

The product or mul command can find the products of elements of a list.

(See also Section 14.3.8.)

Examples

product([2,3,4])

or:

mul([2,3,4])
     
24           
product([[2,3,4],[5,6,7]])
     

10,18,28
          
product([2,3,4],[5,6,7])

or:

mul([2,3,4],[5,6,7])
     

10,18,28
          

Previous Up Next