# Defining all elements of a matrix as real numbers

I want to evaluate the CholeskyDecomposition of the following symmetric matrix symMat

mm = Table[Subscript[m, i, j], {i, 1, 3}, {j, 1, 3}]
symMat = Table[
If[i >= j, mm[[i, j]], mm[[j, i]]], {i, 1, 3}, {j, 1, 3}]


It works but as Mathematica works with complex numbers I have some Conjugate commands in the result. How to tel that all parameters are Reals. I have found a nice post which use

    $Assumptions = _ ∈ Reals  But it has no effect. I have also tried $Assumptions =
Subscript[m, 2, 1] \[Element] Reals &&
Subscript[m, 1, 1] \[Element] Reals &&
Subscript[m, 3, 1] \[Element] Reals


In all cases it doesn't work. Any idea ?

• Did you use any function that uses those Assumptions, like Reduce or Simplify? How about ComplexExpand in this case? – Marius Ladegård Meyer Feb 11 '17 at 8:45
• Your two suggestions doesn't work – cyrille.piatecki Feb 11 '17 at 9:30
• I would appreciate to know why I deserve a downgrading note for a non trivial problem – cyrille.piatecki Feb 11 '17 at 10:08
• Does $Assumptions = Element[Flatten[mm], Reals] give what you need? – kglr Feb 11 '17 at 10:50 • Probably this does not answer your question in general, but CholeskyDecomposition[symMat] //. Conjugate[x_] -> x seems to work in this case. – Marius Ladegård Meyer Feb 11 '17 at 14:30 ## 1 Answer Just setting $Assumptions does not mean that those assumptions are taken into consideration during evaluation; you also need to apply a function to your result that is "sensitive" to \$Assumptions. In practice, these tend to be those functions that take an Assumptions option, such as Simplify, FullSimplify, Refine, FunctionExpand, Integrate...

For instance, this does the job in your case:

Simplify[CholeskyDecomposition[symMat], Element[_, Reals]]


Further details can be found in this tutorial: Using Assumptions.

• Nice Thanks MarcoB – cyrille.piatecki Feb 12 '17 at 14:08