  We study the general problem of extremality for metric Diophantine
approximation on submanifolds of matrices. We formulate a criterion for
extremality in terms of a certain family of algebraic obstructions and show
that it is sharp. In general, the almost sure diophantine exponent of a
submanifold is shown to depend only on its Zariski closure, and when the latter
is defined over the rational numbers, we prove that the exponent is rational
and give a method to effectively compute it. This method is applied to a number
of cases of interest, in particular, we manage to determine the diophantine
exponent of random subgroups of certain nilpotent Lie groups in terms of
representation theoretic data.
