Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Cartesian_product Calculator

Cartesian_product

Function: cartesian_product (<b_1>, ... , <b_n>) Returns a set of lists of the form [<x_1>, ..., <x_n>], where <x_1>, ..., <x_n> are elements of the sets <b_1>, ... , <b_n>, respectively.

makeset (i/j, [i, j], [[1, a], [2, b], [3, c], [4, d]]);
 s : {x, y, z};
 s3 : cartesian_product (s, s, s);
 makeset (i + j + k, [i, j, k], s3);
 makeset (sin(x), [x], {[1], [2], [3]});

cartesian_product complains if any argument is not a literal set.

Examples:

          (%i1) cartesian_product ({0, 1});
          (%o1)                      {[0], [1]}
          (%i2) cartesian_product ({0, 1}, {0, 1});
          (%o2)           {[0, 0], [0, 1], [1, 0], [1, 1]}
          (%i3) cartesian_product ({x}, {y}, {z});
          (%o3)                      {[x, y, z]}
          (%i4) cartesian_product ({x}, {-1, 0, 1});
          (%o4)              {[x, - 1], [x, 0], [x, 1]}

(%o1)                                true
(%i2) 

Cartesian_product Example

Related Examples

product

dens: K(d, f(d, t));

foo: product(dens/(t1...

Calculate

cartesian_product-product

cartesian_product ({0...

cartesian_product ({...

cartesian_product ({...

Calculate

product

product(1/(sigma[i] +...

Calculate

product

product(ii,ii,10,9);

Calculate

product

dens: K(d, f(d, t));

foo: product(dens, d,...

Calculate

product-sin

f(x)=product(sin(x/(2...

Calculate

cartesian_product-listify-map-product-transpose

W:{true,false};

S:listify(cartesian_p...

disj(x):=x[1] or x[2];

Calculate

product-sum

product(1/(sigma[i] +...

Calculate