Find the square root of a 3x3 matrix

515 Views Asked by At

Let ${\bf A}$ be a symmetric matrix, and I would like to find $\sqrt{\bf A}$ of a $3\times 3$ matrix. I am interested in finding the $\sqrt{\rm A}$ which is equivalent to the "sqrtm" built-in function in python (which is based on the Schur method: LINK).

I found this formulation, $$ \sqrt{\bf A} = \frac{{\bf A} + \sqrt{\operatorname{det}{\bf A}}\ {\tt I}} {\sqrt{\,{\operatorname{tr}\left(\bf A\right) + 2 \sqrt{\,{\operatorname{det}\left(\bf A\right)}\,}}}} $$ in one of the previous posts LINK. This formulation gives the exact results as the sqrtm in python. However, it is valid for ONLY a $2\times2$ matrix.

My question: is there a similar formulation that can be valid for a $3\times3$ matrix?

Many thanks in advance!

2

There are 2 best solutions below

1
On

I'm not sure about a formulation for all $3\times 3$ matrices, but we can pretty easily find the square root of diagonalizable matrices. Suppose $$A = \begin{bmatrix} \\ v_1 & v_2 & v_3 \\ \\\end{bmatrix} \begin{bmatrix} \lambda_1 & 0 & 0\\ 0 & \lambda_2 & 0\\ 0 & 0 & \lambda_3 \end{bmatrix} \begin{bmatrix} \\ v_1 & v_2 & v_3 \\ \\\end{bmatrix}^{-1}$$ For eigenvalues $\lambda_i$ and eigenvectors $v_i$. Then $$\sqrt{A}= \begin{bmatrix} \\ v_1 & v_2 & v_3 \\ \\\end{bmatrix} \begin{bmatrix} \sqrt{\lambda_1} & 0 & 0\\ 0 & \sqrt{\lambda_2} & 0\\ 0 & 0 & \sqrt{\lambda_3} \end{bmatrix} \begin{bmatrix} \\ v_1 & v_2 & v_3 \\ \\\end{bmatrix}^{-1}$$ since $$\sqrt{A}^2 = \begin{bmatrix} \\ v_1 & v_2 & v_3 \\ \\\end{bmatrix} \begin{bmatrix} \sqrt{\lambda_1} & 0 & 0\\ 0 & \sqrt{\lambda_2} & 0\\ 0 & 0 & \sqrt{\lambda_3} \end{bmatrix} \begin{bmatrix} \sqrt{\lambda_1} & 0 & 0\\ 0 & \sqrt{\lambda_2} & 0\\ 0 & 0 & \sqrt{\lambda_3} \end{bmatrix} \begin{bmatrix} \\ v_1 & v_2 & v_3 \\ \\\end{bmatrix}^{-1} = A.$$

2
On

Your link to the sqrtm method has a link to that function's source.

The algorithm does a Schuur decomposition of $A$, finding $Z$ and $T$ such that $A=ZTZ^*$ with $Z$ unitary and $T$ is upper triangular.

Then it tries to find $\sqrt{T}$ using _sqrtm_triu. This method is for finding the square root of an upper triangular. Once it find that (if it succeeds) it returns $\sqrt{A}$ as $Z\sqrt{T}Z^*$.

So now the question is about how _sqrtm_triu works. Consider that if you know $T$ is upper triangular, then (as long as you allow non-real entries) it is easy to find the diagonal entries of an upper triangular $\sqrt{T}$: they have to be square roots of the diagonal entries of $T$. After these are established, you can solve for the entries of the first off-diagonal. And repeat. I can't think of a nice way to write this in a succinct formula at present.