Matrices of rational integers