If we have a polynomial lets say $0 + x + 12x^2 + 11x^3$ in $\mathbb{Z}_{13} / x^4 + 1$ (quotient ring over finite field). Then if we multiply that polynomial by $x^i \text{ for } i \in [0, \dots, r]$. Then rows start repeating after some number of rows.
For example, given width equal to $4$, then 9th row is the same as first row. What is the value of $r$ with respect to dimension of that first polynomial (or width of matrix)?
[ 0 1 12 11] --> x^0 * (0 + x + 12x^2 + 11x^3)
[ 2 0 1 12] --> x^1 * (0 + x + 12x^2 + 11x^3) = 2 + 0x + 1x^2 + 12x^3 <-- [ 2 0 1 12]
[ 1 2 0 1] --> x^2 * ...
[12 1 2 0] --> x^3 * ...
[ 0 12 1 2] --> x^4 * ...
[11 0 12 1] --> x^5 * ...
[12 11 0 12] --> x^6 * ...
[ 1 12 11 0] --> x^7 * ...
[ 0 1 12 11] --> x^8 * ... = first row!