cofactor matrix