## DESCRIPTION ## Matrix Algebra ## ENDDESCRIPTION ## KEYWORDS('Algebra' 'Matrix' 'Matrices') ## Tagged by tda2d ## DBsubject('Algebra') ## DBchapter('Systems of Equations and Inequalities') ## DBsection('The Algebra of Matrices') ## Date('') ## Author('') ## Institution('ASU') ## TitleText1('') ## EditionText1('') ## AuthorText1('') ## Section1('') ## Problem1('') DOCUMENT() ; loadMacros( "PGasu.pl", "PG.pl", "PGbasicmacros.pl", "PGchoicemacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl", "PGdiffeqmacros.pl", "PGmatrixmacros.pl" ) ; ############ TEXT(beginproblem()); foreach $i (0..2) { foreach$j (0..2) { $a[$i][$j] = random(-4,4,1);$b[$i][$j] = random(-4,4,1); } } $showPartialCorrectAnswers = 1 ; BEGIN_TEXT If $A = \left[\begin{array}{ccc} \{join("& ",@{a[0]}[0..#{a[0]}])\} \cr \{join("& ",@{a[1]}[0..#{a[1]}])\} \cr \{join("& ",@{a[2]}[0..#{a[2]}])\} \cr \end{array}\right] \mbox{ \ \ and \ \ \ } B = \left[\begin{array}{ccc} \{join("& ",@{b[0]}[0..#{b[0]}])\} \cr \{join("& ",@{b[1]}[0..#{b[1]}])\} \cr \{join("& ",@{b[2]}[0..#{b[2]}])\} \cr \end{array}\right],$ then$BCENTER \{ mbox( '$$3A-B =$$', display_matrix([[ans_rule(5),ans_rule(5),ans_rule(5)], [ans_rule(5),ans_rule(5),ans_rule(5)], [ans_rule(5),ans_rule(5),ans_rule(5)]], 'align'=>"ccc")) \} $ECENTER END_TEXT foreach$i (0..2) { foreach $j (0..2) { ANS(num_cmp(3*$a[$i][$j] -$b[$i][\$j]) ); } } ENDDOCUMENT() ;