#s mod matrix