[npl] / trunk / NationalProblemLibrary / ASU-topics / set119MatrixAlgebra / p10.pg Repository:
ViewVC logotype

Annotation of /trunk/NationalProblemLibrary/ASU-topics/set119MatrixAlgebra/p10.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 483 - (view) (download)

1 : jjholt 101 ## DESCRIPTION
2 :     ## Matrix Algebra
3 :     ## ENDDESCRIPTION
4 :    
5 :     ## KEYWORDS('Algebra' 'Matrix' 'Matrices')
6 :     ## Tagged by tda2d
7 :    
8 :     ## DBsubject('Algebra')
9 : jjholt 483 ## DBchapter('Systems of Equations and Inequalities')
10 :     ## DBsection('The Algebra of Matrices')
11 : jjholt 101 ## Date('')
12 :     ## Author('')
13 :     ## Institution('ASU')
14 :     ## TitleText1('')
15 :     ## EditionText1('')
16 :     ## AuthorText1('')
17 :     ## Section1('')
18 :     ## Problem1('')
19 :    
20 : jj 61 DOCUMENT() ;
21 :    
22 :     loadMacros(
23 :     "PGasu.pl",
24 :     "PG.pl",
25 :     "PGbasicmacros.pl",
26 :     "PGchoicemacros.pl",
27 :     "PGanswermacros.pl",
28 :     "PGauxiliaryFunctions.pl",
29 :     "PGdiffeqmacros.pl",
30 :     "PGmatrixmacros.pl"
31 :     ) ;
32 :     ############
33 :    
34 : gage 268 TEXT(beginproblem());
35 : jj 61
36 :    
37 :     foreach $i (0..2) {
38 :    
39 :     foreach $j (0..2) {
40 :     $a[$i][$j] = random(-4,4,1);
41 :     $b[$i][$j] = random(-4,4,1);
42 :     }
43 :     }
44 :    
45 :    
46 :     $showPartialCorrectAnswers = 1 ;
47 :    
48 :     BEGIN_TEXT
49 :    
50 :     If
51 :     \[ A = \left[\begin{array}{ccc}
52 :     \{join("& ",@{$a[0]}[0..$#{$a[0]}])\} \cr
53 :     \{join("& ",@{$a[1]}[0..$#{$a[1]}])\} \cr
54 :     \{join("& ",@{$a[2]}[0..$#{$a[2]}])\} \cr
55 :     \end{array}\right]
56 :     \mbox{ \ \ and \ \ \ }
57 :     B = \left[\begin{array}{ccc}
58 :     \{join("& ",@{$b[0]}[0..$#{$b[0]}])\} \cr
59 :     \{join("& ",@{$b[1]}[0..$#{$b[1]}])\} \cr
60 :     \{join("& ",@{$b[2]}[0..$#{$b[2]}])\} \cr
61 :     \end{array}\right],
62 :     \]
63 :    
64 :     then
65 :    
66 :     $BCENTER
67 :     \{ mbox(
68 :     '\( 3A-B = \)',
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 :     \}
74 :     $ECENTER
75 :     END_TEXT
76 :     foreach $i (0..2) {
77 :    
78 :     foreach $j (0..2) {
79 :     ANS(num_cmp(3*$a[$i][$j] -$b[$i][$j]) );
80 :     }
81 :     }
82 :    
83 :    
84 :    
85 :     ENDDOCUMENT() ;
86 :    

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9