Modules over PID with applications to the structure of finitely generated abelian groups and canonical forms of matrices. Basic theory of commulative rings: Localization, integral dependence, Noetherian and Artinian rings, Hilbert's Nullstellensatz, Hilbert series of graded algebras with applications to simplicial complexes, lattice points of convex polytopes and counting magic squares.