matrice9n

(* quadrato,cubo, di matrice *)

(* con MatrixPower o come prodotto DOT *)

matrice1={{3,1},{4,2}};

MatrixForm[matrice1];

potenza=MatrixPower[matrice1,2];

MatrixForm[potenza]

MatrixForm[MatrixPower[matrice1,3]]

MatrixForm[matrice1.matrice1]

MatrixForm[{{13, 5}, {20, 8}}]

;[o]

13 5

20 8

MatrixForm[{{59, 23}, {92, 36}}]

;[o]

59 23

92 36

MatrixForm[{{13, 5}, {20, 8}}]

;[o]

13 5

20 8

Dimensions[matrice1]

{2, 2}

;[o]

{2, 2}

(* stampa 2 riga,singolo elemento 2,3 *)

matrice2={{4,5,6},{9,8,7}};

MatrixForm[matrice2]

matrice2[[2]]

matrice2[[2,3]]

MatrixForm[{{4, 5, 6}, {9, 8, 7}}]

;[o]

4 5 6

9 8 7

{9, 8, 7}

;[o]

{9, 8, 7}

7

;[o]

7

(* assegna contenuto a matrice *)

a11=.;a12=.;a21=.;a22=.;

matrice3={{a11,a12},{a21,a22}};

a11=5;a12=10;a21=20;a22=40;

MatrixForm[matrice3]

MatrixForm[{{5, 10}, {20, 40}}]

;[o]

5 10

20 40

(* cancella valori da matrice =. *)

MatrixForm[matrice3]

matrice3=.

matrice3

MatrixForm[{{5, 10}, {20, 40}}]

;[o]

5 10

20 40

matrice3

;[o]

matrice3

ritorna a inizio