1
$\begingroup$

I want to define d×d matrix $A$ as $A_{mn} = \exp{[\sum_{i=0}^m\sum_{j=0}^n \theta_{ij}]}$. Here $\theta_{ij} $ is real numbers. I wrote below script in Mathematica 12.

d = 3; Clear[A]; Clear[theta]
Array[A, {d, d}]; Array[theta, {d, d}];
For[m = 0, m < d, m++, {
    For[n = 0, n < d, n++, {
      A[m, n] = E[Sum[theta[i, j], {i, 0, m}, {j, 0, n}]]
      }]}];
mtx = Table[A[i, j], {i, 0, d-1}, {j, 0, d-1}];
mtx // MatrixForm

The Purpose of my script is getting $\rm{det}[A]$.

Det[mtx]

How can I simplify it?

Det[mtx] // FullSimplify

I think I should use assumpution of $\theta_{ij} \in \mathbb{R}$. But I do not know how to do it.

$\endgroup$
3
  • 1
    $\begingroup$ How could you write Array[A, {n, n}]; Array[theta, {n, n}]; when n is not defined? Array[A, {n, n}] gives error. You did not get an error on your Mathematica? Your sum is also wrong Sum[theta[i, j], {0, i, m}, {0, j, n}] you can't use zero as summation index. May be you meant Sum[theta[i, j], {i, 0, m}, {j, 0, n}] It is better to evaluate each code one by one to see the problems easily. You also have m++ { which is wrong. $\endgroup$
    – Nasser
    Commented Jun 17, 2020 at 2:10
  • $\begingroup$ What exactly doesn't work? $\endgroup$
    – JimB
    Commented Jun 17, 2020 at 2:13
  • $\begingroup$ @Nasser Thank you for your comment. I fixed them. $\endgroup$
    – Sakurai.JJ
    Commented Jun 17, 2020 at 3:12

1 Answer 1

2
$\begingroup$
d = 3;
Clear[A]; Clear[theta]
Array[A, {d, d}]; Array[theta, {d, d}];
For[m = 0, m < d, m++,
  For[n = 0, n < d, n++,
   A[m, n] = Exp[Sum[theta[i, j], {i, 0, m}, {j, 0, n}]]
   ]
  ];
(mat = Table[A[i, j], {i, 0, d - 1}, {j, 0, d - 1}]) // MatrixForm

enter image description here

Dimensions[mat]
(* {3, 3} *)

Det[mat] // Simplify

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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