A random invertible matrix I work on a project, for these project i need to generate a square random invertible matrix.
I found out how to generate a square random matrix, still i want to be sure that this is an invertible one, without having to compute the determinant or to generate this matrix multiple times, can you please give me a tip ?
 A: EDIT.
We consider matrices in $M_n(K)$, where $K$ is a finite field with $q$ elements. We use an uniform distribution of probability over the elements of $K$.
We randomly choose an upper invertible triangular matrix $U$ and a lower triangular invertible matrix $L$ and put $A=LU$.
The complexity is 
$n(n-1)$ (independent) random choices in the underlying field $K$ and $2n$ (independent) random choices in $K\setminus \{0\}$.
A matricial product of complexity $n^3/3$.
$\textbf{Remarks.}$ i) most invertible matrices in $M_n(K)$ admit LU decomposition (cf. https://arxiv.org/pdf/math/0506382v1.pdf).  Of course, we cannot obtain $A=\begin{pmatrix}0&1\\1&0\end{pmatrix}$. To make this kind of trouble unlikely, we have better choose  $q$ not too small.
ii) A finite sum of product of random elements of $K$ is uniformly distributed over $K$. Then the $(a_{i,j})$ are uniformly distributed. However, since the diagonals have non-zero elements, there is a little gap concerning the North-West entries of $A$; for example $a_{1,1}\not=0$. So you have to choose $q$ not too small.
iii) Assume that $K$ is infinite, for example $K=\mathbb{Q}$. Then we randomly choose the $(l_{i,j}),(u_{i,j})$ according to ad hoc laws of probability. I don't think that $a_{2,2}$ (a sum of $2$ products) and $a_{n,n}$ (a sum of $n$ products) follow the same distribution law... 
A: A mean to be sure that a matrix has nonzero determinant is to take it as diagonally dominant  (say for example on each column $j$, $|a_{jj}|> \sum_{i=1...n, i \neq j}|a_{ij}|$) https://en.wikipedia.org/wiki/Diagonally_dominant_matrix It can be also done on rows.
