2
$\begingroup$

I would like to create the following $15\times 15$ matrix

$A_{ij} = \Lambda^{[I}_{[J} \delta^{M]}_{N]}$

It is tricky because $A$ is a $15\times 15$ whose entries $ij$ are labeled by antisymmetric pair $[IM]$ and $[JN]$ where all indices ($I,J,M,N$) run from 1 to 6, i.e.

$[IM], [JN] ={(1,2), (1,3), (1,4), (1,5),(1,6), (2,3), (2,4),..., (4,5),(4,6),(5,6)}$

In other words, $i = [IM]$ and $j=[JN]$.

The $6\times 6$ matrix $\Lambda^I_J$ is defined in 2 steps as follows:

Step 1: Define $M_{IJ}$ and $M2$ (these are $6\times 6$ matrices and there're 15 matrices $M_{IJ}$):

M[I_, J_] := Table[KroneckerDelta[I, a] KroneckerDelta[J, b] - 
KroneckerDelta[J, a] KroneckerDelta[I, b], {a, 1, 6}, {b, 1, 6}];
M2 = Sum[M[I,J], {I,1,6}, {J,1,I-1}]

so that the form of $M2$ is an $6\times 6$ antisymmetric matrix (with zero diagonal elements and $\pm 1$ off-diagonal elements).

Step 2: Define $\Lambda^I_J$ by multiplying the non-zero elements of $M2$ with a parameter (there are 15 nonzero elements so there are 15 parameters):

$\Lambda^I_J$ is defined mathematically (I'm not sure how to define this in Mathematica) by multiplying each of the 15 $\Lambda^I_J$ with a parameter $x_j$, where $j = 1,\,...\,,15$. $\Lambda^I_J$ then should look like this

$\Lambda^I_J =\begin{pmatrix} 0 & -x1 & -x2 & -x3 & -x4 & -x5 \\ x1 & 0 & -x6 & -x7 & -x8 & -x9\\ x2 & x6 & 0 & -x10 & -x11 & -x12 \\ x3 & x7 & x10 & 0 & -x13 & -x14 \\ x4 & x8 &x11 & x13 & 0 & -x15 \\ x5&x9&x12& x14& x15& 0 \end{pmatrix} $

Another way to define $\Lambda^I_J$ is to multiply the 15 arbitrary parameters straight with the 15 $M[I,J]$ like this (the result differs by a sign from above - but that doesn't matter)

\[CapitalLambda] = x1 M[1, 2] + x2 M[1, 3] + x3 M[1, 4] + x4 M[1, 5] + x5 M[1, 6] + x6 M[2, 3] + x7 M[2, 4] + x8 M[2, 5] + x9 M[2, 6] + x10 M[3, 4] + x11 M[3, 5] + x12 M[3, 6] + x13 M[4, 5] + x14 M[4, 6] + x15 M[5, 6];

The $6\times 6$ matrix $\delta^M_N$ is just the KroneckerDelta function.

So the $15\times 15$ matrix $A$ is created from the entries of $\Lambda^I_J$ and $\delta^M_N$. For example:

$A^{12,12} = \Lambda^1_2 \delta^1_2$

I'd be very grateful if anyone could help me out with this. Many thanks !

$\endgroup$
2
  • $\begingroup$ Your code for $\Lambda^I {}_J$ returns a $6 \times 6$ array for any particular inputs of $I$ and $J$. Is (for example) $\Lambda^1 {}_2$ supposed to be a $6 \times 6$ matrix? $\endgroup$ Commented Jul 6, 2018 at 12:43
  • $\begingroup$ Yes, $\Lambda^1_2$ should be an $6\times 6$ matrix with two non-zero entries at positions ($i,j = 1,2$) and $(i,j=2,1)$. $\endgroup$
    – user195583
    Commented Jul 7, 2018 at 1:45

2 Answers 2

2
$\begingroup$

I do not exactly understand what you try to accomplish but maybe the following functions that translate between linear and triangular indexing for properly upper-triangular matrices help?

LinearToTriangularIndexing[k_Integer, n_Integer] := Module[{i, j},
   i = n - 1 - Floor[Sqrt[4. n (n - 1) - 8. k + 1.]/2.0 - 0.5];
   j = Subtract[
     k + i + Quotient[Subtract[n + 1, i] Subtract[n, i], 2], 
     Quotient[n (n - 1), 2]];
   {i, j}
   ];

TriangularToLinearIndexing[{i_Integer, j_Integer}, n_Integer] := 
  Subtract[Quotient[n (n - 1), 2] + j, 
   Quotient[Subtract[n + 1, i] Subtract[n, i], 2] + i];

For example, we have

Table[LinearToTriangularIndexing[i,6], {i,1,Binomial[6,2]}]

{{1, 2}, {1, 3}, {1, 4}, {1, 5}, {1, 6}, {2, 3}, {2, 4}, {2, 5}, {2, 6}, {3, 4}, {3, 5}, {3, 6}, {4, 5}, {4, 6}, {5, 6}}

If you have a general function f that turns $[I,M]$ and $[J,N]$ into a number, you can generate your desired matrix with the following (I chose n = 4 solely in order to make the output printable here):

n = 4;
Table[
 IM = LinearToTriangularIndexing[i, n];
 JN = LinearToTriangularIndexing[j, n];
 f @@ Join[IM, JN],
 {i, 1, Binomial[n, 2]}, {j, 1, Binomial[n, 2]}]

$$ \left( \begin{array}{cccccc} f(1,2,1,2) & f(1,2,1,3) & f(1,2,1,4) & f(1,2,2,3) & f(1,2,2,4) & f(1,2,3,4) \\ f(1,3,1,2) & f(1,3,1,3) & f(1,3,1,4) & f(1,3,2,3) & f(1,3,2,4) & f(1,3,3,4) \\ f(1,4,1,2) & f(1,4,1,3) & f(1,4,1,4) & f(1,4,2,3) & f(1,4,2,4) & f(1,4,3,4) \\ f(2,3,1,2) & f(2,3,1,3) & f(2,3,1,4) & f(2,3,2,3) & f(2,3,2,4) & f(2,3,3,4) \\ f(2,4,1,2) & f(2,4,1,3) & f(2,4,1,4) & f(2,4,2,3) & f(2,4,2,4) & f(2,4,3,4) \\ f(3,4,1,2) & f(3,4,1,3) & f(3,4,1,4) & f(3,4,2,3) & f(3,4,2,4) & f(3,4,3,4) \\ \end{array} \right) $$

$\endgroup$
2
  • $\begingroup$ Hello Henrik, thanks for your code ! I am testing it out now. I guess in my case $f$ is the entry of the $15\times 15$ matrix $A$ - I thought I understood it - but apparently after Jose's and Michael's questions above, I got a bit confused about this tensor product between $\Lambda^I_J$ and $\delta^M_N$, but I guess your code should work for any general $f$. $\endgroup$
    – user195583
    Commented Jul 7, 2018 at 2:15
  • $\begingroup$ That's right. I also was confused by your $\lambda$ so I thought that a general method would help you more in the long run. $\endgroup$ Commented Jul 8, 2018 at 1:31
2
$\begingroup$

I'm not sure I'm interpreting correctly the question, but here is what I would do. This is for an arbitrary matrix $\Lambda$.

First, construct the tensor product of the $\Lambda$ matrix and the $\delta$ matrix:

Lambda = Array[Λ, {6, 6}];
delta = IdentityMatrix[6];
X = TensorProduct[Lambda, delta];

The array X has dimensions {6, 6, 6, 6}, and if we started with indices Lambda[I, J] and delta[M, N] then we get X[I, J, M, N]. We need to antisymmetrize the pairs {I, M} and {J, N}, so it is convenient to transpose X to have those indices together:

Y = Transpose[X, {1, 3, 2, 4}];

Now we have Y[I, M, J, N]. Antisymmetrize the pairs:

Z = Symmetrize[Y, {Antisymmetric[{1, 2}], Antisymmetric[{3, 4}]}];

The result is a SymmetrizedArray object (a way of storing the result without repeating independent components, or without lots of zeros). If you want the normal array, use Normal[Z].

Then construct the list of 15 antisymmetric pairs you are interested in:

comps = SymmetrizedIndependentComponents[{6, 6}, Antisymmetric[{1, 2}]]
(* {{1, 2}, {1, 3}, {1, 4}, {1, 5}, {1, 6}, {2, 3}, {2, 4}, {2, 5}, {2, 6}, {3, 4}, {3, 5}, {3, 6}, {4, 5}, {4, 6}, {5, 6}} *)

Finally extract the {15, 15} matrix corresponding to those pairs:

A = Outer[Extract[Z, Join[##]] &, comps, comps, 1]

The result is too large to show here.

I tried to use your definition of Lambda, but I do not understand it. That definition produces a matrix per pair IJ, while you seem to suggest it should be just a number.

Edit after the definition of Lambda has been updated:

Using the new definition of Lambda:

Lambda = SymmetrizedArray[Thread[comps -> -Array[Subscript[x, #] &, 15]], {6, 6}, Antisymmetric[{1, 2}]]

we have the final result for A:

result

$\endgroup$
3
  • $\begingroup$ Thanks for your code with the detailed explanation. I put the code in my ancient Mathematica 8, and currently I got some big error messages which I'm trying to understand - I suspect it's due to the old version. You're right - The entries of the 15 $\times$15 matrix $A$ are defined in terms of the entries of the $\Lambda^I_J$ matrix (not using the entire matrix). For example: $A_{12,34} =\Lambda^1_3 \delta^2_4$. $\endgroup$
    – user195583
    Commented Jul 7, 2018 at 2:02
  • $\begingroup$ This is an "errata" to the last bit in my previous comment "The entries of the 15 $\times$15 matrix $A$ are defined in terms of the entries of the $\Lambda^I_J$ matrix (not using the entire matrix)". At this point, I'm getting a bit confused myself - I know for sure that $A$ are labeled by antisymmetric pair of indices $IM,JN$ and since these run from 1-6, $A$ should be 15D, but I'm confused on the summation part. As written above, clearly $\Lambda^1_3$ should refer to the entire $6\times 6$ matrix labeled as $\Lambda^1_3$, not any particular entry. $\endgroup$
    – user195583
    Commented Jul 7, 2018 at 2:21
  • $\begingroup$ I managed to understand it and edited my definition of $\Lambda^I_J$ in my original question. $\endgroup$
    – user195583
    Commented Jul 7, 2018 at 3:00

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.