[npl] / trunk / NationalProblemLibrary / ASU-topics / set119MatrixAlgebra / p9.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/ASU-topics/set119MatrixAlgebra/p9.pg

Sat Jun 3 14:35:45 2006 UTC (6 years, 11 months ago) by gage
File size: 1423 byte(s)
Cleaned code with convert-functions.pl script

1 ## DESCRIPTION
2 ## Matrix Algebra
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS('Algebra' 'Matrix' 'Matrices')
6 ## Tagged by tda2d
7
8 ## DBsubject('Algebra')
9 ## DBchapter('Linear Algebra')
10 ## DBsection('Matrix Algebra')
11 ## Date('')
12 ## Author('')
13 ## Institution('ASU')
14 ## TitleText1('')
15 ## EditionText1('')
16 ## AuthorText1('')
17 ## Section1('')
18 ## Problem1('')
19
20
21 DOCUMENT() ;
22
24 "PGasu.pl",
25 "PG.pl",
26 "PGbasicmacros.pl",
27 "PGchoicemacros.pl",
29 "PGauxiliaryFunctions.pl",
30 "PGdiffeqmacros.pl",
31 "PGmatrixmacros.pl"
32 ) ;
33 ############
34
35 TEXT(beginproblem());
36
37
38 foreach $i (0..2) { 39 40 foreach$j (0..2) {
41       $a->[$i][$j] = random(-4,4,1); 42 } 43 } 44 45 46$showPartialCorrectAnswers = 1 ;
47
48 BEGIN_TEXT
49
50 If
51 A = \{display_matrix_mm( a, align=>'rrr' ) \}
52
53 and $$I$$ is the $$3 \times 3$$ identity matrix, then
54
55 BCENTER 56 \{ mbox( 57 '$$A I =$$', 58 display_matrix([[ans_rule(5),ans_rule(5),ans_rule(5)], 59 [ans_rule(5),ans_rule(5),ans_rule(5)], 60 [ans_rule(5),ans_rule(5),ans_rule(5)]], 61 'align'=>"ccc")) 62 \} 63ECENTER
64 and
65
66 BCENTER 67 \{ mbox( 68 '$$I A =$$', 69 display_matrix([[ans_rule(5),ans_rule(5),ans_rule(5)], 70 [ans_rule(5),ans_rule(5),ans_rule(5)], 71 [ans_rule(5),ans_rule(5),ans_rule(5)]], 72 'align'=>"ccc")) 73 \} 74ECENTER
75
76 END_TEXT
77 foreach $i (0..2) { 78 foreach$j (0..2) {
79       ANS(num_cmp($a->[$i][$j])); 80 } 81 } 82 foreach$i (0..2) {
83    foreach $j (0..2) { 84 ANS(num_cmp($a->[$i][$j]));
85     }
86 }
87
88
89
90
91 ENDDOCUMENT() ;
92