  Computational problems concerning the orbit of a point under the action of a
matrix group occur in numerous subfields of computer science, including
complexity theory, program analysis, quantum computation, and automata theory.
In many cases the focus extends beyond orbits proper to orbit closures under a
suitable topology. Typically one starts from a group and several points and
asks questions about the orbit closure of the points under the action of the
group, e.g., whether two given orbit closures intersect.
  In this paper we consider a collection of what we call determination problems
concerning groups and orbit closures. These problems begin with a given variety
and seek to understand whether and how it arises either as an algebraic group
or as an orbit closure. The how question asks whether the underlying group is
$s$-generated, meaning it is topologically generated by $s$ matrices for a
given number $s$. Among other applications, problems of this type have recently
been studied in the context of synthesising loops subject to certain specified
invariants on program variables.
  Our main result is a polynomial-space procedure that inputs a variety $V$ and
a number $s$ and determines whether $V$ arises as an orbit closure of a point
under an $s$-generated commutative matrix group. The main tools in our approach
are rooted in structural properties of commutative algebraic matrix groups and
lattice theory. We leave open the question of determining whether a variety is
an orbit closure of a point under an algebraic matrix group (without the
requirement of commutativity). In this regard, we note that a recent paper by
Nosan et al. [NPSHW2021] gives an elementary procedure to compute the orbit
closure of a point under finitely many matrices.
