Use MATLAB to determine whether the given set of vectors spans R4.
(a) {(1, -2, 3, 4), ( 2, 4, 5, 0), ( -2, 0, 0, 4 ), (3, 2, 1, -4)}
MATLAB Code:
close all
clear
clc
% Given vectors
v1 = [1 -2 3 4]';
v2 = [2 4 5 0]';
v3 = [-2 0 0 4]';
v4 = [3 2 1 -4]';
V = [v1 v2 v3 v4]; % Matrix whose columns are the given
vectors
disp('V (matrix whose columns are the given vectors) ='),
disp(V)
disp('Rank of V ='), disp(rank(V))
disp('Since, the rank = 4, the given vectors span R4.')
Output:
V (matrix whose columns are the given vectors) =
1 2 -2 3
-2 4 0 2
3 5 0 1
4 0 4 -4
Rank of V =
4
Since, the rank = 4, the given vectors span R4.
Get Answers For Free
Most questions answered within 1 hours.