Linear algebra behind principle stress orientations of mechanics 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: To explain what's going on here, I'll first focus on the numerical eigenvectors. Note that, as is common with numerical eigenvectors, $V_1$ is normalized to have length 1 (within numerical precision):
$$\|V_1\|^2 =V_1^t  V_1=V_{1x}^2+V_{1y}^2=0.3469^2+(-0.9379)^2=1$$
What's convenient about this is that any such normalized 2D vector is of the form $[\cos\theta,\sin\theta]^t$. Geometrically, $\theta$ is simply the angle that the eigenvector makes with the positive $x$-axis. Applying this to $V_1$ and $V_2$, we seemingly have
$$\theta_1 =\cos^{-1}(0.3469)=69.7^\circ,\qquad \theta_2=\cos^{-1}(-0.9379)=159.7 ^\circ.$$
However, these values are misleading: by definition, the inverse cosine function only returns angles in the range $0$ to $180^\circ$. But any angle in this range will have a positive sine, which is incorrect for both. As such, both angles should differ by a minus sign: $\theta_1=-69.7^\circ, \theta_2=-159.7^\circ$.
This still doesn't give the desired orientation angle. What we need to realize at this point is that eigenvectors are always ambiguous in the following sense: If $V$ is an eigenvector with eigenvalue $\lambda$, then so is any constant multiple of $V$. In particular, $-V$ is also an eigenvector with this eigenvalue. So we also need to consider the angles corresponding to $-V_1,-V_2$. But this amounts to shifting the two angles by $180^\circ$. If we add $180^\circ$ to both angles, we get $110.3^\circ$ for $-V_1$ and $20.3^\circ$ for $-V_2$. So at last we have the desired orientation angle. (The only last check is that the second eigenvector corresponds to the larger stress, and I assume you've already done this.)
Thus far I've focused on the numerical eigenvectors. But the OP also noted that the principal orientation can be calculated directly from the matrix. To see how this proceeds, suppose the strain matrix has an eigenvector $V=[\cos\theta,\sin\theta]^t$ with eigenvalue $\lambda$. For this to be true, we need
$$\begin{bmatrix} \sigma_{xx} & \sigma_{xy}\\ \sigma_{yx} & \sigma_{yy}\end{bmatrix}
\begin{bmatrix} \cos\theta \\ \sin \theta\end{bmatrix}
=\lambda \begin{bmatrix} \cos\theta \\ \sin \theta\end{bmatrix}.$$ This amounts to a system of two equations, and we may solve both for the principal stress as
$$\lambda = \sigma_{xx}+\sigma_{xy}\tan\theta = \sigma_{yy}+\sigma_{yx}\cot\theta$$
To proceed further, note that $\sigma_{yx}=\sigma_{xy}$ since the strain matrix is symmetric. Hence we may rearrange this equation as
\begin{align}
\frac{\sigma_{xx}-\sigma_{yy}}{\sigma_{xy }}
&=\cot\theta-\tan\theta\\
&=\frac{\cos\theta}{\sin\theta}-\frac{\sin\theta}{\cos\theta}\\
&=\frac{\cos^2\theta-\sin^2\theta}{\cos\theta\sin\theta}\\
&=\frac{2\cos(2\theta)}{\sin(2\theta)}\\
&=2 \cot(2\theta)
\end{align}
Therefore $\tan(2\theta)=\dfrac{2\sigma_{xy}}{\sigma_{xx}-\sigma_{yy}}$ which is exactly the computation applied in the OP.
A: 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|).
