## 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 o10 = ideal(97048224x - 42121625x*y + 287249760x*z - 14791875y*z + ----------------------------------------------------------------------- 2 88905600z + 4761000x*t + 12420000z*t) o10 : Ideal of S