0
$\begingroup$
TensorProduct[PauliMatrix[1], DiagonalMatrix[{1, 1}]] // TableForm 

created a tensor, which could be flatten to table form. However, how to make the tensor into a matrix?

$\endgroup$
  • 1
    $\begingroup$ ArrayFlatten[TensorProduct[PauliMatrix[1], DiagonalMatrix[{1, 1}]]]. $\endgroup$ – Henrik Schumacher Dec 10 '19 at 7:51
  • $\begingroup$ @HenrikSchumacher Thank! So I need to use ArrayFlatten directly? Why doesn't it work for TableForm? $\endgroup$ – ShoutOutAndCalculate Dec 10 '19 at 7:53
  • 1
    $\begingroup$ TableForm like all other commands ending on Form such MatrixForm are just for displaying purposes. Do not use them in computations. $\endgroup$ – Henrik Schumacher Dec 10 '19 at 7:58
2
$\begingroup$
KroneckerProduct[PauliMatrix[1], IdentityMatrix[2]]
MatrixForm@%

{{0, 0, 1, 0}, {0, 0, 0, 1}, {1, 0, 0, 0}, {0, 1, 0, 0}}

$\left( \begin{array}{cccc} 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ \end{array} \right)$

| improve this answer | |
$\endgroup$

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.