# How to keep a matrix triangular after some multiplications

Are there a set of different $n$ matrices that commute that

1) after $n$ multiplications of these matrices - that is for example, $A \times B \times C \times ...A_n$, where $\times$ represents matrix multiplication, if the multiplied result was a product of some different matrices and two or more equal matrices, the result of multiplication is triangular. Otherwise, the result is not triangular.

Does this set exist for all numbers for $n$ bigger than 4?

-
What do you mean by "if the matrix can be decomposed into some matrices and two or more equal matrices"? – Robert Israel Oct 29 '12 at 5:18
Edited. hope this clears. – TTTY Oct 29 '12 at 5:29
I think you mean you are looking for fixed positive integers $n$ and $m$ and a set $S$ consisting of $n$ distinct $m \times m$ matrices such that for every product $P = A_1 \ldots A_n$ with all $A_j \in S$ and at least two of the $A_j$ are equal, $P$ is triangular, but if all $A_j$ are distinct then $P$ is not triangular. Is that right? – Robert Israel Oct 29 '12 at 5:54
That's correct. – TTTY Oct 29 '12 at 6:14

OK, here's an example in the case $m=2^n$. Let $V = \pmatrix{1 & 1\cr -1 & -1\cr}$, and $I = \pmatrix{1 & 0\cr 0 & 1\cr}$ the $2 \times 2$ identity matrix. Let $A_j$ be the Kronecker product of $n$ $2 \times 2$ matrices of which the $j$'th is $V$ and the others are $I$. Then the product of the $n$ distinct matrices $A_1, \ldots, A_n$ in any order is $V \otimes V \otimes \ldots \otimes V$, a matrix whose entries are all $\pm 1$. However, any product in which some $A_j$ appears twice is $0$ (and thus triangular) because $V^2 = 0$.