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:

Intersection 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>.

not( (elementp({a},{A}) and elementp({a},{B}))  ) or (  elementp({a},intersection({A},{B})) );

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) 

Intersection Example

Related Examples

intersection-setdifference-solve-union

A:set(1,2,5,6);

B:set(2,5,6);

C:intersection(A,B);

Calculate

intersection-union

A:set(1,2,5,6);

B:set(2,5,6);

C:intersection(A,B);

Calculate

intersection-union

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-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

intersection

A:set(1,2,5,6);

B:set(2,5,6);

C:intersection(A,B);

Calculate

intersection-powerset-union

intersection(powerset...

Calculate

intersection

s_1 : {3/8};

s_2 : {1/2};

s_3 : {1,2,4,5,7,10,...

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