Definizioni delle operazioni tra matrici e proprietà elementari
Definizione 1: Somma di matrici. Date due matrici[math]A[/math]
e [math]B[/math]
entrambe di tipo [math](m,n)[/math]
, si chiama somma di [math]A[/math]
e [math]B[/math]
e si indica col simbolo [math]A + B[/math]
quella matrice di tipo [math](m,n)[/math]
i cui elementi sono la somma degli elementi omologhi di [math]A[/math]
e [math]B[/math]
. \[ \begin{aligned} &\begin{array}{cc} A = \begin{pmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{pmatrix} & B = \begin{pmatrix} b_{11} & b_{12} & \cdots & b_{1n} \\ b_{21} & b_{22} & \cdots & b_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ b_{m1} & b_{m2} & \cdots & b_{mn} \end{pmatrix} \end{array} \\ &\begin{array}{c} A + B = \begin{pmatrix} a_{11} + b_{11} & a_{12} + b_{12} & \cdots & a_{1n} + b_{1n} \\ a_{21} + b_{21} & a_{22} + b_{22} & \cdots & a_{2n} + b_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} + b_{m1} & a_{m2} + b_{m2} & \cdots & a_{mn} + b_{mn} \end{pmatrix} \end{array} \end{aligned} \] Osservazione 1: La differenza di due matrici dello stesso tipo [math]A[/math]
e [math]B[/math]
si definisce, usando la definizione 1, come la somma di [math]A[/math]
con [math]-B[/math]
, cioè con la matrice opposta di [math]B[/math]
. Osservazione 2: La somma di una matrice e della sua opposta dà come risultato la matrice nulla, indipendentemente dal numero di righe e colonne degli addendi. Definizione 2: Prodotto di una matrice per uno scalare. Dati un numero reale [math]r[/math]
e una matrice [math]A[/math]
, si chiama prodotto di [math]A[/math]
per lo scalare [math]r[/math]
e si indica con [math]rA[/math]
quella matrice, dello stesso tipo di [math]A[/math]
, i cui elementi sono i prodotti per [math]r[/math]
degli elementi omologhi di [math]A[/math]
. \[ rA = \begin{pmatrix} ra_{11} & ra_{12} & \cdots & ra_{1n} \\ ra_{21} & ra_{22} & \cdots & ra_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ ra_{m1} & ra_{m2} & \cdots & ra_{mn} \end{pmatrix} \] Osservazione 3: Il prodotto di una qualsiasi matrice [math]A[/math]
per [math]r = -1[/math]
dà come risultato [math]-A[/math]
, la matrice opposta di [math]A[/math]
; il prodotto di [math]A[/math]
con [math]r = 0[/math]
dà la matrice nulla. Definizione 3: Prodotto scalare di un vettore riga per un vettore colonna. Dati un vettore riga [math]u[/math]
ed un vettore colonna [math]v[/math]
con lo stesso numero di elementi, si chiama prodotto scalare di [math]u[/math]
per [math]v[/math]
e si indica con il numero reale [math]u \cdot v[/math]
che si ottiene sommando gli [math]n[/math]
prodotti i cui fattori sono gli elementi omologhi di [math]u[/math]
e [math]v[/math]
. \[ \begin{array}{cc} u = \begin{pmatrix} u_{11} & u_{12} & \cdots & u_{1n} \end{pmatrix}, & v = \begin{pmatrix} v_{11} \\ v_{21} \\ \vdots \\ v_{n1} \end{pmatrix} \end{array} \] \[ u \cdot v = u_{11}v_{11} + u_{12}v_{21} + \cdots + u_{1n}v_{n1} \Leftrightarrow u \cdot v = \sum_{j=1}^{n} u_{1j} v_{j1} \] Osservazione 4: Dati due vettori [math]u[/math]
e [math]v[/math]
con lo stesso numero di elementi, si può comunque definire il loro prodotto scalare assumendo, come di solito si fa, che il primo sia scritto come vettore riga e il secondo come vettore colonna. Il risultato dell’operazione, [math]u \cdot v[/math]
, si legge pure “[math]u[/math]
scalato con [math]v[/math]
”. Definizione 4: Prodotto righe per colonne. Date una matrice [math]A[/math]
di tipo [math](m,t)[/math]
e una matrice [math]B[/math]
di tipo [math](t,n)[/math]
, si chiama prodotto righe per colonne di [math]A[/math]
per [math]B[/math]
o prodotto matriciale di [math]A[/math]
per [math]B[/math]
e si indica con [math]A \cdot B[/math]
quella matrice [math]R[/math]
di tipo [math](m,n)[/math]
il cui elemento generico [math]r_{ik}[/math]
è il prodotto scalare dell’[math]i[/math]
-esima riga di [math]A[/math]
con la [math]k[/math]
-esima colonna di [math]B[/math]
. \[ \begin{aligned} &\begin{array}{cc} A = \begin{pmatrix} a_{11} & a_{12} & \cdots & a_{1t} \\ a_{21} & a_{22} & \cdots & a_{2t} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mt} \end{pmatrix}, & B = \begin{pmatrix} b_{11} & b_{12} & \cdots & b_{1n} \\ b_{21} & b_{22} & \cdots & b_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ b_{t1} & b_{t2} & \cdots & b_{tn} \end{pmatrix} \end{array} \\ &\begin{array}{cc} A \cdot B = R = \begin{pmatrix} r_{11} & r_{12} & \cdots & r_{1n} \\ r_{21} & r_{22} & \cdots & r_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ r_{m1} & r_{m2} & \cdots & r_{mn} \end{pmatrix}, & \text{con} \; r_{ik} = \sum_{j=1}^{t} a_{ij} b_{jk} \end{array} \end{aligned} \] Osservazione 5: La definizione 4 è ben posta, perché infatti comunque si scelgano [math]i[/math]
e [math]k[/math]
, l’[math]i[/math]
-esima riga di [math]A[/math]
e la [math]k[/math]
-esima colonna di [math]B[/math]
sono vettori di lunghezza [math]t[/math]
, e quindi si può effettuare il loro prodotto scalare secondo la definizione 3. Osservazione 6: Quando si effettua il prodotto scalare di [math]A[/math]
e [math]B[/math]
, gli elementi del vettore riga [math]a[/math]
variano “orizzontalmente”, cioè con il secondo indice, mentre quelli del vettore colonna variano “verticalmente”, ovvero col primo indice. Ne risulta che nel calcolo di [math]r_{ik}[/math]
gli indici [math]i[/math]
e [math]k[/math]
, indicati in rosso, restano fissi, mentre l’indice [math]j[/math]
, colorato in verde, varia tra [math]1[/math]
e [math]t[/math]
. Osservazione 7: La definizione 4 estende la definizione 3, nel senso che se le matrici [math]A[/math]
e [math]B[/math]
sono rispettivamente un vettore riga e un vettore colonna il loro prodotto scalare coincide con il loro prodotto righe per colonne. Quest’ultimo si può effettuare in quanto [math]A[/math]
è del tipo [math](1,t)[/math]
e [math]B[/math]
è del tipo [math](t,1)[/math]
; il risultato è una matrice [math](1,1)[/math]
, cioè contenente un solo elemento, e in questo caso si assume che tali due oggetti, in principio diversi, coincidano.