{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

WI08Ma1bPrachelpset7

WI08Ma1bPrachelpset7 - x^2 x 1 = 0.0 then you get 1.61803...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Math 1b Practical February 26, 2009 Help with Mathematica for Problem Set 7 Remember that Mathematica works with matrices as a "list" of rows, each row being a "list". So the matrix A = 1 2 3 4 is entered and diplayed as {{1,2},{3,4}}. Use a dot (period) for matrix product, e.g. A.B . Transpose[A] returns the transpose of A . Inverse[A] returns the inverse of A . Eigenvalues[A] returns the list of eigenvalues. Eigenvalues [1.0 A] returns the eigenvalues in decimal form. Eigenvectors[A] returns the list of corresponding eigenvectors. CAUTION: These are the right eigenvectors, or column-eigenvectors. But they seem to be displayed as rows by Mathematica. If you want the matrix whose COLUMNS are the eigenvectors, you want Transpose[Eigenvectors[A]]. MatrixPower[A, n] returns the n-th power of A . IMPORTANT: Mathematica works symbolically unless you tell it otherwise. E.g. it will give the roots of x^2 - x - 1 = 0 as (1 +- Sqrt[5])/2 . If you want MMA to work in floating point, one way to do this is to introduce a decimal point anywhere. If you ask for the roots of
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: x^2 - x - 1 = 0.0 , then you get 1.61803 and -0.618034 . In[1]:= A = 88 1, 2 < , 8 3, 4 << Out[1]= 88 1, 2 < , 8 3, 4 << In[2]:= B = 88 1, − 1 < , 8 3, 2 << Out[2]= 88 1, − 1 < , 8 3, 2 << In[3]:= A.B Out[3]= 88 7, 3 < , 8 15, 5 << In[4]:= Inverse @ A D Out[4]= :8 − 2, 1 < , : 3 2 , − 1 2 >> In[5]:= Transpose @ A D Out[5]= 88 1, 3 < , 8 2, 4 << In[6]:= Eigenvalues @ 1.0 A D Out[6]= 8 5.37228, − 0.372281 < In[7]:= Eigenvectors @ A D Out[7]= :: − 4 3 + 1 6 J 5 + 33 N , 1 > , : − 4 3 + 1 6 J 5 − 33 N , 1 >> In[8]:= Eigenvectors @ 1.0 A D Out[8]= 88 − 0.415974, − 0.909377 < , 8 − 0.824565, 0.565767 << In[23]:= U = Transpose @ Eigenvectors @ 1.0 A D D Out[23]= 88 − 0.415974, − 0.824565 < , 8 − 0.909377, 0.565767 << In[24]:= A.U Out[24]= 88 − 2.23473, 0.30697 < , 8 − 4.88543, − 0.210625 << In[25]:= Inverse @ U D .A.U Out[25]= 98 5.37228, 0. < , 9 − 6.10623 × 10 − 16 , − 0.372281 == In[17]:= MatrixPower @ A, 10 D Out[17]= 88 4783 807, 6972 050 < , 8 10458 075, 15 241 882 <<...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern