load(draw);

Pøíklad: Ovìøte, zda vektor u = (4,-1, 3) je lineární kombinací vektorù 
v1 = (1, 0, 2), v2 = (-2, 1, 1).

u:[4,-1,3]; v1:[1,0,2]; v2:[-2,1,1];

A:transpose(matrix(v1,v2,u));

triangularize(A);

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

X:s*v1+t*v2;

draw3d(line_width  = 4,
    color = green,vector([0,0,0],u),
    color = red,vector([0,0,0],v1),
    color = blue,vector([0,0,0],v2),
    line_width  = 1,color=grey,
    parametric_surface(X[1],X[2],X[3],s,-1/2,5/2,t,-3/2,3/2));

Pøíklad: Ovìøte, zda vektor u = (-1, 1, 0) je lineární kombinací vektorù 
v1 = (1, 0, 2), v2 = (-2, 1, 1).

u:[-1,1,0]; v1:[1,0,2]; v2:[-2,1,1];

A:transpose(matrix(v1,v2,u));

triangularize(A);

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

X:s*v1+t*v2;

draw3d(line_width  = 4,
    color = green,vector([0,0,0],u),
    color = red,vector([0,0,0],v1),
    color = blue,vector([0,0,0],v2),
    line_width  = 1,color=grey,
    parametric_surface(X[1],X[2],X[3],s,-1/2,5/2,t,-3/2,3/2));

Pøíklad: Množina M = {(1, 1, 1), (0, 1, 1), (0, 0, 1), (1, 2, 3)} je tvoøena 
ètyømi vektory z vektorového prostoru R3. Rozhodnìte, zda je nìkterý z tìchto 
vektorù lineární kombinací ostatních.

u1:[1,1,1]; u2:[0,1,1]; u3:[0,0,1]; u4:[1,2,3];

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

triangularize(A);

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));