Nel contesto dell'algebra lineare, il **prodotto tensoriale** è un'operazione tra [[Vettori|vettori]] che risulta particolarmente utile, ad esempio, quando si discute del tensore (o matrice) d'inerzia.
Il prodotto tensoriale è un'operazione tra vettori che, a differenza del [[Prodotto scalare]] e del [[Prodotto vettoriale]], restituisce una [[Matrici|matrice]].
Quando si esegue il prodotto tensoriale tra due vettori, si ottiene una matrice i cui elementi sono i prodotti di ciascun elemento del primo vettore con ciascun elemento del secondo vettore.
Per esempio, dati due vettori $\mathbf{u} = [u_1, u_2, u_3]$ e $\mathbf{v} = [v_1, v_2, v_3]$, il prodotto tensoriale $\mathbf{u} \otimes \mathbf{v}$ è una matrice $3 \times 3$:
$
\mathbf{u} \otimes \mathbf{v} = \begin{bmatrix}
u_1 v_1 & u_1 v_2 & u_1 v_3 \\
u_2 v_1 & u_2 v_2 & u_2 v_3 \\
u_3 v_1 & u_3 v_2 & u_3 v_3
\end{bmatrix}
$
**Prodotto Tensoriale**
Il prodotto tensoriale tra due vettori $a$ e $b$, indicato con $a \otimes b$, è la matrice tale che:
$(a\otimes b)v=a(b\cdot v), \quad \forall v $
Questa operazione eredita le proprietà di linearità dal prodotto scalare.
##### Proprietà
Dati i vettori $a$, $b$, $c$ e un numero reale $t$, si ha:
- $(a + b) \otimes c = a \otimes c + b \otimes c$
- $a \otimes (b+c)= a\otimes b + a\otimes c$
- $(ta) \otimes b = t(a \otimes b)$
**Osservazione 7.6**: Il prodotto tensoriale non è commutativo, ovvero $a \otimes b \neq b \otimes a$.
#### Calcolo degli elementi della matrice
Dati due vettori $a$ e $b$, e una base ortonormale $(e_1, e_2, e_3)$, possiamo calcolare gli elementi della matrice $a \otimes b$.
Se scriviamo i vettori in componenti, $a = \sum_{i=1}^{3} a_i e_i$ e $b = \sum_{i=1}^{3} b_i e_i$, l'elemento $(i, j)$ della matrice $a \otimes b$ è dato dal prodotto dell'elemento $i$ del vettore $a$ con l'elemento $j$ del vettore $b$.
$(a\otimes b)_{ij}= e_i \cdot (a\otimes b)e_j=e_i\cdot (b\cdot e_j)a=b_je_i\cdot a=a_ib_j$
In particolare, la matrice associata al tensore $e_i \otimes e_j$ ha tutti 0, tranne un 1 nell'i-esima riga e j-esima colonna.
##### Esempio (versori)
I prodotti tensoriali dei vettori base ($\hat i,\hat j,\hat k)$ costituiscono una base per lo spazio vettoriale delle matrici.
| $\hat{i} \otimes \hat{i} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}$ | $\hat{i} \otimes \hat{j} = \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}$ | $\hat{i} \otimes \hat{k} = \begin{bmatrix} 0 & 0 & 1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}$ |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| $\hat{j} \otimes \hat{i} = \begin{bmatrix} 0 & 0 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}$ | $\hat{j} \otimes \hat{j} = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{bmatrix}$ | $\hat{j} \otimes \hat{k} = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{bmatrix}$ |
| $\hat{k} \otimes \hat{i} = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 1 & 0 & 0 \end{bmatrix}$ | $\hat{k} \otimes \hat{j} = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 1 & 0 \end{bmatrix}$ | $\hat{k} \otimes \hat{k} = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix}$ |
Ogni matrice $A$ può essere scomposta nella somma delle sue componenti $a_{ij}$ moltiplicate per la "matrice base" $e_i \otimes e_j$.
Infatti, basta scrivere:
$A=\sum_{i,j=1}^3 a_{ij}e_i \otimes e_j$
##### Esempio
La matrice
$A=\begin{pmatrix} 0&7&-1 \\ 0 & 4&0 \\ 0&0&0 \end {pmatrix} $
può essere scritta evidenziando esplicitamente la base nel seguente modo:
$A= 7(e_1 \otimes e_2) -(e_1 \otimes e_3) +4(e_2 \otimes e_3)$
#### Proiettore
Introduciamo un versore u lungo la retta, che rispetti l'orientazione della retta.
![[Pasted image 20250303140246.png|400]]
Il vettore proiettato è dato da $(v \cdot u)u$, che ora possiamo riscrivere, tramite il prodotto tensoriale, come $(u \otimes u)v$.
Otteniamo quindi che il proiettore $\Pi_r$ è dato da:
$\Pi_r=u\otimes u$
con u = versore.
A questo punto è facile ottenere la proiezione sul piano ortogonale, sarà data infatti semplicemente dalla differenza tra il vettore v e la sua proiezione lungo r.
In formule:
$\Pi_r^\bot v=v-(u\otimes u)v=(I-u\otimes u)v$
ovvero, la trasformazione lineare che proietta sul piano ortogonale a r è data da:
$\color {green} \Pi_r^\bot=I-u\otimes u$