Académique Documents
Professionnel Documents
Culture Documents
PA0 22 23 Soluciones
PA0 22 23 Soluciones
Curso 2022-2023
PA0: Ejercicio 1
(% i5) T: matrix(
[290,190,310,280,310],
[300,200,305,270,320],
[250,170,300,210,250]
);
290 190 310 280 310
(T) 300 200 305 270 320
250 170 300 210 250
(% i6) S: matrix(
[0.5,0.6,0.4],
[1.1,1,0.9]
);
0.5 0.6 0.4
(S)
1.1 1 0.9
1
(% i7) S.T;
425.0 283.0 458.0 386.0 447.0
(% o7)
844.0 562.0 916.0 767.0 886.0
2
PA0: Ejercicio 2
(% i1) A: matrix(
[1,0,3]
);
(A) 1 0 3
(% i2) B: matrix(
[5],
[6],
[-1]
);
5
(B) 6
−1
(% i3) C: matrix(
[1,2],
[4,0]
);
1 2
(C)
4 0
(% i4) D: matrix(
[-1,-2],
[4,0]
);
−1 −2
(D)
4 0
3
(% i5) A+B;
fullmap: arguments must have same formal structure.–
an error. To debug this try: debugmode(true);
(% i6) A+transpose(B);
(% o6) 6 6 2
(% i7) A+D;
fullmap: arguments must have same formal structure.–
an error. To debug this try: debugmode(true);
(% i8) transpose(A)+B;
6
(% o8) 6
2
(% i9) C+D;
0 0
(% o9)
8 0
(% i10) transpose(C)+D;
0 2
(% o10)
6 0
(% i11) A.B;
(% o11) 2
4
(% i12) B.A;
5 0 15
(% o12) 6 0 18
−1 0 −3
−→ A.C;
MULTIPLYMATRICES: attempt to multiply noncon-
formable matrices. – an error. To debug this try: de-
bugmode(true);
(% i14) C.A;
MULTIPLYMATRICES: attempt to multiply noncon-
formable matrices. – an error. To debug this try: de-
bugmode(true);
(% i15) C.D;
7 −2
(% o15)
−4 −8
(% i16) D.C;
−9 −2
(% o16)
4 8
(% i17) (C.D).C;
−1 14
(% o17)
−36 −8
(% i19) C.(D.C);
−1 14
(% o19)
−36 −8
5
(% i20) transpose(B).B;
(% o20) 62
(% i21) B.transpose(B);
25 30 −5
(% o21) 30 36 −6
−5 −6 1
6
PA0: Ejercicio 4
−→
(% i22) M: matrix(
[1,1],
[0,2]
);
1 1
(M)
0 2
(% i23) Mˆˆ0;
1 0
(% o23)
0 1
(% i24) Mˆˆ1;
1 1
(% o24)
0 2
(% i25) Mˆˆ2;
1 3
(% o25)
0 4
(% i27) Mˆˆ3;
1 7
(% o27)
0 8
(% i28) Mˆˆ4;
1 15
(% o28)
0 16
7
PA0: Ejercicio 5
(% i29) E: matrix(
[2,1],
[9,5]
);
2 1
(E)
9 5
(% i30) F: matrix(
[1,0,2],
[-1,1,1]
);
1 0 2
(F)
−1 1 1
(% i31) G: matrix(
[0,1,-1],
[1,0,-1]
);
0 1 −1
(G)
1 0 −1
(% i32) invert(E).(G-F);
−7 6 −13
(% o32)
13 −11 23
(% i34) E.F.transpose(G).invert(E);
16 −4
(% o34)
81 −20