Skip to main content
added 325 characters in body
Source Link
Henrik Schumacher
  • 109.5k
  • 7
  • 186
  • 323

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)$$

$$\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)$$

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:

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)$$

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)$$

Source Link
Henrik Schumacher
  • 109.5k
  • 7
  • 186
  • 323

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:

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)$$