0
$\begingroup$

I need Dirac Matrix in my work. They consists of PauliMatrix and ZeroMatrix, which is:

ZeroMatrix:=IdentityMatrix[2]-IdentityMatrix[2]

I define Dirac Matrix as:

gamma = ({{PauliMatrix[0], ZeroMatrix}, {ZeroMatrix, -PauliMatrix[0]}}) // MatrixForm;

I got such result:

enter image description here

But I need something else: I need a monolithic table, does not consist of individual blocks. How can I get it? (I need something universal, because I need to use it to construct 4 gamma matrices and spinors).

$\endgroup$
6
  • $\begingroup$ In fact this is a special case of How to Flatten Array of Arrays of the highest order in a simple way? $\endgroup$ – Artes Aug 13 '14 at 18:58
  • $\begingroup$ Array[0 &, {2, 2}] would be better than IdentityMatrix - IdentityMatrix :) $\endgroup$ – Öskå Aug 13 '14 at 19:00
  • $\begingroup$ @Artes Why not vote to close? Also a duplicate of (761) I believe. $\endgroup$ – Mr.Wizard Aug 13 '14 at 21:05
  • $\begingroup$ @Mr.Wizard I've done it, but since I've been one of the most frequent reviewers I expected others to start closing. $\endgroup$ – Artes Aug 13 '14 at 21:26
  • $\begingroup$ @Artes There is no obligation but as it takes no longer to vote to close than it does to comment why not vote? $\endgroup$ – Mr.Wizard Aug 13 '14 at 21:27
2
$\begingroup$

ArrayFlatten[] takes zeroes as a representation of a zero square matrix:

gamma = {{PauliMatrix[0], 0}, {0, -PauliMatrix[0]}}
ArrayFlatten[gamma]

Which gives {{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, -1, 0}, {0, 0, 0, -1}}

$\endgroup$

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