## DESCRIPTION ## Linear Algebra ## ENDDESCRIPTION ## KEYWORDS ('linear algebra','eigenvalues', 'diagonalizability') ## DBsubject('Multivariable Mathematics') ## DBchapter('Linear Transformations') ## DBsection('Eigenvalues and Eigenvectors, Diagonalizability') ## Date('March 13, 2010') ## Author('Shifrin') ## Institution('UGA') ## TitleText1('') ## EditionText1('') ## AuthorText1('') ## Section1('') ## Problem1('') DOCUMENT(); # This should be the first executable line in the problem. loadMacros("PG.pl", "PGbasicmacros.pl", "PGchoicemacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl", "PGmatrixmacros.pl", "PGmorematrixmacros.pl", "Parser.pl", "weightedGrader.pl" ); TEXT(beginproblem()); $showPartialCorrectAnswers = 0; install_weighted_grader(); Context("Matrix");$a=random(-3,3); $b=non_zero_random(-3,3); do{$c=random(-3,3)} until ($c!=$a); do{$d=random(-3,3)} until ($d!=$a &&$d!=$c); do{$e=random(-3,3)} until ($e!=$a && $e!=$c && $e!=$d); $r1=random(-5,5);$r2=random(-5,5); $r3=random(-5,5);$r4=non_zero_random(-5,5); $r5=random(-5,5);$r6=random(-5,5); $M1 = Matrix("[[$a,$b,$r1,$r2],[0,$a,$r3,$r4],[0,0,$c,$r5],[0,0,0,$d]]");$M2 = Matrix("[[$a,0,0,0],[$r1,$c,0,0],[$r2,$r3,$d,0],[$r4,$r5,$r2,$e]]"); $M3 = Matrix("[[$a,$r1,0,$r2],[0,$c,0,0],[0,$r4,$a,$r5],[0,0,0,$c]]");$M4 = Matrix("[[$a,$r3,$r2,$r1],[$r3,$a,$r5,$r4],[$r2,$r5,$c,$r6], [$r1,$r4,$r6,$d]]"); @Ms = ($M1,$M2,$M3,$M4); @diags=('not diagonalizable','diagonalizable','diagonalizable','diagonalizable'); @choice=NchooseK(4,4); @A=@Ms[@choice]; @diag=@diags[@choice]; $ans1=str_cmp($diag[0]); $ans2=str_cmp($diag[1]); $ans3=str_cmp($diag[2]); $ans4=str_cmp($diag[3]); Context()->texStrings; BEGIN_TEXT Consider the matrices $A = A[0], \quad B = A[1],$ $BR $C = A[2], \quad D = A[3] .$$PAR The matrix $$A$$ is \{pop_up_list(['?','diagonalizable','not diagonalizable'])\}. $PAR The matrix $$B$$ is \{pop_up_list(['?','diagonalizable','not diagonalizable'])\}.$PAR The matrix $$C$$ is \{pop_up_list(['?','diagonalizable','not diagonalizable'])\}. $PAR The matrix $$D$$ is \{pop_up_list(['?','diagonalizable','not diagonalizable'])\}.$PAR END_TEXT ANS($ans1,$ans2,$ans3,$ans4); ENDDOCUMENT(); # This should be the last executable line in the problem.