Computing the maximum likelihood degree of a two-way scaled Segre variety

Isaac Burke

Using Macaulay2, we may compute the maximum likelihood degree (“ML degree”) of a scaled Segre variety where d=2 and n1=n2=3 and the scaling array is given by

C=[c13c23c33c12c22c32c11c21c31]=[c1311c12c2211c211].

The Macaulay2 commands for six distinct scaling arrays C are given below (hover cursor over a code box and click to copy). The commands may be executed with a local version of Macaulay2 or by using one of the online Macaulay2 applications here.

ML degree 1: when (c12,c13,c21,c22)=(1,1,1,1):

R = QQ[s,t_11,t_12,t_21,t_22];
sT = transpose matrix{{
1*s*t_11*t_21,
1*s*t_11*t_22,
1*s*t_11,
1*s*t_12*t_21,
1*s*t_12*t_22,
1*s*t_12,
1*s*t_21,
1*s*t_22,
1*s}};
As = matrix{
{1,1,1,1,1,1,1,1,1},
{1,1,1,0,0,0,0,0,0},
{0,0,0,1,1,1,0,0,0},
{1,0,0,1,0,0,1,0,0},
{0,1,0,0,1,0,0,1,0}};
U = transpose matrix{{
random(0,999),random(0,999),random(0,999),
random(0,999),random(0,999),random(0,999),
random(0,999),random(0,999),random(0,999)}};
As = substitute(As,R);
U = substitute(U,R);
Usum = (sum(flatten(entries U)));
rels = As*U-Usum*As*sT;
I = ideal rels
degree I

ML degree 2: when (c12,c13,c21,c22)=(2,1,1,1):

R = QQ[s,t_11,t_12,t_21,t_22];
sT = transpose matrix{{
1*s*t_11*t_21,
2*s*t_11*t_22,
1*s*t_11,
1*s*t_12*t_21,
1*s*t_12*t_22,
1*s*t_12,
1*s*t_21,
1*s*t_22,
1*s}};
As = matrix{
{1,1,1,1,1,1,1,1,1},
{1,1,1,0,0,0,0,0,0},
{0,0,0,1,1,1,0,0,0},
{1,0,0,1,0,0,1,0,0},
{0,1,0,0,1,0,0,1,0}};
U = transpose matrix{{
random(0,999),random(0,999),random(0,999),
random(0,999),random(0,999),random(0,999),
random(0,999),random(0,999),random(0,999)}};
As = substitute(As,R);
U = substitute(U,R);
Usum = (sum(flatten(entries U)));
rels = As*U-Usum*As*sT;
I = ideal rels
degree I

ML degree 3: when (c12,c13,c21,c22)=(2,3,1,1):

R = QQ[s,t_11,t_12,t_21,t_22];
sT = transpose matrix{{
1*s*t_11*t_21,
2*s*t_11*t_22,
3*s*t_11,
1*s*t_12*t_21,
1*s*t_12*t_22,
1*s*t_12,
1*s*t_21,
1*s*t_22,
1*s}};
As = matrix{
{1,1,1,1,1,1,1,1,1},
{1,1,1,0,0,0,0,0,0},
{0,0,0,1,1,1,0,0,0},
{1,0,0,1,0,0,1,0,0},
{0,1,0,0,1,0,0,1,0}};
U = transpose matrix{{
random(0,999),random(0,999),random(0,999),
random(0,999),random(0,999),random(0,999),
random(0,999),random(0,999),random(0,999)}};
As = substitute(As,R);
U = substitute(U,R);
Usum = (sum(flatten(entries U)));
rels = As*U-Usum*As*sT;
I = ideal rels
degree I

ML degree 4: when (c12,c13,c21,c22)=(2,3,1,2):

R = QQ[s,t_11,t_12,t_21,t_22];
sT = transpose matrix{{
1*s*t_11*t_21,
2*s*t_11*t_22,
3*s*t_11,
1*s*t_12*t_21,
2*s*t_12*t_22,
1*s*t_12,
1*s*t_21,
1*s*t_22,
1*s}};
As = matrix{
{1,1,1,1,1,1,1,1,1},
{1,1,1,0,0,0,0,0,0},
{0,0,0,1,1,1,0,0,0},
{1,0,0,1,0,0,1,0,0},
{0,1,0,0,1,0,0,1,0}};
U = transpose matrix{{
random(0,999),random(0,999),random(0,999),
random(0,999),random(0,999),random(0,999),
random(0,999),random(0,999),random(0,999)}};
As = substitute(As,R);
U = substitute(U,R);
Usum = (sum(flatten(entries U)));
rels = As*U-Usum*As*sT;
I = ideal rels
degree I

ML degree 5: when (c12,c13,c21,c22)=(2,3,2,1):

R = QQ[s,t_11,t_12,t_21,t_22];
sT = transpose matrix{{
1*s*t_11*t_21,
2*s*t_11*t_22,
3*s*t_11,
2*s*t_12*t_21,
1*s*t_12*t_22,
1*s*t_12,
1*s*t_21,
1*s*t_22,
1*s}};
As = matrix{
{1,1,1,1,1,1,1,1,1},
{1,1,1,0,0,0,0,0,0},
{0,0,0,1,1,1,0,0,0},
{1,0,0,1,0,0,1,0,0},
{0,1,0,0,1,0,0,1,0}};
U = transpose matrix{{
random(0,999),random(0,999),random(0,999),
random(0,999),random(0,999),random(0,999),
random(0,999),random(0,999),random(0,999)}};
As = substitute(As,R);
U = substitute(U,R);
Usum = (sum(flatten(entries U)));
rels = As*U-Usum*As*sT;
I = ideal rels
degree I

ML degree 6: when (c12,c13,c21,c22)=(2,3,2,3):

R = QQ[s,t_11,t_12,t_21,t_22];
sT = transpose matrix{{
1*s*t_11*t_21,
2*s*t_11*t_22,
3*s*t_11,
2*s*t_12*t_21,
3*s*t_12*t_22,
1*s*t_12,
1*s*t_21,
1*s*t_22,
1*s}};
As = matrix{
{1,1,1,1,1,1,1,1,1},
{1,1,1,0,0,0,0,0,0},
{0,0,0,1,1,1,0,0,0},
{1,0,0,1,0,0,1,0,0},
{0,1,0,0,1,0,0,1,0}};
U = transpose matrix{{
random(0,999),random(0,999),random(0,999),
random(0,999),random(0,999),random(0,999),
random(0,999),random(0,999),random(0,999)}};
As = substitute(As,R);
U = substitute(U,R);
Usum = (sum(flatten(entries U)));
rels = As*U-Usum*As*sT;
I = ideal rels
degree I