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
or:
Indeed, (12+1)(22+1)(32+1)(42+1)=1700.
or:
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.
-
product takes one mandatory and one optional argument:
-
L, a list of numbers.
- Optionally, L2, another list of numbers the same length
as L.
- product(L) returns the product of the elements of
L.
- product(L,L2) returns the term by term product
of the elements of L and L2.
(See also Section 14.3.8.)
Examples
or:
product([[2,3,4],[5,6,7]]) |
or: