Abstract. We study the diophantine exponent of analytic submanifolds of m × n real matrices, answering questions of Beresnevich, Kleinbock and Margulis. We identify a family of algebraic obstructions to the extremality of such a submanifold, and give a formula for the exponent when the submanifold is algebraic and defined over Q. We then apply these results to the determination of the diophantine exponent of rational nilpotent Lie groups.