>a1:=array(1..3,[1,2,3]); a2:=array(1..3,[3,2,1]);
a3:=array(1..3,[1,-2,-3]);
Basis([a1,a2,..an]) komandasi yordamida berilgan vektorlarning bazisini tuzib olish mumkin.
> g:=basis([a1,a2,a3]);
Agar y[i] (i vector koordinatasining tartibi) buyrug’i terilsa, berilgan vektorning i-koordinatasini ko`rsatadi. Masalan, bizda olingan y vektorning 1- koordinatasi uchun y[1] funksiyasini tasvirlaymiz va natija olamiz:
> y[1];
1
Vektorning umumiy ko`rinishi Mapleda quyidagi ko`rinishda bo`ladi:
> x:=vector([4,11,1,5]);
vektorning ixtiyoriy elementini ko`rsatish uchun uning turgan o`rni tartib nomerini ko`rsatish yetarli.
> x[2];
> convert(x,list);
> convert(list,x);
Error, unrecognized conversion
> with(linalg);
> a:=([1,2]);b:=([2,3]);
Ikkita a va b vektorlar berilgan bo`lsa, ular ustida qo`shish amali quyidagi buyruq orqali amalga oshiriladi.
> evalm(a+b);
matadd (a,b) buyrug'i orqali ham vektorlarni qo`shish mumkin:
> matadd(a,b);
add buyrug'i a va b vektorlarning chiziqli kombinatsiyasini hisoblashda ham qo`llaniladi:
> matadd(a,b,alpha,beta);
> dotprod(a,b);buyrug'i yordamida a va b vektorlarning skalyar ko`paytmasini hisoblash mumkin:
> dotprod(a,b);
Ikki vektorning vektor ko`paytmasi ([a,b] -vektor ko`paytma) crossprod(a,b) orqali hisoblanadi.
> a:=vector([1,1,1]);b:=([2,2,2]);crossprod(a,b);
norm(a,2) buyrug'i orqali vektorning uzunligi () hisoblanadi.
> norm(a,2);
> norm(b,2);
Berilgan vektorning normalini () topish uchun normalize(a) buyrug'ini berish kerak.
> normalize(a);
> basis([2,3,4,5]);
Error, (in basis) expecting set or list of vectors
a va b vektorlar orasidagi burchak angle(a,b) buyrug'i orqali amalga oshiriladi.
> angle(a,b);
> phi=angle(a,b);
GramSchmidt([a1,a2,a3...an]) buyrug'i yordamida chiziqli bog'liqmas vektorlar sistemasini ortogonallash mumkin.restart;with(linalg):
Warning, the protected names norm and trace have been redefined and unprotected
> a1:=vector([1,2,2,-1]):
> a2:=vector([1,1,-5,3]):
> a3:=vector([3,2,8,7]):
> a4:=vector([0,1,7,-4]):
> a5:=vector([2,1,12,-10]):
> g:=basis([a1,a2,a3,a4,a5]);
>
> GramSchmidt(g);
> GramSchmidt([a1,a2,a3,a4,a5], normalized);
>
> basis( {vector([1,1,1]), vector([2,2,2]), vector([1,-1,1]),
|