In Lemma 2.2.2 we represented a generating function for the closed walks in a graph in terms of its characteristic polynomial. There are a number of useful generalisations of this result, but to derive them we will need to work with formal power series with coefficients coming from a ring of matrices. In this chapter we present the basic theory of formal power series over a ring with identity element. Our approach is to show that a formal power series is, in a well-defined sense, a limit of a sequence of polynomials. This enables us to derive results about formal power series by first proving them for polynomials, and then verifying that they hold in the limit.