Macaulay2 » Documentation
Packages » Hadamard :: hadamardProduct(Ideal,Ideal)
next | previous | forward | backward | up | index | toc

hadamardProduct(Ideal,Ideal) -- Hadamard product of two homogeneous ideals

Description

Given two projective subvarieties $X$ and $Y$, their Hadamard product is defined as the Zariski closure of the set of (well-defined) entrywise products of pairs of points in the cartesian product $X \times Y$. This can also be regarded as the image of the Segre product of $X \times Y$ via the linear projection on the $z_{ii}$ coordinates. The latter is the way the function is implemented.

Consider for example the entrywise product of two points.

i1 : S = QQ[x,y,z,t];
i2 : p = point {1,1,1,2};
i3 : q = point {1,-1,-1,-1};
i4 : idealOfProjectivePoints({p*q},S)

o4 = ideal (2z - t, 2y - t, 2x + t)

o4 : Ideal of S

This can be computed also from their defining ideals as explained.

i5 : IP = ideal(x-y,x-z,2*x-t)

o5 = ideal (x - y, x - z, 2x - t)

o5 : Ideal of S
i6 : IQ = ideal(x+y,x+z,x+t)

o6 = ideal (x + y, x + z, x + t)

o6 : Ideal of S
i7 : hadamardProduct(IP,IQ)

o7 = ideal (2z - t, 2y - t, 2x + t)

o7 : Ideal of S

We can also consider Hadamard product of higher dimensional varieties. For example, the Hadamard product of two lines.

i8 : I = ideal(random(1,S),random(1,S));

o8 : Ideal of S
i9 : J = ideal(random(1,S),random(1,S));

o9 : Ideal of S
i10 : hadamardProduct(I,J)

                          2                                2  
o10 = ideal(1640666412000x  - 127984188150x*y - 4545263450y  +
      -----------------------------------------------------------------------
                                                    2                     
      386029884240x*z + 10982114325y*z - 1366052688z  + 6948299255625x*t -
      -----------------------------------------------------------------------
                                                       2
      676631565675y*t + 67421131245z*t + 1514925696375t )

o10 : Ideal of S

Ways to use this method:


The source of this document is in /build/reproducible-path/macaulay2-1.25.05+ds/M2/Macaulay2/packages/Hadamard.m2:293:0.