Alternatively, we can throw out vectors in the set which are linear
combinations of other vectors in the set (we know that we will have to do
this anyway; a basis of a subspace of R4 cannot contain more than four
vectors).
Notice that
(2,2,2,2) = 2*(2,3,4,5) - 2*(1,2,3,4)
(4,5,6,7) = 3*(2,3,4,5) - 2*(1,2,3,4)
(5,4,3,2) = 6*(2,3,4,5) - 7*(1,2,3,4)
So we can throw out (2,2,2,2), (4,5,6,7) and (5,4,3,2). The vectors
(2,3,4,5) and (1,2,3,4) we know to be linearly independent because they
are non-proportional. So, again, {(2,3,4,5),(1,2,3,4)} is a basis of our
subspace.
=============================================================================
4. Find the rank of the matrix
[ t |
1 |
1 |
1 |
1 ] |
[ t |
1 |
1 |
1 |
t ] |
[ 1 |
t |
t |
t |
1 ] |
[ t |
1 |
1 |
t |
t ] |
depending on t.
If we can find a reduced-row echelon form of the matrix, then we know
from the WebNotes that the rank of the matrix is simply equal to the
number of leading 1's. We must avoid gaussjord to eliminate division by t:
> A:=matrix([[t,1,1,1,1],[t,1,1,1,t],[1,t,t,t,1],[t,1,1,t,t]]);
A := |
[ t |
1 |
1 |
1 |
1 ] |
[ t |
1 |
1 |
1 |
t ] |
[ 1 |
t |
t |
t |
1 ] |
[ t |
1 |
1 |
t |
t ] |
> addrow(",1,2,-t):addrow(",1,3,-t):B:=addrow(",1,4,-t);
B := |
[ 1 |
t |
t |
t ] |
1 |
[ 0 |
-t2+1 |
-t2+1 |
-t2+1 ] |
0 |
[ 0 |
-t2+1 |
-t2+1 |
-t2+1 |
-t+1 ] |
[ 0 |
-t2+1 |
-t2+1 |
-t2+t |
0 ] |
> addrow(",2,3,-1):C:=addrow(",2,4,-1);
C := |
[ 1 |
t |
t |
t |
1 ] |
[ 0 |
-t2+1 |
-t2+1 |
-t2+1 |
0 ] |
[ 0 |
0 |
0 |
0 |
-t+1 ] |
[ 0 |
0 |
0 |
-1+t |
0 ] |
> D:=addrow(C,4,2,1+t):
> for i from 1 to 4 do for j from 1 to 5 do D[i,j]:=simplify(D[i,j]) od od:
> print(D);
[ 1 |
t |
t |
t |
1 ] |
[ 0 |
-t2+1 |
-t2+1 |
0 |
0 ] |
[ 0 |
0 |
0 |
0 |
-t+1 ] |
[ 0 |
0 |
0 |
-1+t |
0 ] |
At this point, take t not equal to 1 or -1, so that we may divide by 1-t,
t-1, and 1-t2:
> mulrow(D,2,1/(-t2+1)):mulrow(",3,1/(-t+1)):F:=mulrow(",4,1/(-1+t));
F := | 1 |
[ 1 |
t |
t |
t |
1 ] |
[ 0 |
1 |
1 |
0 |
0 ] |
[ 0 |
0 |
0 |
0 |
1 ] |
[ 0 |
0 |
0 |
1 |
0 ] |
> addrow(",2,1,-t):addrow(",3,1,-1):addrow(",4,1,-t);
[ 1 |
0 |
0 |
0 |
0 ] |
[ 0 |
1 |
1 |
0 |
0 ] |
[ 0 |
0 |
0 |
0 |
1 ] |
[ 0 |
0 |
0 |
1 |
0 ] |
So, if t is not equal to 1 or -1, the reduced-row echelon form of the
matrix has four columns containing leading 1's, and thus has rank four.
If t is equal to 1, we return to matrix D:
> t:=1:
> for i from 1 to 4 do for j from 1 to 5 do D[i,j]:=simplify(D[i,j]) od od:
> print(D);
[ 1 |
1 |
1 |
1 |
1 ] |
[ 0 |
0 |
0 |
0 |
0 ] |
[ 0 |
0 |
0 |
0 |
0 ] |
[ 0 |
0 |
0 |
0 |
0 ] |
In this case, there is only one leading 1, so the rank of the matrix is 1.
If t is equal to -1, we again use matrix D (reset to its dependence on t):
> t:=-1:
> for i from 1 to 4 do for j from 1 to 5 do D[i,j]:=simplify(D[i,j]) od od:
> gaussjord(D);
[ 1 |
-1 |
-1 |
0 |
0 ] |
[ 0 |
0 |
0 |
1 |
0 ] |
[ 0 |
0 |
0 |
0 |
1 ] |
[ 0 |
0 |
0 |
0 |
0 ] |
So, if t = -1, there are three leading 1's, and the rank of the matrix is
three.