



Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!




In Practice 1 we learned how to do vector and matrix calculations with Maple. In this practice we will use those tools to make change of basis in a vector space or in an endomorphism. We also will introduce new vector calculations in an Euclidian space, as scalar product, norm and vector product.
with(LinearAlgebra): 1 Change of basis in a vector space Let's have a vector v expressed in the natural basis, and a new basis {u1, u2, u3}
v:=<1,4,7>; u1:=<2,3,1>; u2:=<4,1,5>; u3:=<2,1,6>;
v :=
u1 :=
u2 :=
u3 :=
We can build the matrix C that have u1, u2, u3 as a columns and calculate its determinant so we are sure that the vectors are l.i. and form basis
C:=<u1|u2|u3>; Determinant(C);
If w is the vector that have the coordinates of v in the basis {u1, u2, u3}, we know that v = Cw, so w = CK^1 v
CI:=MatrixInverse(C); w:=CI.v;
w :=
Effectively, if we calculate w[1]u1+w[2]u2+w[3]*u3, we have to obtain v
w[1]u1+w[2]u2+w[3]*u3; 1 4 7
2 Change of basis in an endomorphism Now let's consider an endomorphism f that have the matrix A in the natural basis
A:=Matrix([[1,-3,3],[3,-5,3],[6,-6,4]]);
The matrix of f in the basis {u1, u2, u3} is B = CK^1 A C
B:=CI.A.C;
Now let's consider an other endomorphism g so that g(u1) = 3u1+5u2+u3, g(u2) = 2u1+u2+5u3, g(u3) = 9u1+3u2+4u3. The matrix of g in the basis {u1, u2, u3} is
BG:=<<3,5,1>|<2,1,5>|<9,3,4>>;
The relationship between BG and the matrix AG of g in the natural basis is BG = CK^1 AG C so AG = C BG CK^1
In this case we have gotten only two independent eigenvectors, so there is no diagonal form of this endomorphism 4 Vector calculations in an Euclidian space. Let's introduce a couple of vectors
u:=<1,5,8>;v:=<2,9,3>;
u :=
v :=
We can make the scalar product in several ways
a:=DotProduct(u,v); a:=u.v; a := 71 a := 71
and the vector product
w:=CrossProduct(u,v); w:=u &x v;
w :=
w :=
and the norm of a vector
n:=Norm(v,2); n:=sqrt(v.v); n := 94 n := 94
Now is your turn 1 Change of basis in a vector space Let's have a vector v = (2,1,3) expressed in the natural basis, and a new basis {u1 = (1,0,2), u2 = (1,1,3), u3 = (0,1,5)} Express v in the basis {u1, u2, u3}
v:=<2,1,3>:u1:=<1,0,2>:u2:=<1,1,3>:u3:=<0,1,5>: C:=<u1|u2|u3>; CI:=MatrixInverse(C); w:=CI.v; w[1]u1+w[2]u2+w[3]*u3;
w :=
2 Change of basis in an endomorphism Now let's consider an endomorphism f that have the matrix A in the natural basis
Express f in the basis {u1, u2, u3}
A:=Matrix([[4,6,0],[-3,-5,0],[-3,-6,-5]]); B:=CI.A.C;
3 Diagonalization Get the eigenvalues and eigenvectors of f and get the matrix of f in the basis of eigenvectors if it is possible
vap,VEP:=Eigenvectors(A);