Say we have some symmetric positive definite $n\times n$ matrix $M$ with $n$ distinct eigenvalues $\{\lambda\_1,...,\lambda\_n\}$. Is there a general formula for the maximum angle $\theta$ for which $M$ can rotate some vector, in terms of matrix invariants?


I worked out the $2\times 2$ case and the answer is 
$$\theta=\text{arccos}\Big(2\sqrt{\frac{\text{det}M}{(\text{tr}M)^2}}\Big)$$


In general, the answer is
$$\theta=\text{arccos}\Bigg(\min\_{v\neq0}\frac{v^TMv}{||v||\cdot||Mv||}\Bigg)$$


However I would like to find an answer analogous to the $2\times 2$ case for the general $n\times n$ case. 


In trying to work out the $3\times 3$ case, the minimization procedure became extremely complicated. The best I could do was the case where two of the eigenvalues are equal $\lambda\_1,\lambda\_2,\lambda\_2$. In that case, the angle turns out to be the same angle you would calculate for a $2\times 2$ matrix with the same eigenvalues $\lambda\_1,\lambda\_2$.


In fact, upon further analysis it should be true that for an $n\times n$ matrix with $k$ distinct eigenvalues, the formula for $\theta$ is equal to that which you would get from a $k\times k$ matrix with the corresponding eigenvalues.


**Edit:** Using the above fact, my guess for the $3\times 3$ case with $3$ distinct eigenvalues is
$$\theta=\text{arccos}\Bigg(2\sqrt{\frac{6\text{det}M}{(\text{tr}M)^3-\text{tr}M^3}}\Bigg)$$


And my guess for the $4\times4$ case is
$$\theta=\text{arccos}\Bigg(2\sqrt{\frac{48\text{det}M}{(\text{tr}M)^4-3(\text{tr}M^2)^2-4\text{tr}M\text{tr}M^3+6\text{tr}M^4}}\Bigg)$$


Technically there are $6$ possible solutions to the $3\times3$ case, however this is the only solution with rational coefficients on the traces. The $4\times4$ solution shown is also the only solution whose coefficients are rational. 


In general, for an $n\times n$ matrix there are at most $\prod\_{k=3}^{n}2\times p(k)$ possible solutions based on the statement just above the edit. Where $p(k)$ is the partition function.


These guesses are based on the assumption that you can write the solution as a ratio of linear combinations of power traces, for which each terms power sums to $n$. Based on Carlo Beenakker's answer this is an incorrect assumption.



Maximum rotation made by a symmetric positive definite matrix?
As explained in these [notes](https://calculus7.org/2013/05/04/condition-number-and-maximal-rotation-angle/), the maximum rotation angle $\theta$ of a symmetric positive definite matrix $M$ is related to the condition number $K=\mu\_{\rm max}/\mu\_{\rm min}$ of the matrix (the ratio of largest and smallest eigenvalue) by
$$K=\frac{1+\sin\theta}{1-\sin\theta}\Leftrightarrow\cos\theta=\frac{2\sqrt{K}}{{1+K}}.$$
For $n=2$ this reduces to the first equation in the OP. The formulas for $\cos\theta$ in the OP for $n=3,4$ do not agree with the above.




---


I just noticed a similar answer at [MSE.](https://math.stackexchange.com/questions/2266057/maximum-angle-between-a-vector-x-and-its-linear-transformation-a-x)


