1、Week 4,DeterminantInner Products,Given A = aij,Where Mij is the submatrix obtained by deleting row i and column j.,Why compute det(A)?,det(A) = 0 A is singular,Determinant,det(A) = ad - bc,For 3-by-3 matrix,det(A) = aei + dhc + gbf ceg fha ibd,Not true for general n-by-n matrix.,For 2-by-2 matrix,If
2、 n = 20, n! = 2 1018 operations. Assuming 109 operations/sec. 2 109 sec. = 100yr. So how det(A) is computed? Find it by Matlab!,Wn n Wn-1 n (n-1) Wn-2 n! W1 = n! 1 = n!,If work of computing det(An) = Wn, then,n=500; A=rand(n); % generate a n-by-n matrix tic; % set the clock to zero v=det(A); % compu
3、te the determinant toc % show the elapsed time,To determine the timing,n time ratio0.1090 -0.7350 6.74 2000 5.8440 7.95 4000 43.5000 7.44,Conclusion: det(An) = O(n3),Let V be a vector space. A function F: V VC is an inner product if,Inner Products,F(u, v) = ut v,In Matlab: ut v = u * v or dot (u, v)
4、,Example 2 : V = M2x3(R) = set of all 2-by-3 real matrices.,Is it an inner product?,Example 1 : V = Rn .,2.,1.,3.,4.,5.,But,Thus F(A, B) may not be an inner product. To show that it is not an inner product, we need to find A, B, C, M23 (R) , such that F(A + B, C) F(A, C) + F(B, C).,Can you find them by Matlab ?,In Matlab:,F(A, B) = max max (abs (A* B),Can you think of another inner product for M23 (R) ?,