Add Matrix test

Revise Elimination and cofactors