[npl] / trunk / NationalProblemLibrary / Rochester / setLinearAlgebra11Eigenvalues / ur_la_11_11.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/Rochester/setLinearAlgebra11Eigenvalues/ur_la_11_11.pg

Tue May 2 20:24:19 2006 UTC (7 years ago) by jjholt
File size: 1639 byte(s)
Update tags.


    1 ## DESCRIPTION
2 ## Linear Algebra
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS ('linear algebra','matrix','eigenvalue','eigenvector')
6 ## Tagged by cmd6a 4/30/06
7
8 ## DBsubject('Linear Algebra')
9 ## DBchapter('Matrices')
10 ## DBsection('Eigenvalues')
11 ## Date('')
12 ## Author('')
13 ## Institution('Rochester')
14 ## TitleText1('')
15 ## EditionText1('')
16 ## AuthorText1('')
17 ## Section1('')
18 ## Problem1('')
19
20 DOCUMENT();        # This should be the first executable line in the problem.
21
23 "PG.pl",
24 "PGbasicmacros.pl",
25 "PGchoicemacros.pl",
27 "PGgraphmacros.pl",
28 "PGmatrixmacros.pl",
29 "PGnumericalmacros.pl",
30 "PGauxiliaryFunctions.pl"
31 );
32
33 TEXT(beginproblem());
34 $showPartialCorrectAnswers = 1; 35 36$u1 = random(-5,5,1);
37 $v1 = random(-5,5,1); 38$u2 = random(-5,5,1);
39 $v2 = random(-5,5,1); 40 41$det = $u1*$v2 - $v1*$u2;
42
43 while ($det == 0) { 44$u1=$u1+1; 45$v2=$v2+1; 46$det = $u1*$v2 - $v1*$u2;
47 }
48
49 $e = random(1,10,1); 50$f = random(-10,-1,1);
51
52 ## matrix [u v] is invertible, Au=eu, Av=fv, so A[u v] = [eu, fv]
53 ## A = [eu, fv] [u v]^{-1}
54
55 $a11 = ($e*$u1*$v2 - $f*$v1*$u2)/$det;
56 $a12 = (-$e*$u1*$v1 + $f*$v1*$u1)/$det;
57 $a21 = ($e*$u2*$v2 - $f*$v2*$u2)/$det;
58 $a22 = (-$e*$u2*$v1 + $f*$v2*$u1)/$det;
59
60 BEGIN_TEXT
61
62 Find a $$2\times 2$$ matrix $$A$$ such that
63 $BR 64 \{ mbox( display_matrix([[$u1], [$u2]]), ' and ', display_matrix([[$v1], [$v2]]) ) \} 65$BR
66 are eigenvectors of $$A$$, with eigenvalues $$e$$ and $$f$$ respectively.
67 $BR 68 \{ mbox( '$$A=$$', answer_matrix(2,2,15), '.' ) \} 69 70 END_TEXT 71 72 ANS(num_cmp($a11));
73 ANS(num_cmp($a12)); 74 ANS(num_cmp($a21));
75 ANS(num_cmp(\$a22));
76
77 ENDDOCUMENT();       # This should be the last executable line in the problem.
78