3. Input the matrix 1-1-2 2-5 6 A= -1 1 2 -1 2 4 -2 2 4 2 4 8 Note: In the real
ID: 3145029 • Letter: 3
Question
3. Input the matrix 1-1-2 2-5 6 A= -1 1 2 -1 2 4 -2 2 4 2 4 8 Note: In the real test, this matriz would be provided in an m-file. You would not have to enter it manually. (a) What is the rank of A? (b) What is the dimension of the solution space of A? (c) Circle the vectors below that are in the column space of A. 137 V2 = 10 (d) Let u3 = Suppose that B is obtained from A by deleting the final row. Determine which of the vectors ui,... , u4 are in the solution space of B. (e) Let a, denote the vector corresponding to the jth column of A. Express ag as a linear combination of ai and a2. Also express a as a linear combination of al, ag and a.Explanation / Answer
%%% Matlab code %%%%
clc;
clear all;
close all;
format long
% % % % % restoredefaultpath %%%%%
%%% a)
a(1,:)=[-1 2 3 -3 6 7];
a(2,:)=[1 -1 -2 2 -5 -6];
a(3,:)=[-1 1 2 -1 2 4];
a(4,:)=[-2 2 4 -2 4 8];
r=rank(a);
fprintf('Rank of A = %d ', r);
%%% b)
[i,j]=size(a);
fprintf(' Dimension of Solution space of A = %d ',j);
%%%c)
rechlon=rref(a);
r1=rechlon.^2;
r2=sum(r1);
for n=1:6
if (r2(n)==1)
fprintf(' In Matrix A column %d is column space ', n);
end
end
fprintf(' seeing at vector v4 matches with column 4 . ');
fprintf(' v4 is a column space of A ');
%%% d)
u(:,1)=[4 -3 2 -1 -1 1]';
u(:,2)=[2 0 2 1 -3 -2]';
u(:,3)=[-2 0 3 1 -7 6]';
u(:,4)=[8 -2 1 0 -2 3]';
B=a(1:3,:);
for n=1:4
s=B*u(:,n);
if (norm(s) == 0)
fprintf(' Solution space of B is u%d ', n);
end
end
OUTPUT:
Rank of A = 3
Dimension of Solution space of A = 6
In Matrix A column 1 is column space
In Matrix A column 2 is column space
In Matrix A column 4 is column space
seeing at vector v4 matches with column 4 .
v4 is a column space of A
Solution space of B is u1
Solution space of B is u4
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.