The ring of integers Zis the main example of a ring with unique factorization of elements into primes.Another most important example of such rings is the ring of polynomials overa field. In this chapter we shall consider other examples of commutative ringswith unique factorization, such as Euclidean rings and principal ideal domains.Our main goal will be to describe finitely generated modules over principal idealdomains. Specializing the principal ideal domain to be Z, we shall also obtainthe main structure theorem for finitely generated Abelian groups, and, hence, forfinite Abelian groups.The central concept of the axiomatic development of linear algebra is a vectorspace over a field. A central problem of linear algebra is the study of lineartransformations in a finite dimensional vector space over a field. For the givenlinear transformation A in a vector space V over a field K we can use A to makeV into a module over the polynomial ring K[x] in one variable x. The study of thismodule leads to the theory of canonical forms of matrices of a linear transformationand to the solution of the similarity problem of matrices. In the last section weapply the structure theorem of finitely generated modules over a PID to obtain thedecomposition of finitely generated modules over the polynomial ring K[x] and,hence, canonical forms for square matrices.All the rings considered in this chapter will be commutative with identity1 != 0. Denote by N the set of all natural numbers, i.e., the set of all (strictly)positive integers, and by A∗ the set of all units (=invertible elements) of a ring A.