# toricJoinDim -- Dimension of a join of toric varieties

## Synopsis

• Usage:
d = toricJoinDim(A,B)
d = toricJoinDim L
• Inputs:
• A, , The A-matrix of a toric variety
• B, , The A-matrix of a toric variety
• L, a list, A list of A-matrices of toric varieties
• Outputs:
• d, an integer, The dimension of the join of the toric varieties defined by the matrices

## Description

A randomized algorithm for computing the affine dimension of a join of toric varieties, using Terracini’s Lemma.

Each input matrix defines a parameterization of the variety. For each, a vector of parameter values is chosen at random from a large finite field. The dimension of the sum of the tangent spaces at those points is computed.

This algorithm is much much faster than computing the join variety.

 ```i1 : A = matrix{{4,3,2,1,0},{0,1,2,3,4}} o1 = | 4 3 2 1 0 | | 0 1 2 3 4 | 2 5 o1 : Matrix ZZ <--- ZZ``` ```i2 : B = matrix{{1,1,1,1,1}} o2 = | 1 1 1 1 1 | 1 5 o2 : Matrix ZZ <--- ZZ``` ```i3 : toricJoinDim(A,B) o3 = 3``` ```i4 : toricJoinDim(B,B) o4 = 1```

## Caveat

All input matrices must have the same number of columns.