The moment of inertia matrix is symmetric ($I_{ij}=I_{ji}$) and it can be used to relate the angular momentum and rotational kinetic energy to the angular velocity vector

$$ \begin{aligned} \begin{pmatrix} L_1 \\ L_2 \\ L_3 \end{pmatrix}&=L_i=I_{ij}\omega_{j}=\begin{bmatrix} I_{11} & I_{12} & I_{13} \\ I_{21} & I_{22} & I_{23} \\ I_{31} & I_{32} & I_{33} \end{bmatrix} \begin{pmatrix} \omega_1 \\ \omega_2 \\ \omega_3 \end{pmatrix} \\ T&=\frac 12 \omega_i I_{ij} \omega_j = \frac 12 \begin{pmatrix} \omega_1 & \omega_2 & \omega_3 \end{pmatrix}\begin{bmatrix} I_{11} & I_{12} & I_{13} \\ I_{21} & I_{22} & I_{23} \\ I_{31} & I_{32} & I_{33} \end{bmatrix} \begin{pmatrix} \omega_1 \\ \omega_2 \\ \omega_3 \end{pmatrix} \end{aligned} $$

Diagonal theorem

Any real symmetric, square matrix, $A$, is diagonalizable, which means there exist a matrix $P$ such that

$$ P^{-1}AP=D=\text{diag}(d^{(1)},\cdots,d^{(n)}) $$

where $n$ is the rank of the matrix.

$$ A\vec E^{(k)}=\lambda^{(k)} \vec E^{(k)} $$

with $\lambda^{(k)}$ being the eigenvalues which are calculated by solving $\det(A-\lambda \mathcal X_n)$ for $\lambda$ where $\mathcal X_n$ is the identity matrix with rank $n$.

$$ P=(\vec E^{(1)},\cdots,\vec E^{(n)}) \quad ; \quad D=\text{diag} (\lambda^{(1)},\cdots, \lambda^{(n)}) $$

When $n=3$ we are in 3D

$$ P=\begin{bmatrix} E_1^{(1)} & E_1^{(2)} & E_1^{(3)} \\ E_2^{(1)} & E_2^{(2)} & E_2^{(3)} \\ E_3^{(1)} & E_3^{(2)} & E_3^{(3)} \end{bmatrix} $$

When the matrix is symmetric one can always choose the eigenvectors to be orthogonal that is $\vec E^{(k)}\cdot \vec E^{(m)}=\delta^{km}$ corresponding to an orthogonal diagonalization where $P^{-1}=P^T$. A matrix being orthogonal means that $PP^T=\mathcal X_n$.

$$ A=PDP^T=(\lambda^{(1)}\vec E^{(1)}\cdots\lambda^{(n)} \vec E^{(n)} ) \begin{pmatrix} \vec E^{(1)T} \\ \vdots \\ \vec E^{(n)T} \end{pmatrix}=\sum^n_{k=1} \lambda^{(k)}\vec E^{(k)} \vec E^{(k)T} $$

$$ \vec {\text{x}}^TA\vec{\text x}=A_{ij} x_ix_j=\sum^n_{k=1}\lambda^{(k)}\left ( \vec E^{(k)T}\vec{\text x} \right )^2 $$

for any vector $\vec{\text x}$

💰 Example: consider a $2\times 2$ matrix

$$ A=\begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix} $$