Cofactor matrix