ALA K+Kf+Bt, part a, fall 2002

Program

1.   Consider the   3 x 3   matrix   A = [ 1 2 3; -2 -4 3; 3 1 0]   and the (column) vector   b = [ 7; 13; -6],   and solve   A x = b .  Check your solution by computing   A * x ,  to see that you get the result   b ,  and compare to matlabs   A \ b .  
2.   Compute the  determinant   det(A)   of   A ,  that is the  volume  spanned by the three column vectors of   A ,   (see section 21.11 of AMBS). Note that this number determines if the linear system of equations   A x = b   has a unique solution or not for all  b .  Is this the case for the   A   under consideration ?
3.   Solve using matlab   A x = b   with   b = e1 = [ 1; 0; 0]',   b = e2 = [ 0; 1; 0]'   and   b = e3 = [ 0; 0; 1]'  , respectively. Denote the solutions by   x1,   x2   and   x3 ,  and put the three solutions together to form the matrix   C = [ x1 x2 x3] ,  and verify that   A C = I = [ e1 e2 e3] .  Recall that the matrix   C   is called the  inverse  of   A ,  and is denoted   inv(A) ,  that is   C = inv(A)
4.   Now compute   inv(A) * b ,  with   b   as in   1 ,  and note that this gives the solution to   A x = b .  Is this a coincidence or not? Why / why not ?
5.   Consider now a  singular  matrix, for example   A = [ 2 1 -1; 1 3 0; 0 -5 -1] ,  where the second column is a linear combination of the first and third one (can you see how). Likewise the second row is a combination of the first and third. Now seek to solve   A x = b   with   b = [ 1; 2; 3]   using   \  . How do you interprete Matlabs answer? Is there an inverse matrix such that   inv(A) * A = I   ?
6.   The command   rank(A)   gives the number of independent columns in the matrix. How many independent columns is there in this matrix   A   ? Test your answer by compairing to matlabs answer.
7.   Now define a   4 x 4   - matrix   A   with entries   [ 2 -1 3 1; 4 1 0 -3; -2 1 2 5; 0 5 1 -2] ,  and a kolumn vector   b   with entries   [ 7; -5; 7; 6] ,  and solve the resulting linear system of equations   A x = b
8.   Check that   A \ b   gives the solution as expected.
9.   What is the determinant of the matrix   A   according to matlab ?
10.   What is the inverse of   A ?  Check that   inv(A) * b = x   as expected.
11.   Check that   inv(A) * A = I   and that   A * inv(A) = I   as expected.
12.   Study   >> help rref .  Verify that the last column of   rref([ A b])   is the solution of   A x = b .  Why is this the case ?
13.   Check out   >> help eye
14.   Verify that the second half of   rref([ A I])   is the inverse of   A  . Why is this ?

/Kenneth


Last modified: