1
$\begingroup$

Suppose that I have the following symbolic 7*7 matrix

   mat= {{(a^2 b^2)/c^2, 0, 0, 0, 0, 0, (a^2 b^2 e11)/c^2}, {0, (a^2 b^2)/c^2,
       0, 0, 0, 0, (a^2 b^2 e22)/c^2}, {0, 0, (a^2 b^2)/c^2, 0, 0, 0, (
      a^2 b^2 e33)/c^2}, {0, 0, 0, (2 a^2 b^2)/c^2, 0, 0, (2 a^2 b^2 e12)/
      c^2}, {0, 0, 0, 0, (2 a^2 b^2)/c^2, 0, (2 a^2 b^2 e13)/c^2}, {0, 0, 
      0, 0, 0, (2 a^2 b^2)/c^2, (2 a^2 b^2 e23)/c^2}, {(a^2 b^2 e11)/
      c^2, (a^2 b^2 e22)/c^2, (a^2 b^2 e33)/c^2, (2 a^2 b^2 e12)/c^2, (
      2 a^2 b^2 e13)/c^2, (2 a^2 b^2 e23)/c^2, 
      b^2 (1 + (
         a^2 (e11^2 + 2 e12^2 + 2 e13^2 + e22^2 + 2 e23^2 + e33^2))/c^2)}}

for which I have the following information

a>0, b>0, c>0, {e11,e22,e33,e12,e13,e23} are Reals.

How is it possible to symbolically obtain the square root of this matrix.

What I tried so far was to Eigendecompose the matrix but it doesn't give me a closed-form solution, despite the fact that I declare the above assumptions, i.e.

 eigen= Assuming[{e11,e22,e33,e12,e13,e23}\[Element]Reals&&a>0&&b>0&&c>0,Eigenvalues[mat]];

Are there any other ways where I can find the square root of this symbolic matrix?

$\endgroup$
9
  • $\begingroup$ You can try to apply ToRadicals to the eigenvalues. $\endgroup$ – Henrik Schumacher Apr 1 '20 at 11:58
  • $\begingroup$ You could try MatrixPower[…,1/2] $\endgroup$ – Ulrich Neumann Apr 1 '20 at 12:01
  • $\begingroup$ @UlrichNeumann The first thing that I tried was MatrixPower but it wasn't useful. $\endgroup$ – KratosMath Apr 1 '20 at 12:02
  • $\begingroup$ @KratosMath "wasn't useful " means "doesn't evaluate"? $\endgroup$ – Ulrich Neumann Apr 1 '20 at 12:04
  • 1
    $\begingroup$ @KratosMath Result is a little bit lengthy… The root-objects can be evaluated with Normal if you assign values to the parameters. That means the Root -result can be used like other Mathematica-functions! $\endgroup$ – Ulrich Neumann Apr 1 '20 at 12:57
4
$\begingroup$

Are you sure that you require the square root? The Cholesky factorization does often the same job and in this case, it can be computed symbolically:

L = Simplify[CholeskyDecomposition[mat] /. Conjugate -> Identity, {a > 0, b > 0, c > 0}]

$$\left( \begin{array}{ccccccc} \frac{a b}{c} & 0 & 0 & 0 & 0 & 0 & \frac{a b \text{e11}}{c} \\ 0 & \frac{a b}{c} & 0 & 0 & 0 & 0 & \frac{a b \text{e22}}{c} \\ 0 & 0 & \frac{a b}{c} & 0 & 0 & 0 & \frac{a b \text{e33}}{c} \\ 0 & 0 & 0 & \frac{\sqrt{2} a b}{c} & 0 & 0 & \frac{\sqrt{2} a b \text{e12}}{c} \\ 0 & 0 & 0 & 0 & \frac{\sqrt{2} a b}{c} & 0 & \frac{\sqrt{2} a b \text{e13}}{c} \\ 0 & 0 & 0 & 0 & 0 & \frac{\sqrt{2} a b}{c} & \frac{\sqrt{2} a b \text{e23}}{c} \\ 0 & 0 & 0 & 0 & 0 & 0 & b \\ \end{array} \right)$$

L\[Transpose].L - mat // Simplify

$$\left( \begin{array}{ccccccc} 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ \end{array} \right)$$

$\endgroup$
8
  • $\begingroup$ Thanks for your valuable response. So as I understood from your response the Cholesky decomposition gives the square root of the matrix, is it correct always? $\endgroup$ – KratosMath Apr 2 '20 at 7:07
  • $\begingroup$ The Cholesky factorization of a positive (semi-)definite matrix $A$ is an upper triangular matrix $L$ such that $A = L^T L$. So it is not exactly the square root, but it shares many important properties with it. Maybe that suffices for your application? (I cannot tell because I do not know what you are about to do...) $\endgroup$ – Henrik Schumacher Apr 2 '20 at 7:11
  • $\begingroup$ Well, what I need is exactly the square root of the matrix. But, as you said, maybe this is enough for my case. $\endgroup$ – KratosMath Apr 2 '20 at 7:20
  • $\begingroup$ "what I need is exactly the square root of the matrix" I am not soo sure about it. What is it that you want to do with the square root? $\endgroup$ – Henrik Schumacher Apr 2 '20 at 7:24
  • $\begingroup$ The square root of the matrix is included in the FEM procedure of my code. $\endgroup$ – KratosMath Apr 2 '20 at 7:27
0
$\begingroup$

There is likely not a clean expression.

Even just getting rid of a bunch of common terms and truncating to a 4 x 4 leaves you with complicated expressions, and the matrix is not sparse. Try this, to get just the first term

mat3 = mat[[4 ;; 7, 4 ;; 7]] /. {e11 -> 0, e22 -> 0, b -> 1, c -> 1, π -> 1}

(* {{8, 0, 0, 8 e12}, {0, 8, 0, 8 e13}, {0, 0, 8, 8 e23}, 
   {8 e12, 8 e13, 8 e23, 1 + 4 (2 e12^2 + 2 e13^2 + 2 e23^2 + e33^2)}} *)

MatrixPower[mat3, 1/2][[2, 1]]

(* complicated expression *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.