First time here? Check out the FAQ!
answered 13 years ago
In one line:
[random_matrix(ZZ,10,x=0,y=2).echelon_form()==identity_matrix(10) for i in range(1000)].count(true)