[npl] / trunk / NationalProblemLibrary / Rochester / setLinearAlgebra15TransfOfLinSpaces / ur_la_15_15.pg Repository:
ViewVC logotype

View of /trunk/NationalProblemLibrary/Rochester/setLinearAlgebra15TransfOfLinSpaces/ur_la_15_15.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 144 - (download) (annotate)
Sun Mar 26 15:53:04 2006 UTC (7 years, 1 month ago) by jj
File size: 1666 byte(s)
Initial import

    1 ##DESCRIPTION
    2 ##KEYWORDS('linear', 'transformation', 'plane', 'basis', 'matrix')
    3 ##
    4 ##ENDDESCRIPTION
    5 
    6 DOCUMENT();        # This should be the first executable line in the problem.
    7 
    8 loadMacros(
    9 "PG.pl",
   10 "PGbasicmacros.pl",
   11 "PGchoicemacros.pl",
   12 "PGanswermacros.pl",
   13 "PGgraphmacros.pl",
   14 "PGmatrixmacros.pl",
   15 "PGnumericalmacros.pl",
   16 "PGauxiliaryFunctions.pl"
   17 );
   18 
   19 TEXT(beginproblem());
   20 $showPartialCorrectAnswers = 1;
   21 
   22 $a = random(2,4,1);
   23 $b = random(2,4,1);
   24 $sa = random(-1,1,2);
   25 $sb = random(-1,1,2);
   26 $a = $a * $sa;
   27 $b = $b * $sb;
   28 
   29 $v2 = random(2,4,1);
   30 $v3 = random(-2,-4,1);
   31 $v1 = - $a*$v2 - $b*$v3;
   32 
   33 $v = new Matrix(3,2);
   34 $v->assign(1,1, - $a);
   35 $v->assign(2,1,1);
   36 $v->assign(3,1,0);
   37 $v->assign(1,2,- $b);
   38 $v->assign(2,2,0);
   39 $v->assign(3,2,1);
   40 
   41 $C = new Matrix(2,3);
   42 foreach $i (1..2) {
   43         foreach $j (1..3){
   44                 $C->assign($i, $j, non_zero_random(-2,2,1));
   45         }
   46 }
   47 
   48 $M = new Matrix(3,3);
   49 $M = $v * $C;
   50 
   51 $N = new Matrix(3,2);
   52 $N = $M * $v;
   53 
   54 $ans1 = $N->element(2,1);
   55 $ans2 = $N->element(2,2);
   56 $ans3 = $N->element(3,1);
   57 $ans4 = $N->element(3,2);
   58 
   59 $RIGHT_BRACE = '\}';
   60 
   61 BEGIN_TEXT
   62 
   63 Let \(V\) be the plane with equation \(x_1 + $a x_2 + $b x_3 =0 \) in \({\mathbb R}^3\).
   64 Find the matrix \(A\) of the linear transformation
   65 \( T(x)= \{display_matrix_mm($M)\} x \) with respect to the basis
   66 \( \left\{'\{'\} \{display_matrix_mm([[- $a], [1], [0]])\} ,  \{display_matrix_mm([[- $b], [0], [1]])\}
   67    \right${RIGHT_BRACE} \).
   68 $BR
   69 \{ mbox( '\(A=\)', answer_matrix(2,2,10) ) \}
   70 
   71 END_TEXT
   72 
   73 ANS(num_cmp($ans1));
   74 ANS(num_cmp($ans2));
   75 ANS(num_cmp($ans3));
   76 ANS(num_cmp($ans4));
   77 
   78 ENDDOCUMENT();       # This should be the last executable line in the problem.
   79 

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9