I have a rather simple question, but I have not been able to figure out how to implement a solution in Mathematica. I would like to define a variable size square matrix, say an N x N matrix A, whose entries A_ij are of the form Kroneceker-delta_ij (N+1-2k)/2. (In fact, the matrices I want to deal with are N dimensional irreducible representations of SU(2)). Eventually, I would like to compute traces of products of certain matrices, but I can not even get tr(IdentityMatrix[N] = N) to work. How should I approach this problem?


1 Answer 1


For most matrix calculations you need to specify the dimension as a number. Exceptions are (in version 9) TensorReduce and relatives, e.g.:

Assuming[a \[Element] Matrices[{d, d}],
 TensorReduce[Inverse[a].a == a.Inverse[a]]

(* ==> True *)

However, Tr isn't one of the functions that work in this way. For your specific application, it may be worth pointing out that there is a built-in function for the irreps of SO(3): WignerD

  • $\begingroup$ Thanks for the answers. It does not help much however. Also WignerD is for the group elements, what I have is the irreps of of the lie algebra. $\endgroup$
    – seckin
    Jan 26, 2013 at 22:25
  • $\begingroup$ Sorry to hear that. Maybe if you gave a more specific example of your matrices someone could come up with a solution. $\endgroup$
    – Jens
    Jan 26, 2013 at 23:05

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.