I have equation
$I = \rho(r)^{T} A_{h} \rho(r)$,
where
$\rho(r)= \begin{pmatrix}\rho_{+}(r) \\ \rho_{-}(r) \\ \rho_{z}(r)\end{pmatrix}$.
I want to rearrange $I$ by diagonalizing $A_{h}$ such as
$\begin{split} I &= \rho_{1}(r)\lambda_{1}\rho_{1}(r) \\ &+ \rho_{2}(r)\lambda_{2}\rho_{2}(r) \\ &+ \rho_{3}(r)\lambda_{3}\rho_{3}(r) \end{split}$,
where $\lambda_{1,2,3}$ is the diagonal compnents of diagonal matrix, and $\rho_{1,2,3}(r)$ are linear combinations of $\rho_{\pm,z}(r)$.
My question is that can I diagonalize $A_{h}$ using rotation matrix? or Are there ways for this?
It works in 2D case, but I am not sure in 3D.