% An example of linear dependence % % We start with the matrix % % 1 4 14 % a = 9 7 39 % 12 10 54 % % To input this matrix in Matlab, the statement is a=[1 4 14;9 7 39;12 10 54]; % % Next we use an internal function to reduce the matrix % r=rref(a); disp(r); % % Obviously the matrix only spans 2-space, or the last column is linearly % dependent on the first two columns % % In order to motivate later concepts % % To do row reductions, we construct a sequence of elementry matrices % who are designed to produce an identy matrix. For example, the first % matrix should be constructed to subtract 9 times row1 from row2 leaving % a zero in position (2,1) of the matrix. This matrix is t1 % t1=[1 0 0;-9 1 0;-12 0 1]; disp(t1); a1=t1*a; disp(a1); % % The result of the matrix multiplication is a first column where the first % element is 1 and the rest of the column is zero. Next, we want to reduce % the (2,2) to 1 and the remaining elements in this column to zero. The matrix % which does this is t2. % t2=[1 0 0;0 1 0;0 0 1];t2(1,2)=4/29;t2(2,2)=-1/29;t2(3,2)=-38/29; disp(t2); a2=t2*a1; % % The resulting matrix is the same row reduced form as given by the rref % statement. % disp(a2); % % Next we ask the question: What happens if the third column is linearly % independent. To do this we modify the original matrix by changing the % (3,3) element form 54 to 70 and again reducing the matrix % b=[1 4 14;9 7 39;12 10 70]; r=rref(b); disp(r); % % Because I only changed the (3,3) element, the elementry matrices remain % unchanged. % b1=t1*b; disp(b1); b2=t2*b1; disp(b2);