Question: How do i sum elements of a matrix modulo a number.

Ok so i have a matrix M filled with complex roots of unity. I want to execute the following code but it seems to be failing to do so correctly

t:=exp(2 Pi I/11);

m := (i, j) -> M[(i mod 11)+1, (j mod 11)+1] ;  

mu :=(i,j)->(add(add(add(a[k]*a[m]*a[n]*t^(m)*m((i+k-m),(j+n-m))),n=0..10),m=0..10),k=0..10));

 

Something is wrong with my indexing of the matrix . or when the mod procs.

Please Wait...