# intersect -- compute an intersection

## Synopsis

• Usage:
intersect (M,N,...,P)
• Inputs:
• (M,N,...,P), a list or of modules or ideals that are submodules of the same module or ideals in the same ring
• Outputs:
• or an ideal that is the intersection of the elements in the list or in the sequence.

## Description

This function calculates the intersection of submodules of the same free module, or of ideals in the same ring.

The following example computes the intersection of a sequence of ideals.

 `i1 : R=ZZ/101[a..d];` ```i2 : I=intersect(ideal(a,b),ideal(b,c),ideal(c,d),ideal(d,a)) o2 = ideal (b*d, a*c) o2 : Ideal of R```

The following example computes the intersection of a list of modules.

 `i3 : R=ZZ[x,y,z];` `i4 : M=image matrix{{3*x},{3*x}};` `i5 : N=image matrix{{5*y},{5*y}};` `i6 : P=image matrix{{7*z},{7*z}};` ```i7 : intersect{M,N,P} o7 = image | 105xyz | | 105xyz | 2 o7 : R-module, submodule of R```

The command intersect will only work with proper ideals. To intersect an ideal with a ring, use selectInSubring along with the elimination ordering, see Eliminate.

## Ways to use intersect :

• intersect(List)
• intersect(Sequence)