# How to Write a matrix Laurent polynomial $A_{-5}t^{-5} + A_{-4}t^{-4} + ...+ A_0 + A_1 t + A_2 t^2....$ in mathematica [closed]

I need to write in mathematica programming language a matrix Laurent Polynomial $$T = \sum_{i=-5}^{5} A_i t ^i$$ where the $$A_i$$ are $$n \times n$$ matrices (I want the entries to be symbolic) which can take entries in $$\mathbb{C}$$. So that I can get the conditions on the entries of the $$A_i$$ such that $$T^2$$ and $$T^3$$ are just polynomials in $$\mathbb{C}[t^2,t^3]$$.

• Have you seen Sum? Sep 14 at 11:27
• Array[a, {11, n, n}] . t^Range[-5,5], perhaps, assuming n is a positive Integer. There a bias in the index $i$: $(A_i)_{rc}$ is represented by a[i+6, r, c]. Sep 14 at 14:00
• small note: I think the Dot needs to be reversed in MichaelE2's answer; also note that you can eliminate the bias/offset by taking advantage of the second argument of Array, which gives the starting indices: (t^Range[-5, 5]) . Array[a, {11, n, n}, {-5, 1, 1}] Sep 15 at 1:37
• @thorimur Thanks. Was answering from a phone and didn't check. Sep 15 at 11:58

n = 2;

Sum[A[i] t^i, {i, -5, 5}]