



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




(^) with(linalg):
a) The vectors are linearly independent, there are 3 of them, so they form a basis (Thm 3.4.3) b) The vectors are NOT linearly independent, although they span, so they are NOT a basis. c) Determinant vanishes, so they are linearly dependent, hence NOT a basis. d) Determinant vanishes, so they are linearly dependent, hence NOT a basis. e) Fewer than n=3 vectors, so NOT a basis.
(^) x1 := array(1..2,1..1,[[2],[1]]);
x1 :=
(^) x2 := array(1..2,1..1,[[4],[3]]);
x2 :=
(^) mat := array(1..2,1..2,[[2,4],[1,3]]);
mat :=
(^) det(mat); 2
{x1,x2,x3} MUST be linearly DEPENDENT since there are more than n=2 vectors
(^) mat := array(1..2,1..3,[[2,4,7],[1,3,-3]]);
mat :=
(^) gausselim(mat); [ 2 4 7 0 1
The dimension of span{x1,x2,x3} is 2 since x3 is a linear combination of {x1,x2}, which form a basis.
(^) x1 := array(1..3,1..1,[[2],[1],[3]]); (^) x2 := array(1..3,1..1,[[3],[-1],[4]]); (^) x3 := array(1..3,1..1,[[2],[6],[4]]);
x1 :=
x2 :=
x3 :=
(^) mat := augment(x1,x2,x3);
mat :=
(^) det(mat); 0
The determinant vanishes, so the three vectors ARE linearly DEPENDENT.
(^) mat := augment(x1,x2);
mat :=
(^) gausselim(mat);
{x1,x2} are linearly independent since echelon form has two nonzero rows. This would imply that if c1x1+c2x2=0, then c1=0=c
mat :=
(^) det(mat); − 4 (^) gausselim(mat);
(^) x1 := array(1..3,1..1,[[1],[2],[2]]): (^) x2 := array(1..3,1..1,[[2],[5],[4]]): (^) x3 := array(1..3,1..1,[[1],[3],[2]]): (^) x4 := array(1..3,1..1,[[2],[7],[4]]): (^) x5 := array(1..3,1..1,[[1],[1],[0]]): (^) mat := augment(x1,x2,x3,x4,x5);
mat :=
(^) gaussjord(mat);
Since there at most 3 linearly independent vectors, if we place x5 after x2 in a new matrix
(^) mat := augment(x1,x2,x5,x3,x4);
mat :=
(^) gaussjord(mat);
The first three columns are obviously linearly independent, hence form a basis. We pare down {x1,x2,x3,x4,x5} to {x1,x2,x5} to form a basis.
(^) f1 := x-> 1; (^) f2 := x->cos(2*x); (^) f3 := x->cos(x)ˆ2; f1 := 1
f2 := x → cos(2 x) f3 := x → cos(x)^2
(^) W := array(1..3,1..3, (^) [[f1(x),f2(x),f3(x)], (^) [diff(f1(x),x),diff(f2(x),x),diff(f3(x),x)], (^) [diff(f1(x),x$2),diff(f2(x),x$2),diff(f3(x),x$2)]]);
1 cos(2 x) cos(x)^2 0 −2 sin(2 x) −2 cos(x) sin(x) 0 −4 cos(2 x) 2 sin(x)^2 − 2 cos(x)^2
(^) det(W); −4 sin(2 x) sin(x)^2 + 4 sin(2 x) cos(x)^2 − 8 cos(x) sin(x) cos(2 x) (^) simplify(%,trig); 0 Since the Wronskiian is 0, the functions are linearly dependent! Note: you need to use trigonometric identities to simplify the Wronskiian.
(^) mat := array(1..3,1..3, (^) [[0,-1,1], (^) [1,1,0], (^) [0,0,1]]);
mat :=
(^) gausselim(mat);
Dimension is 3, since the vectors are linearly independent.
(^) mat := array(1..3,1..4,[[0,-1,1,-1],[1,1,0,0],[0,0,1,1]]);
mat :=
(^) gausselim(mat);
There are 3 linearly independent vectors, so the dimension is 3