Pøíklad: Rozhodnìte, zda je daná množina vektorù systémem generátorù, nebo

pøímo bází, vektorového prostoru R3.

a) (1, 2, 3), (1, 2, 1), (-1, 1, 0), (2,-1, 0),

u1:[1,2,3]; u2:[1,2,1]; u3:[-1,1,0]; u4:[2,-1,0]; w:[w1,w2,w3];

A:transpose(matrix(u1,u2,u3,u4,w));

triangularize(A);

solve(x1*u1+x2*u2+x3*u3+x4*u4-w,[x1,x2,x3,x4]);

load(draw);

draw3d(line_width  = 4,
        color = green,vector([0,0,0],u1),
        color = red,vector([0,0,0],u2),
        color = blue,vector([0,0,0],u3),
        color = pink,vector([0,0,0],u4));

b)(1, 2, 3), (1, 2, 1), (0, 0, 2), (1, 2,-1). 

v1:[1,2,3]; v2:[1,2,1]; v3:[0,0,2]; v4:[1,2,-1]; w:[w1,w2,w3];

A:transpose(matrix(v1,v2,v3,v4,w));

triangularize(A);

solve(x1*v1+x2*v2+x3*v3+x4*v4-w,[x1,x2,x3,x4]);

draw3d(line_width  = 4,
        color = green,vector([0,0,0],v1),
        color = red,vector([0,0,0],v2),
        color = blue,vector([0,0,0],v3),
        color = pink,vector([0,0,0],v4));