### The Maxima on-line user's manual

Algebra Calculator

#### Intersection

Function: intersection (<a_1>, ..., <a_n>) Returns a set containing the elements that are common to the sets <a_1> through <a_n>.

`intersection` complains if any argument is not a literal set.

Examples:

```          (%i1) S_1 : {a, b, c, d};
(%o1)                     {a, b, c, d}
(%i2) S_2 : {d, e, f, g};
(%o2)                     {d, e, f, g}
(%i3) S_3 : {c, d, e, f};
(%o3)                     {c, d, e, f}
(%i4) S_4 : {u, v, w};
(%o4)                       {u, v, w}
(%i5) intersection (S_1, S_2);
(%o5)                          {d}
(%i6) intersection (S_2, S_3);
(%o6)                       {d, e, f}
(%i7) intersection (S_1, S_2, S_3);
(%o7)                          {d}
(%i8) intersection (S_1, S_2, S_3, S_4);
(%o8)                          {}```

There are also some inexact matches for `intersection`. Try `?? intersection` to see them.

```(%o1)                                true
(%i2) ```

### Related Examples

##### intersection

m1: set(a,b,c,d,e);

m2: set(a,f,g,h,i);

m3: set(a,c,e,g,i);

Calculate

##### intersection

A:set(1,2,3,4,5,6,7,8);

B:set(2,4,6,8,10,12,1...

C:set(3,6,9,12,18);

Calculate

##### intersection-parse_string-sdowncase-string

intersection(parse_st...

Calculate

? intersection;

Calculate

##### intersection-setdifference-symmdifference

A:{-6,-4,-2,-1,0,1,2,...

B:{-6,-3,-1,0,1,3,6};

C:{-6,-3,-2,-1,1,2,3,6};

Calculate

##### intersection-powerset-union

intersection({a, b, c...

union({a, b, c, d}, {...

powerset( {a, b, c, d...

Calculate

##### intersection-setdifference-symmdifference

U:{-6,-5,-4,-3,-2,-1,...

A:{-6,-4,-2,-1,0,1,2,...

B:{-6,-3,-1,0,1,3,6};

Calculate

##### intersection

s_1 : {11,13,10,19,17...

s_2 : {1,2,7,8,11,14...

s_3 : {2,4,6,7,8,11,...

Calculate

##### intersection

S_1 : {{}, {{}}, 1, 2...

S_2 : {1,{ 1, 2, 3}};

intersection (S_1, S...

Calculate

##### intersection-powerset-setdifference-union

U:set(1,2,3,4,5,6,7,8...

A:set(1,3,5,7,9);

B:set(5,6,7,8,9,10,11...

Calculate