I am trying to construct a symbolic matrix with the following property- $$ \left(D_{3\times3}(q)\right)^T = D_{3\times3}(-q) $$ Note that for $q\in \mathbb{R}$, $D(q)$ would be hermitian.

So far i have tried to bend a construct from a related question

dmat[q_] :=Table[If[i <= j, Dm[i, j][q], Dm[j, i][-q]], {i, 1, 3}, {j, 1, 3}]
Assuming[{Apply[And, Diagonal[dmat[q]] == Diagonal[dmat[-q]]]},Simplify[Transpose[dmat[q]] == dmat[-q]]]

The proper output, however, eludes me. I get the output

{{-Dm[1, 1][-q] + Dm[1, 1][q], 0, 0}, {0, -Dm[2, 2][-q] + Dm[2, 2][q],0}, {0, 0, -Dm[3, 3][-q] + Dm[3, 3][q]}} == {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}

The error, obviously lies in my inability to express

{Apply[And, Diagonal[dmat[q]] == Diagonal[dmat[-q]]]}

properly. Any fix to this?


I would make use of Mathematica patterns in the assumptions:

Assuming[{Dm[a_, a_][x_] == Dm[a_, a_][-x_]}, Simplify[Transpose[dmat[q]] == dmat[-q]]]
(* True *)

This tells Simplifythat a matrix element with equal indices (i.e. a diagonal element) is an even function.

The problem with your code is that with Apply, you are replacing the equal sign with an && operator

Apply[And, Diagonal[dmat[q]] == Diagonal[dmat[-q]]]

(* {Dm[1, 1][q], Dm[2, 2][q], Dm[3, 3][q]} && {Dm[1, 1][-q], Dm[2, 2][-q], Dm[3, 3][-q]} *)

The working code that is closest to your approach would be

MapThread[Equal, {Diagonal[dmat[q]], Diagonal[dmat[-q]]}]

which gives

{Dm[1, 1][q] == Dm[1, 1][-q], Dm[2, 2][q] == Dm[2, 2][-q], Dm[3, 3][q] == Dm[3, 3][-q]}


Another possible solution is to define the diagonal elements as functions of Abs[q].

dmat[q_] := Table[If[i == j, Dm[i, i][Abs[q]], 
            If[i <= j, Dm[i, j][q], Dm[j, i][-q]]], {i, 1, 3}, {j, 1, 3}]

This way, you won't need any further assumption:

Simplify[Transpose[dmat[q]] == dmat[-q]]
(* True *)
  • $\begingroup$ Regarding the EDIT: $q\in\mathbb{C}$ in general. So defining the diagonal elements in terms of Abs[q] wouldn't work. In fact even for real q, my gut feeling is that restricting your matrix to a function of Abs[q] is too restrictive, as opposed to $f(q)=f(-q)$. $\endgroup$ – Debanjan Basu Jan 26 '15 at 17:17
  • $\begingroup$ @DebanjanBasu you are right, I thought I read that $q \in \mathbb{R}$ in the question but it was just a note. However, if we restrict to $\mathbb{R}$, I think that an even function is equivalent to a function of $|q|$. I can't think of a counterexample... $\endgroup$ – Pincopallino Jan 26 '15 at 22:44
  • $\begingroup$ @Pincopalino I think you are right. I convinced myself by making a power series expansion of $f(q)$ around $q=0$ and comparing powers of $f(\pm q)$. $\endgroup$ – Debanjan Basu Jan 28 '15 at 12:33

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.