# How to do $\bigotimes_{i=1}^n A_i$ where $A_i$ is a $m \times m$ matrix?

$$\bigotimes_{i=1}^n A_i$$

where $A_i$ is a $m \times m$ matrix.

I want to do above operation, however KroneckerProduct in Mathematica must list all $A_i$s I need to use.

I have a function $A_i$ where $i\in \mathbb{Z}$, and I want to write a program which doesn't depend on specific $n$. I know I can write a recursion, but I want to know whether there is more clever method.

• Something like KroneckerProduct @@ Table[A[i], {i, n}]? – Carl Woll Sep 12 '18 at 20:33
• @CarlWoll Nice, thank you. – maplemaple Sep 12 '18 at 20:36
• also Array[A, {n}, 1, KroneckerProduct]? – kglr Sep 12 '18 at 20:41
• @kglr {n} can be just n here. – Αλέξανδρος Ζεγγ Sep 13 '18 at 2:56
• @ΑλέξανδροςΖεγγ, right; thank you. – kglr Sep 13 '18 at 3:33

kP[a_, n_Integer] := Array[a, n, 1, KroneckerProduct]

• Note, that for $n=1$ a special case is required or Unprotect@KroneckerProduct; KroneckerProduct[m_] := m. – Johu Sep 12 '18 at 21:58