Assignment 1 Problem 4

Assignment 1 Problem 4 - &amp;amp;gt;&amp;amp;gt;...

This preview shows pages 1–3. Sign up to view the full content.

Sheet1 Page 1 >> diary Prob4 >> A=[2 3 1 1 1 3 -2 -1 3] A = 2 3 1 1 1 3 -2 -1 3 >> inv (A) ans = -0.4286 0.7143 -0.5714 0.6429 -0.5714 0.3571 -0.0714 0.2857 0.0714 >> B=[1 1 3 2 4 2 1 3 3] B = 1 1 3 2 4 2 1 3 3 >> inv (B) ans = 0.7500 0.7500 -1.2500 -0.5000 0 0.5000 0.2500 -0.2500 0.2500 >> y=inv(A*B) y = 0.2500 -0.2500 -0.2500 0.1786 -0.2143 0.3214 -0.2857 0.3929 -0.2143 >> z=inv(B)*inv(A) z = 0.2500 -0.2500 -0.2500 0.1786 -0.2143 0.3214 -0.2857 0.3929 -0.2143 >> %y=z which proves part (i)

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

View Full Document
Sheet1 Page 2 >> >> C=[-2 3 2 2 01/03/09 -2 -1] C = -2 3 2 2 01/03/09 -2 -1 >> D=[-1 -1 6 5 2 -3 -1 1] D = -1 -1 6 5 2 -3 -1 1 >> trace (C*D) ans = -2 >> trace (D*C) ans = -2 >> % Part (ii) is proved
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: &gt;&gt; &gt;&gt; transpose (A) ans = 02/01/02 03/01/01 1 3 3 &gt;&gt; inv(transpose(A)) ans =-0.4286 0.6429 -0.0714 0.7143 -0.5714 0.2857-0.5714 0.3571 0.0714 &gt;&gt; transpose(inv(A)) ans =-0.4286 0.6429 -0.0714 Sheet1 Page 3 0.7143 -0.5714 0.2857-0.5714 0.3571 0.0714 &gt;&gt; %Part (iii) is proved &gt;&gt; &gt;&gt; % Now we need to prove A(B+E)=AB+AE for 3X3 matrices &gt;&gt; E=[2 8 5 4 2 1 6 8 4] E = 2 8 5 4 2 1 6 8 4 &gt;&gt; i=B+E i = 3 9 8 6 6 3 7 11 7 &gt;&gt; t=A*i t = 31 47 32 30 48 32 9 9 2 &gt;&gt; u=(A*B)+(A*E) u = 31 47 32 30 48 32 9 9 2 &gt;&gt; % since t=u we have proved part (iv) &gt;&gt; diary off...
View Full Document

Assignment 1 Problem 4 - &amp;amp;gt;&amp;amp;gt;...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online