# Question:i can't find our where my error is...

## Question:i can't find our where my error is...

Maple 2015

Hi,

Sorry to ask such a stupid question but I can't find out where my error is. Probably it's so huge it blinds me!

The double loop and the matrix product F^+ . F should give the same result, no? (it seems that F^+ . F has its rows reordered ?)

 > restart:
 > N   := 3: P   := 2: niv := [seq(Z[i], i=1..N)]; f   := Matrix(N^P, P, (i,j) -> `if`(j=P, niv[(i mod 3)+1], niv[iquo(i-1,3)+1]));
 (1)
 > ds := subs(niv =~ [\$0..N-1], f);
 (2)
 > vs := [ seq(V__||i, i=1..P)]: es := unapply( sort( [ seq( mul(vs ^~ [entries(ds[i,..], nolist)]), i=1..N^P) ] ), vs);
 (3)
 > ff := convert([ seq(es(entries(ffd[i,..], nolist)), i=1..N^P) ], Matrix); UnityRoots := [solve(z^3=1, z)]: F := simplify(subs(niv =~ UnityRoots, ff)) /~ sqrt(N^P):
 (4)

Scalar products of pairs of comumn vectors

F must be an orthogonal array

 > for i1 from 1 to N^P do   for i2 from 1 to N^P do     printf("%a ", simplify(add(F[..,i1] . F[.., i2])))   end do:   printf("\n"): end do: printf("\n");
 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1

or more simply:

 > simplify(F^+ . F)
 (5)
 >