Math 34H Solutions to Homework # 3 Complete the exercises from the second maple assignment which can be downloaded from my linear algebra course web page Attach printouts of your work on this problem to your solutions to the rest of the problems below Solution: See the Solution to Maple Assignment #2 link on the course web page 2 Decide whether or not the following linear transformations are diagonalizable Justify your answers (a) T : R 2 R 2 is defined to be a 9 counterclockwise rotation about the origin [ ] [ ] [ ] [ ] Solution: Since T ( ) = and T ( ) = we see that the matrix representing T with respect to the standard basis is [ ] A = Now T is diagonalizable if and only if A is diagonalizable The characteristic polynomial of A is p(λ) = λ 2 + Since there are no real roots to this polynomial we see that A has no real eigenvalues Thus A is not diagonalizable over the reals However the complex roots of p(λ) are i and i Since these roots each have algebraic multiplicity one we conclude that A is diagonalizable over the complex numbers (b) S : R 2 R 2 is defined to be a reflection about the line y = x Solution: The matrix representing S with respect to the standard basis is [ ] B = The characteristic polynomial for B is p(λ) = λ 2 = (λ )(λ + ) Thus B has two real eigenvalues each having multiplicity one This means that B [ (and hence [ S) is diagonalizable over the real numbers Indeed one easily sees that S( ) = and ] ] [ ] [ [ ] [ [ ] S( ) = = Hence and are eigenvectors corresponding to ] ] and respectively Thus there is a basis for R 2 consisting of eigenvectors of S 3 Let A be a square matrix (a) Let λ be an eigenvalue for A Prove that λ k is an eigenvalue for A k for any k Solution: Since λ is an eigenvalue for A there is a nonzero vector u such that Au = λu Then A 2 u = A(Au) = A(λu) = λ(au) = λ(λu) = λ 2 u This says that u is an eigenvector of A 2 corresponding to the eigenvalue λ 2 Now we just lather rinse repeat More precisely suppose we know that A k u = λ k u Then
A k u = A(A k u) = A(λ k u) = λ k (Au) = λ k u Hence by induction we see that λ k is an eigenvalue for A k for all k Furthermore if u is an eigenvector for A corresponding to the eigenvalue λ then u is also an eigenvector for A k corresponding to the eigenvalue λ k (b) Suppose A is diagonalizable Prove that A k is diagonalizable for any k Solution: One way to prove this is to use the observation which was made toward the end of the solution to part (a): If {u u l } is a set of eigenvectors for A then it is also a set of eigenvectors for A k Recall that an n n matrix is diagonalizable if and only if there is a basis for R n consisting of eigenvectors of the matrix So if A is diagonalizable then there is a basis for R n consisting of eigenvectors of A and hence of A k also Therefore A k is diagonalizable Here s another way: A is diagonalizable if and only if A = P DP for some invertible matrix P and diagonal matrix D Note that A 2 = (P DP )(P DP ) = P D 2 P Similarly A 3 = P D 3 P A 4 = P D 4 P and so on As D is diagonal so is D k for any k Hence A k is diagonalizable for any k (c) Suppose A 2 is diagonalizable Is it true that A is diagonalizable? [ ] Solution: No Take for example A = Then the only eigenvalue of A is λ = which has algebraic multiplicity 2 (since the characteristic polynomial is p(λ) = λ 2 ) However the eigenspace for λ = is one-dimensional (as [ the] nullity of I A = A is ) Hence A is not diagonalizable However A 2 = which is diagonalizable (in fact it is diagonal!) 4 Solve the differential equation y 6y + y 6y = subject to the initial conditions y() = 2 y () = 4 and y () = Solution: First we introduce some new functions Let y = y y 2 = y y 3 = y 2 The equation y 6y + y 6y = can be rewritten as y 3 = 6y y 2 + 6y 3 Thus this third order differential equation can be transformed into the following system of first order differential equations: y y 2 = y 3 6 6 For convenience we ll refer to this system by the equation y = Ay Next we try to y y 2 y 3
diagonalize this system We first find the characteristic polynomial and eigenvalues of A: λ det(λi A) = det λ 6 λ 6 = (λ)(λ)(λ 6) 6 + λ = λ 3 6λ 2 + λ 6 = (λ )(λ 2)(λ 3) Thus the eigenvalues of A are 2 and 3 each occurring with algebraic multiplicity one Therefore A is diagonalizable Next we need to find a basis for R 3 consisting of eigenvectors of A We compute the eigenspaces for each of the eigenvalues: I A = 6 5 From this we see a basis for the eigenspace corresponding to λ = is 2 4 2I A = 2 2 6 4 Here we see a basis for the λ = 2 eigenspace is 2 4 3 9 3I A = 3 3 6 3 Thus a basis for the λ = 3 eigenspace for A is 3 Therefore A = P DP where 9 P = 2 3 and D = 2 4 9 3 Now we do a change of variables Let z = P y where z = z 2 Then z 3 z = P y = P (Ay) = P (P DP y) = D(P y) = Dz z
Thus we have reduced the original system y = Ay to the simpler diagonal system z = Dz: This is easily solved as z = z z 2 = 2z 2 z 3 = 3z 3 z = C e t z 2 = C 2 e 2t z 3 = C 3 e 3t Since y = P z we get that y C e t y = y 2 = 2 3 C 2 e 2t y 3 4 9 C 3 e 3t C e t + C 2 e 2t + C 3 e 3t = C e t + 2C 2 e 2t + 3C 3 e 3t C e t + 4C 2 e 2t + 9C 3 e 3t The initial conditions are y () = 2 y 2 () = 4 and y 3 () = This leads to the system y () = C + C 2 + C 3 = 2 y 2 () = C + 2C 2 + 3C 3 = 4 y 3 () = C + 4C 2 + 9C 3 = The augmented matrix for this system is: 2 2 3 4 which reduces to 4 9 9 2 9 2 Thus C = 9 C 2 2 = C 3 = 9 Thus our solution to the initial value problem is 2 y(t) = 9 2 et + e 2t 9 2 e3t 5 The following matrices generate binary linear codes For each generator matrix list all the codewords and determine the number of errors each code will detect and correct (a) (b)
Solution: Since the matrix in part (a) has two (linearly independent) columns the number of codewords in the subspace spanned by these two columns is 2 2 = 4 In particular if u and v are the two columns then the set of codewords is { u v u + v} = The minimum distance for this code is 2 (The minimum distance is equal to the smallest number of s appearing in any codeword) Recall from class that a code can detect t errors if and only if its minimum distance is at least t + and can correct t errors if and only if its minimum distance is at least 2t + Thus this code can detect error and correct errors The code give by the second generator matrix will have 2 3 = 8 codes words If u v w denote the first second and third columns (respectively) then the codewords are { u v w u+v u+w v+w u+v+w} = From inspection we see that the minimum distance of this code is 2 Thus this code can detect error but corrects no errors 6 (a) Let G be a generator matrix for an [n k] binary linear code C Let W be the nullspace of G T Prove that W is an [n n k] binary linear code W is called the dual code of C Solution: Since G is the generator matrix for an [n k] linear code the subspace spanned by the columns of G must be a k-dimensional subspace of F n 2 Since the columns of G form a basis for this code G must be an n k matrix and the rank of G is k Therefore G T is k n and the rank of G T is k since rank A T = rank A for any matrix A Hence W (the nullspace of G T ) is a subspace of F n 2 and has dimension n k since rank G T + nullity G T = n It follows that W is an [n n k] binary linear code (b) Find generator matrices for the dual codes of the codes given in the previous problem Solution: We just need to find a basis for the transpose of each of the generator matrices in problem 5 We begin with the generator matrix for part (a): G T = [ ] Note that this matrix is already in reduced row echelon form This corresponds to the homogeneous system x = x 3 x 4 x 5 = x 3 + x 4 + x 5 x 2 = x 4 = x 4
where we have used that x = x in F 2 since x + x = 2x = Hence x x 3 + x 4 + x 5 x 2 x 3 x 4 = x 4 x 3 x 4 = x 3 + x 4 + x 5 x 5 x 5 This gives us a basis for the nullspace of G T Hence the generator matrix for the dual code is Repeating this process for the generator matrix in problem 5(b): G T = As before this matrix is already in reduced row echelon form homogeneous system is The corresponding x = x 4 + x 5 + x 6 x 2 = x 4 + x 6 x 3 = x 4 + x 5 + x 6 The general solution to this system is x x 4 + x 5 + x 6 x 2 x 4 + x 6 x 3 x 4 = x 4 + x 5 + x 6 x 4 = x 4 + x 5 + x 6 x 5 x 5 x 6 x 6 Thus the generator matrix for the dual code is