[Math] Quadratic equation for a matrix

linear algebramatricesmatrix equations

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?

Best Answer

$\newcommand{\trace}[0]{\text{trace}}$Consider this: $$ X = \begin{bmatrix} 1 & 1\\ 0 & 1 \end{bmatrix}, B = \begin{bmatrix} -2 & 0\\ 0 & -2 \end{bmatrix}, C = \begin{bmatrix} 1 & 0\\ 0 & 1 \end{bmatrix}. $$ Then $$ X^{2} = \begin{bmatrix} 1 & 2\\ 0 & 1 \end{bmatrix}, $$ and $$ X^{2} + B X + C = 0. $$


More generally, if $X$ is any $2 \times 2$ matrix, then $X$ is a root of its characteristic polynomial, so that $$ X^{2} + B X + C = 0, $$ where $B$ and $C$ are the scalar matrices $$ B = \begin{bmatrix} - \trace(X) & 0\\ 0 & -\trace(X) \end{bmatrix}, \qquad C = \begin{bmatrix} \det(X) & 0\\ 0 & \det(X) \end{bmatrix}. $$

Related Question