> with(linalg): > with(ListTools): > A:= matrix(7,2,[[1,0],[0,1],[1,1],[2,1],[3,1],[3,2],[0,0]]); > Count:= 0; > f:= proc(x) > if irem(C[x,1],6)=0 then x; > else 7; > end if; > end proc: > for a from 0 to 5 do > for b from 0 to 5 do > B:= matrix(2,1,[[a],[b]]): > C:= multiply(A,B): > S:= seq(f(i),i=1..7): > L:= MakeUnique([S]): > M:= submatrix(A,L,[1,2]): > if rank(M)=2 then Count:=Count+1; > print(a,b) end if: > end do; end do; > > Count;