Computing Invariant Factors April 6, 2016 1 Introduction Let R be a PID and M a finitely generated R-module. If M is generated by the elements m 1, m 2,..., m k then we can define a surjective homomorphism ϕ: R k M via ϕ(e i ) = a i where e 1, e 2,..., e k is the standard basis of R k. The kernel of this map, N = ker(ϕ), is a submodule of R k, and since R is a PID we know that there exists an integer 0 l k, elements a 1, a 2,..., a l of R with a i a i+1, and a basis b 1, b 2,..., b k of R k so that a 1 b 1, a 2 b 2,..., a l b l forms a basis of N. By the first isomorphism theorem we therefore have M = R k /N = (Rb 1 Rb 2 Rb k )/(Ra 1 b 1 Ra 2 b 2 Ra l b l ) = (R/a 1 ) (R/a 2 ) (R/a l ) R k l. In class we defined the invariant factors of M to be the elements a 1, a 2,..., a l R and the rank of M to be the integer k l. We said in class that the rank of M is unique, and the invariant factors are unique up to multiplication by units. In these notes we will show how to compute the rank and invariant factors of M in the situation that R is a Euclidean Domain. We will then give examples of applying this algorithm to problems involving finitely generated abelian groups and rational/jordan canonical form. 2 Setup and Intuition Let x 1, x 2,..., x m be any basis for R m and let N R m be a submodule generated by elements y 1, y 2,..., y n (I am not assuming these form a basis). Since the x i span R m, we know that there are elements a ij R so that y j = m a ij x i. 1
Consider the m n relations matrix a 11 a 12 a 1n a 21 a 22 a 2n A =....... a m1 a m2 a mn For convenience, label the rows of A by r 1, r 2,..., r m and the columns of A by c 1, c 2,..., c n. Let α R, and suppose we replace y a with y a = y a +αy b for some b a. It s easy to see that N = Ry 1 + + Ry n = Ry 1 + + Ry a 1 + Ry a + Ry a+1 + + Ry n and so changing from y 1,..., y n to y 1,..., y a 1, y a, y a+1,..., y n doesn t affect N. This will, however, change the relations matrix A to a new matrix A whose columns satisfy { c k = c k, k a c a + αc b, k = a. We can also examine what happens if we replace x a with x a = x a + αx b where b a. Previously, we had y j = m a ij x i. With respect to our new basis, we get y j = = m a ij x i + a aj x a + a bj x b i a,b m a ij x i + a aj x a + (a bj αa aj )x b. i a,b This will change the relations matrix A to a new matrix A whose rows satisfy { r k = r k, k b r b αr a, k = b. 2
If one decides to swap two of the x i s, the effect on A will be to switch those two rows. Similarly if one decides to swap two of the y j s, the effect on A will be to switch those two columns. Motivated by these observations, we get the following theorem. Theorem 2.1. Let x 1,..., x m be a basis for R m, let y 1,..., y n be a set of generators for N R m, and let A be the corresponding relations matrix with rows r 1,..., r m and columns c 1,..., c n. Suppose that after performing a series of elementary operations on A, each of the form 1. Swap r i with r j for some i j, 2. Swap c i with c j for some i j, 3. Replace c i by c i + αc j for some α R and j i, 4. Replace r i by r i + βr j for some β R and j i, we obtain a matrix B. Then there exists a basis x 1,..., x m of R m and generators y 1,..., y n of N for which B is the relations matrix. How theorem is very helpful in trying to find the rank and the invariant factors. Suppose we start with a relations matrix A and use these elementary row and column operations to obtain a m n block matrix ( ) D 0 S = 0 0 where D is an l l diagonal matrix of the form a 1 0 0 0 a 2 0 D =. 0 0.. 0 0 0 a l where a i a i+1. Then this says that R m has a basis x 1, x 2,..., x m and N has a set of generators y 1, y 2,..., y n so that { a j x j, j l y j = 0, j > l. This is exactly what we want to do to find the invariant factors and the rank! In the next section we will give an explicit algorithm for converting a relations matrix into a matrix of the form of S in the case that R is a Euclidean Domain. Such a matrix is said to be in Smith Normal Form. 3
3 The Algorithm From here on we assume that R is a Euclidean Domain with respect to a norm N : R Z 0. Given a matrix A M m n (R) we would like to show that we can use elementary row and column operations to transform A into a matrix S which is in Smith normal form. Let s do that using the following sequence of steps. 3.1 Step 0: If A is the zero matrix then then A is already in Smith normal form and there is nothing to do. Otherwise, there must be some nonzero entry a ij whose norm is minimal among the nonzero entries of A. Using row and column swaps move this entry to the top left of A. 3.2 Step 1: Look for an element a in the first row or first column of A which is not divisible by a 11. If no such element exists then move on to step 2. By the Euclidean algorithm there exists q, r with a = a 11 q + r where N(r) < N(a 11 ). If a is in row i then subtract q times row 1 from row i. If a is in column j then subtract q times column 1 from column j. Go back to step 0. Step 1 terminates by the well-ordering principle. While we ve messed up our matrix by subtracting a multiple of one column/row from another, we notice that the a entry becomes r and r has smaller norm than a. Since we cannot reduce the norm indefinitely, step 1 will terminate. When it does, the a 11 entry will divide all other entries in the first row and first column of A. 3.3 Step 2: We now have that a 11 divides all entries in the first row and first column of A. Use row and column operations to zero out every other entry in the first row and first column of A. At the end of step 2 your matrix, in block form, will look like ( ) a11 0 A = 0 M where M has at most m 1 rows and n 1 columns. 4
3.4 Step 3: Look for an entry in M which is not a multiple of a 11. If no such entry exists then proceed to step 4. Suppose there is such an entry a ij. Then i 1 and j 1. Add row i to row 1 and proceed back to step 1. This step will not alter a 11, but move a ij into the top row of A. Again, the well-ordering principle shows you that this step terminates. By moving a ij to the top row, step 1 and step 2 will then transform A into a matrix whose top left entry has smaller norm than it had before. This process must terminate, and it does when a 11 divides all entries of M. 3.5 Step 4: At the end of step 3 we should have A in the block form ( ) a11 0 0 M where a 11 divides all entries of M. The entry a 11 will be your first invariant factor. If M is size 1 1 then we can terminate. Otherwise go back to step 0 with M in place of A. While this step goes back to step 0, notice that the sum of the dimensions of M are smaller than those of A. Since the sum reduces each time we reach step 4, this step is guaranteed to eventually terminate. 4 An Example Suppose R = Z and A is the matrix 4 4 6 10 A = 8 3 2 7. 12 0 1 3 Let s perform the above algorithm on A. There are choices to be made while running this algorithm, but it s helpful to remember that you will always 5
arrive at the correct final answer. 4 4 6 10 6 4 4 10 1 0 12 3 8 3 2 7 c 1 c 3 2 3 8 7 r 1 r 3 2 3 8 7 12 0 1 3 1 0 12 3 6 4 4 10 r 2 2r 1 r 2 r 3 6r 1 r 3 1 0 12 3 0 3 16 1 0 4 68 8 c 3 12c 1 c 3 c 4 3c 1 c 4 1 0 0 0 0 3 16 1 0 4 68 8 c 2 c 4 0 1 16 3 r 3+8r 2 r 3 0 1 16 3 0 8 68 4 0 0 196 28 c 3 +16c 2 c 3 c 4 3c 2 c 4 0 1 0 0 c 3 c 4 0 1 0 0 c 4+7c 3 c 4 0 1 0 0. 0 0 196 28 0 0 28 196 0 0 28 0 This is the Smith normal form of A. As an example application, suppose I told you that we have an abelian group G which is generated by three elements a, b, c subject to the relations: 4a + 8b + 12c = 0 4a + 3b = 0 6a + 2b + c = 0 10a + 7b + 3c = 0. To figure out exactly what group G is isomorphic to, we map Z 3 G via e 1 a, e 2 b and e 3 c. The kernel of this map is precisely generated by the relations: 4e 1 + 8e 2 + 12e 3, 4e 1 + 3e 2, 6e 1 + 2e 2 + e 3, 10e 1 + 7e 2 + 3e 3. The relations matrix for this matrix is precisely A, and since it has the Smith normal form we found above we see that G = Z/1Z Z/1Z Z/28Z = Z/28Z. Thus G has one invariant factor, namely 28. Even though the definition of G looks so complex, it turns out to be a cyclic group with 28 elements! It s worth mentioning that the elementary divisors of G are 4 and 7 since G = Z/28Z = Z/4Z Z/7Z. 6
5 Applications to Linear Algebra Let V be an n-dimensional vector space over a field F and suppose we have a linear transformation T : V V. Fix a basis B = {v 1,..., v n } of V and represent T by the n n matrix A = M B B (T ) = (a ij). We learned in class that V as an F [x]-module where x v = T (v) is isomorphic to V = F [x]/(a 1 (x)) F [x]/(a 2 (x)) F [x]/(a m (x)) where each a i (x) is monic and a i (x) a i+1 (x). These invariant factors can be used to compute the Rational canonical form or Jordan canonical form (in the case that a m (x) factors into linears over F ). One question we did not answer in class is how one computes these invariant factors. To do this, map the free module F [x] n to V by e i v i and call this map ϕ. This map is obviously surjective since the v i span V as a vector space hence as an F [x]-module. To apply the techniques of these notes we need to know generators for the kernel of this map. Notice that T (v j ) n a ij v i and so xe j maps to a ij v i under our map. Thus ( ) n ϕ xe j a ij e i = 0 and so y j = xe j a ij e i ker(ϕ) for each j. It s not so hard to check in fact that the y j s generate ker(ϕ). Using the basis e 1,..., e n of F [x] n, the relations matrix we get for the y i s is xi A. What this means is that if we put xi A into Smith normal form then the non-constant diagonal entries showing up will be the invariant factors of T and/or A. As an example, consider 13 24 50 A = 6 11 25 M 3 (Q). 0 0 1 We have x 13 24 50 xi A = 6 x + 11 25. 0 0 x 1 7
Let s put this into Smith normal form. In addition to the elementary row operations allowed above, we will also multiply by scalars to get rid of denominators. This is okay since scalars are units and won t affect the final answer. x 13 24 50 6 x + 11 25 0 0 x 1 6 x + 11 25 x 13 24 50 0 0 x 1 r 2 r 1 6r 2 (x 13)r 1 r 2 6 x + 11 25 1 0 0 0 x 2 + 2x 1 25x + 25 0 x 2 + 2x 1 25x + 25 r 2 r 3 c 2 c 3 0 0 x 1 0 0 x 1 1 0 0 1 0 0 0 x 1 0 r 3+25r 2 r 3 0 x 1 0 0 25x + 25 x 2 + 2x 1 0 0 x 2 + 2x 1 Thus we have the invariant factors a 1 = x 1 and a 2 = x 2 2x + 1. This means that the rational canonical form for A is 1 0 0 0 0 1. 0 1 2 Since a 2 = (x 1) 2 we know that A has a Jordan form over Q. It is 1 0 0 0 1 1. 0 0 1 8