Suppose that we have an formula_8 matrix formula_1. First, we choose any row or column of the matrix. For each number formula_24 in that row or column, we calculate something called its cofactor formula_25. Then formula_26.