gauss wrote disquisitiones arithmeticae which is a book about number theory. in that book he proved the law of quadratic reciprocity. he also was the first mathematician to explain modular arithmetic in a very detailed way. before gauss, mathematicians had used modular arithmetic in some cases but did not know much about using it broadly.