Two Lives of the Grassmannian

This page contains auxiliary files to the paper:
Karel Devriendt, Hannah Friedman, Bernhard Reinke and Bernd Sturmfels: The Two Lives of the Grassmannian

Abstract. The real Grassmannian is both a projective variety (via Plücker coordinates) and an affine variety (via orthogonal projections). We connect these two representations, and we develop the commutative algebra of the latter variety. We introduce the squared Grassmannian, and we study applications to determinantal point processes in statistics.

Symbolic computations

Example 2.3

We compare two formulas for the projection matrix: \(P = A^T ( A A^T)^{-1} A\) (given in Example 1.1) and \(P = \frac{d \cdot XX^T}{{\rm trace}(X^TX)}\) (given in Corollary 2.5). We do this for \(n=5\) and \(d=2\) and

\[\begin{split}A = \begin{pmatrix} 1 & 0 & a_{11} & a_{12} & a_{13} \\ 0 & 1 & a_{21} & a_{22} & a_{23} \end{pmatrix}\end{split}\]

in the following Macaulay2 code snippet: example2.3.m2

 1R = QQ[x12, x13, x23, x14, x24, x34, x15, x25, x35, x45,
 2       a11, a12, a13, a21, a22, a23];
 3
 4A = matrix{
 5    {1, 0, a11, a12, a13},
 6    {0, 1, a21, a22, a21}
 7    }
 8
 9-- Compute P from Pluecker coordinates
10
11X = matrix{
12    {  0 ,  x12,  x13,  x14,  x15},
13    {-x12,  0  ,  x23,  x24,  x25},
14    {-x13, -x23,  0  ,  x34,  x35},
15    {-x14, -x24, -x34,  0  ,  x45},
16    {-x15, -x25, -x35, -x45, 0   }}
17
18
19P1 = 2 * (X * transpose(X)) -- delay including the trace factor to avoid division
20
21--- Computing P directly from A
22
23AAT = A*transpose(A)
24
25AATinv = inverse(promote(AAT, frac R))
26
27P2 = transpose(A) * AATinv * A
28
29
30-- Check Equality
31
32maxMinors =  gens minors(2, A)
33-- we use this to write the Pluecker coordinates in terms of the minors of A,
34-- leaving the entries of A unchanged
35subs = maxMinors|matrix{{a11, a12, a13, a21, a22, a23}}
36
37
38P2 * sub(trace(transpose(X) * X), subs) - sub(P1, subs)  == 0

Example 2.4

The following Macaulay2 code produces the \(n \times \binom{n}{d-1}\) cocircuit matrix \((x_{iK})\) of Example 2.4.

example2.4.m2

 1n = 6
 2d = 3
 3
 4R = QQ[subsets(1..n,d) / (i -> x_i)]
 5use R
 6entry = (i,j) -> (
 7    K := (sort(subsets(1..n,d-1)))_j;
 8    if any(K,l -> l == i + 1)
 9    then 0
10    else (iK := insert(0, i + 1, K);
11        sign := (-1)^(number(K, l -> l < i + 1));
12        iKsorted := sort(iK);
13        sign * x_iKsorted)
14)
15
16X = map(R^n,binomial(n,d-1),entry)

Conjecture 3.6

Our computational evidence for Conjecture 3.6 can be downloaded here: conjecture3.6.m2. The Macaulay2 file lists 285 linearly independent quartics that are verified to lie in the ideal of \(\mathrm{sGr}(3,6)\). Additional computations (such as matching dimension and degree) suggest that they generate the ideal.

Degree of the projection Grassmannian

The following Macaulay2 code computes the degree of the projection Grassmannian \(\mathrm{pGr}(d,n)\) as given in Proposition 5.5.

1n = 7
2d = 3
3R = QQ[p_1..p_(binomial(n+1,2))];
4P = genericSymmetricMatrix(R,p_1,n)
5I = minors(1,P^2-P)+ideal(trace(P)-d);
6toString mingens I
7dim I, degree I

Example 6.10

The following Macaulay2 code produces the ideal of the generic fiber \(\mathrm{sGr}(2,n)_z\) for \(4 \leq n \leq 7\) of the projective moment map for the squared Grassmannian.

example6.10.m2

 1n = 7
 2R = QQ[q_1..q_(binomial(n+1,2))];
 3
 4-- Generate a generic symmetric n x n matrix with 0 diagonal
 5Q = genericSymmetricMatrix(R,q_1,n)
 6zeroDiag = for i from 0 to n-1 list (Q_(i,i) => 0)
 7Q = sub(Q, zeroDiag)
 8
 9-- Create the ideal for the squared Grassmannian with the 2 x 2 minors of Q included
10sGRIdeal = minors(4, Q);
11M = matrix{for i from 0 to n - 1 list sum(entries(Q_i))} || matrix{for i from 0 to n - 1 list random(1, 20)}
12I = sGRIdeal + minors(2, M);
13
14-- Saturate
15-- Two colons is enough to check saturation for n = 4, 5, 6, 7
16J = ideal entries (transpose M)_0
17
18Itemp = I:J;
19I = Itemp;
20
21Itemp = I:J;
22I == Itemp
23
24-- The dimension in the paper is obtained by subtracting n+1 to account
25-- for the unused diagonal variables and projective dimension
26dim I - (n+1)
27
28-- This gives the number of cubics
29numgens source (mingens I) - (n - 1)
30
31degree I

Numerical computations

The following Jupyter notebooks show how to do our numerical degree computations using the julia package HomotopyContinuation.jl.

The Jupyter notebooks can be downloaded here:

projection_grassmannian_degree.ipynb

positive_grassmannian_mldegree.ipynb

squared_grassmannian_mldegree.ipynb

We also provide the code of these Jupyter notebooks as standalone Julia files:

projection_grassmannian_degree_standalone.jl

positive_grassmannian_mldegree_standalone.jl

squared_grassmannian_mldegree_standalone.jl

They can be used in the following way:

julia -t [NUM_THREADS] projection_grassmannian_degree_standalone.jl [N] [D]

where NUM_THREADS is the number of threads to be used by julia. For example,

julia -t 256 projection_grassmannian_degree_standalone.jl 9 2

computes the degree of \(\mathrm{pGr}(2,9)\) using 256 threads.

We used the standalone files together with the batch system of the MPI MiS to compute the degrees in the tables of Theorem 4.1 and Proposition 5.5.

Project page created: 22/05/2024

Project contributors: Karel Devriendt, Hannah Friedman, Bernhard Reinke and Bernd Sturmfels

Corresponding author of this page: Bernhard Reinke, bernhard.reinke@mis.mpg.de

Software used: Julia (Version 1.10.2), Macaulay2 (v1.21)

System setup used: 2x 32-Core AMD Epyc 7601 at 2.2 GHz (max. 3.2 GHz), 1024 GB RAM

License for code of this project page: MIT License (https://spdx.org/licenses/MIT.html)

License for all other content of this project page (text, images, …): CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

Last updated 22/05/2024.