[npl] / branches / UGA / 9.4.7.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /branches/UGA/9.4.7.pg

Sat Jul 24 17:11:33 2010 UTC (2 years, 10 months ago) by ted shifrin
File size: 1651 byte(s)
Log message

    1 ## DESCRIPTION
2 ## Linear Algebra
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS ('linear algebra','matrix','symmetric','eigenvalue','eigenvector','orthonormal')
6 ## Tagged by cmd6a 5/3/06
7
8 ## DBsubject('Linear Algebra')
9 ## DBchapter('Matrices')
10 ## DBsection('Eigenvalues')
11 ## Date('')
12 ## Author('modified by Shifrin')
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 "PGmorematrixmacros.pl"
32 );
33
34 TEXT(beginproblem());
35 $showPartialCorrectAnswers = 1; 36 37$a = random(1,9,1);
38 $b = random(-9,-1,1); 39 40 BEGIN_TEXT 41 42 The matrix $$A = \{display_matrix_mm([[0, 0, a], [0, b, 0], [a, 0, 0]]) \}$$ 43$PAR
44 has two distinct eigenvalues $$\lambda_1 < \lambda_2$$.
45 Find the eigenvalues and an orthonormal basis for each eigenspace.
46 $BR 47 \{ mbox( '$$\lambda_1$$ = ', ans_rule(10) , ',' ) \} 48$BR
49 \{mbox( 'Orthonormal basis: ', ans_array(3,1,10), ',' ) \}
50 $BR 51 \{ mbox( '$$\lambda_2$$ = ', ans_rule(10), ',' ) \} 52$BR
53 \{mbox( 'Orthonormal basis: ', ans_array(3,1,10), ',', ans_array_extension(3,1,10), '.' ) \}
54 $BR 55 The above eigenvectors form an orthonormal basis for $$\mathbb R^3$$. 56 57 END_TEXT 58 59 ANS(num_cmp($b));
60 ANS(basis_cmp([[0, 1, 0]], 'mode'=>'unit', 'help'=>'verbose'));
61 ANS(num_cmp(\$a));
62 ANS(basis_cmp([[1, 0, 0], [0, 0, 1]], 'mode'=>'orthonormal', 'help'=>'verbose'));
63
64 ENDDOCUMENT();       # This should be the last executable line in the problem.
65