Here is an example for 2x2 matrix (2D stress), $$ \begin{bmatrix} \sigma_{xx} &\sigma_{xy}\\ \sigma_{yx} &\sigma_{yy}\\ \end{bmatrix} $$ to be more specific, $$ \begin{bmatrix} 50 &30\\ 30 &-20 \end{bmatrix} $$ the principal orientation is $$ \tan(2 \theta)=\frac{2\cdot30}{50-(-20)}\implies\theta=20.3^{\circ} $$ The reference for this is section of 2-D Principal Stress Example of https://www.continuummechanics.org/principalstressesandstrains.html
I was told that you can also get the $\theta$ if you calculate the eigenvector of this 2x2 matrix. so I use MATLAB and get a two eigenvector of this matrix namely $$ V_1=\begin{bmatrix} 0.3469 \\ -0.9379 \end{bmatrix} $$ and $$ V_2=\begin{bmatrix} -0.9379 \\ -0.3469 \end{bmatrix} $$
Anyone can tell me how to get this $20.3^\circ$ from the two eigenvectors?
A rotation matrix has a vector that it is rotating things about, and an angle. The vector can be defined using its angle from the x-axis. That’s what $\theta$ is.
If we take any point that’s already on the axis of rotation then it will not be rotated. That is the same as an eigenvector. (Because the eigenvector of a matrix is the vector that when multiplied by the matrix gives the same vector direction - ie pointed in the same way, in this case not rotated.)
So the eigenvector is the axis.
Take the eigenvector where x and y have the same sign. In this case both negative. Then take the arc-cos (|the x part of the eigenvector|), or take the arc-sin (|the y part of the eigenvector|).