MATLAB 4000 Linear Algebra?

MATLAB 4000 Linear Algebra?



1. Generate random 5X5 matrices with integer entries by setting

A = round(10*rand(5))

and B = round(20*rand*5))-10

Use MATLAB to compute each of the pairs of numbers that follow. In each case, check whether the first number is equal to the second.

(a) det(A) det(A^T)

(b) det(A + B) det(A) + det (B)

(c) det(AB) det(A)det(B)

(d) det(A^TB^T) det(A^T)det(B^T)

(e) det(A^-1) 1/det(A)

(f) det(AB^-1) det(A)/det(B)

2. Are n x n magic squares nonsingular? Use MATLAB command det(magic(n)) to compute the determinants of the magic squares matrices in the cases n = 3, 4.......10. What seems to be happening? Check the cases n = 24 and 25 to see if the pattern still holds.





No Answers Posted Yet.