${}$
$$ \mathbf{S} = \begin{bmatrix} S_{11} & S_{12} & S_{13} \\ S_{21} & S_{22} & S_{23} \\ S_{31} & S_{32} & S_{33} \end{bmatrix} $$Due to conservation of angular momentum: $S_{12} = S_{21}, S_{13} = S_{31}$ and $S_{32} = S_{23}$ .
${}$
$$\mathbf{S}' = \mathbf{Q}^{-1} \mathbf{S Q}$$with $S_1 \gt S_2 \gt S_3$ where the $S_i$'s are the eigenvalues of $\mathbf{S}$
where $\vec{v}_1$ is the eigenvector corresponding to $S_1$, $\vec{v}_2$ is the eigenvector corresponding to $S_2$, and $\vec{v}_3$ is the eigenvector corresponding to $S_3$.
Determine the principle stresses and directions given:
$$ \mathbf{S} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 3 & -1 \\ 0 & -1 & 3 \end{bmatrix} $$import IPython
IPython.display.Image(url='http://www.clker.com/cliparts/3/1/b/a/11971488211294199438barretr_Earth.svg.med.png', width=300, embed=True)
%%tikz --scale 1.0 --size 500,500 -f png
\fill[color=gray] (0,0) ellipse [x radius=2, y radius=1];
\draw[line width=2] (0,0) ellipse [x radius=2, y radius=1];
\draw[line width=2, dashed] (2,0) arc (0:-180:2 and 4);
\draw[line width=2, -latex] (0,0) -- (0,-2.1) node[right,text width=2] {\Large $x_3$};
\draw[line width=2, -latex] (0,0) -- (-1.3,1.3) node[right,text width=2] {\Large $x_1$};
\draw[line width=2, -latex] (0,0) -- (2.5,0) node[right,text width=3] {\Large $x_2$};
\node at (10,0) {\Huge $\rho \frac{\partial^2 u_1}{\partial t^2} = \frac{\partial S_{11}}{\partial x_1} +\frac{\partial S_{12}}{\partial x_2} + \frac{\partial S_{13}}{\partial x_3} + \rho b_1$};
\node at (10,-2) {\Huge $\rho \frac{\partial^2 u_2}{\partial t^2} = \frac{\partial S_{12}}{\partial x_1} +\frac{\partial S_{22}}{\partial x_2} + \frac{\partial S_{23}}{\partial x_3} + \rho b_2$};
\node at (10,-4) {\Huge $\rho \frac{\partial^2 u_3}{\partial t^2} = \frac{\partial S_{13}}{\partial x_1} +\frac{\partial S_{23}}{\partial x_2} + \frac{\partial S_{33}}{\partial x_3} + \rho b_3$};
$S_{33} = S_v$ must be a principle stress!