I have the quadratic equation $$ \hat{f}^2+\hat{B}\hat{f}+\hat{C}=0 $$ for the matrix $\hat{f}$, where $\hat{B}$, $\hat{C}$ are some known matrices. Do any general methods of its solution exist?
To be more specific, in my case $\hat{B}$ is the infinite diagonal matrix with the elements $B_{nm}=\delta_{nm}(i\varepsilon+b[n+\frac12])$, $i$ is the imaginary unit, and $\hat{C}$ is proportional to the unit matrix: $C_{nm}=\delta_{nm}c$. Should the matrix $\hat{f}$ be only diagonal in this case?
Update I have found the related questions Is there a unique solution for this quadratic matrix equation? and Solve $AX^2 + BX + C = 0$ about general solutions of quadratic matrix equations, so now my question is simpler: if $\hat{B}$ is a diagonal matrix and $\hat{C}$ is proportional to the unit matrix, so is it true that $\hat{f}$ should be also diagonal matrix, or there exist some nondiagonal solutions?