TITLE: How often does a pair of linear maps generate a Zariski-dense subgroup of $GL(d,\mathbb{R})$?
QUESTION [6 upvotes]: I am an analyst working on a number of problems which in some way relate to random matrix products. In this context I frequently find that the analytic properties I am interested in depend in some way on an algebraic equation not being satisfied by the elements of a finitely-generated matrix semigroup. My knowledge of algebraic geometry is very basic, so I am not even sure whether or not the following question is difficult, but I would find an answer extremely useful: 

How large is the set of pairs $(A,B) \in GL(d,\mathbb{R})^2$ such that the group generated by $A$ and $B$ is Zariski dense in $GL(d,\mathbb{R})$? Specifically, does it include an open dense set in the standard topology? Is it residual? Does it have full Lebesgue measure?

All else being equal, I would especially appreciate a "crisp" reference which is easily understood by readers without specific expertise in algebraic geometry.
Thanks in advance!

REPLY [10 votes]: The collection $A,B$ which generate a Zriski dense subgroup contains  a Zariski open set (I should add that a Zariski oepn set is of full measure in $GL(n,\mathbb{R})\times GL(n,\mathbb{R})$). 
The set of elements $A$ of $G=GL(n,\mathbb {R})$ which have distinct complex eigenvalues $a_i$ such that for different pairs of indices $(i,j)$ and $(k,l)$ the values $a_ia_j^{-1}$ and $a_ka_l^{-1}$ are different form a Zariski open set (regular semi-simple elements form a Zariski open set, and these extra conditions ensure that under  the adjoint reepresentation, $Ad(A)$ has as many distinct eigenvalues as are allowed. 
We assume that $A$ and $B$ have infinite order, since an element of $SO(n)$ will have eigenvalues which are inverses of each other, and generic elements of $GL(n)$ can be chosen to avoid this (assume $n\geq 3$). Hence the connected component of the group gen by $A$ (or by $B$) is not identity and its lie algebra $\mathfrak{T}$ will be non-central in $\mathfrak{gl_n}$. 
Suppose that $G$ is the Zariski closure of the group generated by $A$ and $B$. Fix a maximal torus of $GL(n,\mathbb{R})$ (up to conjugacy, there are only finitely many). We view $B$ as an element $gCg^{-1}$ for some $g\in GL(n)$ and some $C \in T$. The Lie algebra of $G$ splits into eigenspaces for $Ad(A)$; the condition that $all$ non-trivial eigenspaces are non-zero gives an open condition on the set of $B$'s: the projection  of $g\mathfrak{T}g^{-1}$  onto these non-trivial eigenspaces is nonzero for generic $g$.   and hence the group generated by $A,B$ will have Lie algebra $\mathfrak{g}$ which contains all the $E_{ij}$ and hence contains $\mathfrak{sl_n}$. Therefore, $G=GL_n$ (if we assume that $(det A)^2$ is not equal to one).