## DESCRIPTION ## Matrix Algebra ## ENDDESCRIPTION ## KEYWORDS('Algebra' 'Matrix' 'Matrices' 'True' 'False') ## 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("PGbasicmacros.pl", "PGchoicemacros.pl", "PGanswermacros.pl", ); TEXT(beginproblem(), \$BR,\$BBOLD, "True False Problem", \$EBOLD, \$BR,\$BR); # Since this is a true questions, we do not usually wish to tell students which # parts of the matching question have been answered correctly and which are # incorrect. That is too easy. To accomplish this we set the following flag to # zero. \$showPartialCorrectAnswers = 0; # True false questions are a special case of a "select list" # Make a new select list \$tf = new_select_list(); # \$tf now "contains" the select list object. # Insert some questions and whether or not they are true. \$tf -> qa ( # each entry has to end with a comma "If A and B are both square matrices such that AB equals BA equals the identity matrix, then B is the inverse matrix of A.", "T", "If A is a square matrix, then there exists a matrix B such that AB equals the identity matrix.", "F", "If \( AX = B \) represents a system of linear equations and \( A^{-1} \) exists, then the product \( A^{-1}B \) gives the solution to the system.", "T", ); # every statement has to end with a semi-colon. # Choose two of the question and answer pairs at random. \$tf ->choose(2); # Now print the text using \$ml->print_q for the questions # and \$ml->print_a to print the answers. BEGIN_TEXT \$PAR Enter T or F depending on whether the statement is true or false. (You must enter T or F -- True and False will not work.)\$BR \{ \$tf-> print_q \} \$PAR END_TEXT # Enter the correct answers to be checked against the answers to the students. ANS(str_cmp( \$tf->ra_correct_ans ) ) ; ENDDOCUMENT(); # This should be the last executable