# Exercise 2.1 # # 22. det(b)=-2*det(A) = -2*3 = -6. # # 23. det(b) = det(A) = 3. # # 24. det(b) = 3* det(A) = 3*3 = 9. # # 25. det(b) = 2*(-1)*(-5)*det(A) = 2*(-1)*(-5)*3 = 30. # # Exercise 2.2 Problem 22. # # > with(linalg); Warning: new definition for norm Warning: new definition for trace [BlockDiagonal, GramSchmidt, JordanBlock, Wronskian, add, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, col, coldim, colspace, colspan, companion, concat, cond, copyinto, crossprod, curl, definite, delcols, delrows, det, diag, diverge, dotprod, eigenvals, eigenvects, entermatrix, equal, exponential, extend, ffgausselim, fibonacci, frobenius, gausselim, gaussjord, genmatrix, grad, hadamard, hermite, hessian, hilbert, htranspose, ihermite, indexfunc, innerprod, intbasis, inverse, ismith, iszero, jacobian, jordan, kernel, laplacian, leastsqrs, linsolve, matrix, minor, minpoly, mulcol, mulrow, multiply, norm, normalize, nullspace, orthog, permanent, pivot, potential, randmatrix, randvector, rank, ratform, row, rowdim, rowspace, rowspan, rref, scalarmul, singularvals, smith, stack, submatrix, subvector, sumbasis, swapcol, swaprow, sylvester, toeplitz, trace, transpose, vandermonde, vecpotent, vectdim, vector] > A := matrix(3,3,[4,1,3,0,-2,0,3,1,5]); [ 4 1 3 ] [ ] A := [ 0 -2 0 ] [ ] [ 3 1 5 ] -------------------------------------------------------------------------------- > B := matrix(3,3,[1,0,0,0,3,0,0,0,1]);\ [ 1 0 0 ] [ ] B := [ 0 3 0 ] [ ] [ 0 0 1 ] -------------------------------------------------------------------------------- > det(A); -22 -------------------------------------------------------------------------------- > det(B); 3 -------------------------------------------------------------------------------- > det(A &* B); -66 -------------------------------------------------------------------------------- > det(A) * det(B); -66 -------------------------------------------------------------------------------- # from the result we can see that det(A) * det(B) = det(A*B). # # Exercise 2.4. Problem 14, 26, 34. # > A := matrix(4,4,[0,2,1,0,-1,0,0,6,0,3,2,0,0,0,0,4]); [ 0 2 1 0 ] [ ] [ -1 0 0 6 ] A := [ ] [ 0 3 2 0 ] [ ] [ 0 0 0 4 ] -------------------------------------------------------------------------------- > B := matrix(3,3,[2,1,0,3,2,0,0,0,4]); [ 2 1 0 ] [ ] B := [ 3 2 0 ] [ ] [ 0 0 4 ] -------------------------------------------------------------------------------- > C := matrix(2,2,[2,1,3,2]); [ 2 1 ] C := [ ] [ 3 2 ] -------------------------------------------------------------------------------- # determinent(A) = (+1)*det(B) = (1)*4*det(C) = (1)*4**(2*2-1*3) = 4. # > det(A); 4 -------------------------------------------------------------------------------- # Problem 26. # > A := matrix(3,3,[3,1,2,2,-2,4,5,1,-3]); [ 3 1 2 ] [ ] A := [ 2 -2 4 ] [ ] [ 5 1 -3 ] -------------------------------------------------------------------------------- > coA := matrix(3,3,[2,26,12,5,-19,2,8,-8,-8]); [ 2 26 12 ] [ ] coA := [ 5 -19 2 ] [ ] [ 8 -8 -8 ] -------------------------------------------------------------------------------- > adjA := transpose(coA); [ 2 5 8 ] [ ] adjA := [ 26 -19 -8 ] [ ] [ 12 2 -8 ] -------------------------------------------------------------------------------- > 1/det(A); 1/56 -------------------------------------------------------------------------------- > inA := evalm("*adjA); [ 1/28 5/56 1/7 ] [ ] [ 13 19 ] inA := [ ---- - ---- -1/7 ] [ 28 56 ] [ ] [ 3/14 1/28 -1/7 ] -------------------------------------------------------------------------------- > evalm(A &* inA); [ 1 0 0 ] [ ] [ 0 1 0 ] [ ] [ 0 0 1 ] -------------------------------------------------------------------------------- # Problem 34. # > A := matrix(3,3,[2,-3,-1,1,1,0,0,-1,1]); [ 2 -3 -1 ] [ ] A := [ 1 1 0 ] [ ] [ 0 -1 1 ] -------------------------------------------------------------------------------- > det(A); 6 -------------------------------------------------------------------------------- > X := matrix(3,3,[2,-3,-1,-3,1,0,-2,-1,1]); [ 2 -3 -1 ] [ ] X := [ -3 1 0 ] [ ] [ -2 -1 1 ] -------------------------------------------------------------------------------- > x := det(X)/det(A); x := -2 -------------------------------------------------------------------------------- > Y := matrix(3,3,[2,2,-1,1,-3,0,0,-2,1]); [ 2 2 -1 ] [ ] Y := [ 1 -3 0 ] [ ] [ 0 -2 1 ] -------------------------------------------------------------------------------- > y := det(Y)/det(A); y := -1 -------------------------------------------------------------------------------- > Z := matrix(3,3,[2,-3,2,1,1,-3,0,-1,-2]);\ [ 2 -3 2 ] [ ] Z := [ 1 1 -3 ] [ ] [ 0 -1 -2 ] -------------------------------------------------------------------------------- > z := det(Z)/det(A); z := -3 -------------------------------------------------------------------------------- > linsolve(A,vector([2,-3,-2])); [ -2, -1, -3 ] -------------------------------------------------------------------------------- >