Cofactor Matrix Calculator
Calculate the cofactor matrix (matrix of cofactors) for any 2x2 or 3x3 matrix. Each element is the signed minor, used in computing the adjugate and matrix
Cofactor Matrix Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser — no data is sent to any server.
Formula: C_ij = (-1)^(i+j) × M_ij, where M_ij is the minor of entry a_ij
Worked example — Cofactor matrix = the identity matrix itself; det = 1
Formula
C_ij = (-1)^(i+j) × M_ij, where M_ij is the minor of entry a_ij
Each cofactor C_ij is the determinant of the submatrix left after deleting row i and column j (the minor M_ij), multiplied by the checkerboard sign (-1)^(i+j). Collecting every C_ij gives the cofactor matrix; transposing it gives the adjugate, and det(A) = Σ_j a_ij × C_ij along any single row or column. Enter matrix values row by row, separated by commas.
Worked Examples
Example 1: Cofactors of the identity matrix
Problem:Find the cofactor matrix of the 3x3 identity matrix (1,0,0,0,1,0,0,0,1).
Solution:Because most 2x2 minors involve rows/columns of zeros and ones, the cofactors work out to C(0,0)=1, C(1,1)=1, C(2,2)=1, and all off-diagonal cofactors are 0.
Result:Cofactor matrix = the identity matrix itself; det = 1
Example 2: Cofactors feeding into a determinant check
Problem:For A = [[2,0,1],[3,0,0],[5,1,1]], use the first-row cofactors to verify the determinant.
Solution:C(0,0) = (0×1−0×1) = 0. C(0,1) = −(3×1−0×5) = −3. C(0,2) = (3×1−0×5) = 3. det = 2(0) + 0(−3) + 1(3) = 3.
Result:det(A) = 3, confirmed via first-row cofactor expansion
Frequently Asked Questions
What is a cofactor, and how is it different from a minor?
A minor M(i,j) is the determinant of the smaller matrix left after deleting row i and column j from the original matrix. A cofactor C(i,j) is that same minor multiplied by a sign, (−1)^(i+j) — so cofactors and minors have identical magnitudes but alternate in sign across a checkerboard pattern, starting with + in the top-left position.
Why does the sign of each cofactor alternate in a checkerboard pattern?
The (−1)^(i+j) sign factor comes directly from the algebraic derivation of the determinant via row/column expansion — it ensures that when you sum entry × cofactor across any row or column, the signs correctly account for how permutations of the matrix's rows and columns affect the sign of the determinant. Visually, position (0,0) is always +, and each adjacent cell alternates, exactly like a checkerboard.
How is the cofactor matrix used to compute the determinant?
Cofactor expansion computes the determinant as the sum of each entry in any single row (or column) multiplied by its corresponding cofactor: det(A) = a₀₀C₀₀ + a₀₁C₀₁ + a₀₂C₀₂ (expanding along the first row of a 3x3 matrix). This works for expansion along any row or column — they all yield the identical determinant value.
How does the cofactor matrix relate to the adjoint (adjugate) matrix?
The adjoint (or adjugate) matrix is simply the transpose of the cofactor matrix: adj(A) = Cᵀ. This relationship is the key building block of the matrix inverse formula, A⁻¹ = adj(A) / det(A), which is why computing the cofactor matrix is usually the first step toward finding a matrix inverse by hand.
Why is the cofactor expansion method rarely used for large matrices in practice?
Cofactor expansion has factorial time complexity, since each cofactor itself requires computing a smaller determinant recursively — an n×n matrix requires on the order of n! operations. For anything larger than a 4x4 matrix, numerical methods like LU decomposition (cubic time complexity) are dramatically faster and are what virtually all computer algebra and linear algebra software libraries use internally.
Can the cofactor matrix be used for anything besides finding the determinant or inverse?
Yes — cofactors appear in Cramer's Rule for solving systems of linear equations, in computing the classical adjoint used in some symbolic proofs, and in certain formulas from differential geometry and control theory that rely on the adjugate matrix directly rather than the full inverse (useful when the determinant is zero or symbolic, since adj(A) is still well-defined even when A itself is singular).
What does it mean if all the cofactors in a row are zero?
If an entire row (or column) of cofactors is zero, expanding the determinant along that row would yield zero regardless of the entries themselves multiplying them — though this alone doesn't necessarily mean the determinant of A is zero unless you're expanding along that specific row. It typically signals a structural pattern in the matrix, such as a row of the minor matrices consistently canceling out.
What happens if you multiply one row's entries by another row's cofactors?
You always get zero. Pairing the entries of row i with the cofactors of a different row k computes the determinant of a matrix in which row k has been replaced by a copy of row i, and a matrix with two identical rows has determinant zero. This so-called alien cofactor expansion is exactly why A multiplied by the adjugate gives det(A) on the diagonal and zeros everywhere else, which is what makes the inverse formula work.
Which row or column should you expand along to save work?
Choose the row or column containing the most zeros, because any entry equal to zero kills its cofactor term before you ever compute that minor. Expanding a 3x3 along a row with two zeros needs only one 2x2 determinant instead of three. Every row and column yields the same determinant, so the choice is purely about effort. You can also apply row operations first, since adding a multiple of one row to another leaves the determinant unchanged and can manufacture zeros.
Is there a vector interpretation of the cofactors of a 3x3 matrix?
Yes. Treat the three rows as vectors a, b and c. The first row of the cofactor matrix is the cross product b x c, the second is c x a, and the third is a x b. The determinant is then the scalar triple product a dot (b x c), the signed volume of the parallelepiped spanned by the three rows. This is why a determinant of zero means the rows are coplanar and the matrix is singular, and it also explains the appearance of the adjugate when transforming surface normals in graphics.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator · Editorial policy
Related Calculators
🧮Matrix Exponential Calculator
Calculate matrix exponential with inputs, formulas, and instant results.
🧮Matrix Addition and Subtraction Calculator
Calculate matrix addition and subtraction with inputs, formulas, and instant results.
🧮Matrix by Scalar Calculator
Calculate matrix by scalar with inputs, formulas, and instant results.
🧮Matrix Determinant Calculator
Calculate matrix determinant with inputs, formulas, and instant results.
🧮Matrix Multiplication Calculator
Calculate matrix multiplication with inputs, formulas, and instant results.
🧮Matrix Norm Calculator
Calculate matrix norm with inputs, formulas, and instant results.
🧮Matrix Power Calculator
Calculate matrix power with inputs, formulas, and instant results.
🧮Matrix Rank Calculator
Calculate matrix rank with inputs, formulas, and instant results.