Last verified · v1.0
Calculator · math
Cofactor Matrix Calculator (3×3)
Compute cofactors of a 3×3 matrix using C_ij = (-1)^(i+j) * det(M_ij). Enter 9 matrix elements and a position to get the signed minor determinant instantly.
Inputs
Cofactor C(row,col)
—
Explain my result
Get a plain-English breakdown of your result with practical next steps.
The formula
How the
result is
computed.
Understanding Cofactors and the 3×3 Cofactor Matrix
The cofactor of a matrix element is a signed determinant of a submatrix, forming the foundation for computing determinants, matrix inverses, adjugate matrices, and solutions to linear systems via Cramer's rule. For a 3×3 matrix A, each cofactor Cij is obtained by removing row i and column j, computing the determinant of the remaining 2×2 minor matrix Mij, and applying a positional sign factor. According to the Georgia Tech Interactive Linear Algebra textbook, cofactor expansion (Laplace expansion) is one of the most versatile methods in linear algebra for evaluating determinants of any size. Emory University's Section 3-2 notes further demonstrate that the cofactor matrix is indispensable for deriving the matrix inverse formula.
The Cofactor Formula
For a 3×3 matrix A with element aij at row i and column j, the cofactor at that position is:
Cij = (−1)i+j · det(Mij)
Each variable plays a specific role:
- i — row index, ranging from 1 to 3
- j — column index, ranging from 1 to 3
- Mij — the 2×2 minor matrix formed by deleting the i-th row and j-th column from A
- (−1)i+j — the sign factor: equals +1 when i+j is even, −1 when i+j is odd
- det(Mij) — for a 2×2 matrix [[p, q], [r, s]], this equals ps − qr
The Checkerboard Sign Pattern
The factor (−1)i+j generates an alternating positive and negative pattern across all nine positions of a 3×3 matrix:
+ − +
− + −
+ − +
Corner and center positions (1,1), (1,3), (2,2), (3,1), (3,3) carry a positive sign because i+j is even. Edge-center positions (1,2), (2,1), (2,3), (3,2) carry a negative sign because i+j is odd. Applying the wrong sign is the most common error in cofactor computation.
How to Construct the Minor Matrix Mij
To build Mij from a 3×3 matrix, cross out every element sharing row i or column j. The four surviving elements, arranged in their original relative order, form the 2×2 minor matrix. For example, to find M23, remove all of row 2 and all of column 3, leaving elements from rows 1 and 3 in columns 1 and 2.
Worked Example
Given the matrix A = [[1, 2, 3], [4, 5, 6], [7, 2, 9]], compute the cofactors for the first row:
C11: Delete row 1 and column 1. Minor M11 = [[5, 6], [2, 9]]. det(M11) = (5)(9) − (6)(2) = 45 − 12 = 33. Sign: (−1)1+1 = +1. Result: C11 = +33.
C12: Delete row 1 and column 2. Minor M12 = [[4, 6], [7, 9]]. det(M12) = (4)(9) − (6)(7) = 36 − 42 = −6. Sign: (−1)1+2 = −1. Result: C12 = −(−6) = +6.
C13: Delete row 1 and column 3. Minor M13 = [[4, 5], [7, 2]]. det(M13) = (4)(2) − (5)(7) = 8 − 35 = −27. Sign: (−1)1+3 = +1. Result: C13 = −27.
Verification via first-row cofactor expansion: det(A) = (1)(33) + (2)(6) + (3)(−27) = 33 + 12 − 81 = −36.
Applications of the Cofactor Matrix
- Determinant Calculation: Expanding along any row or column using cofactors yields det(A) = sum of aij · Cij for fixed i or j.
- Adjugate Matrix: The adjugate adj(A) is the transpose of the full 3×3 cofactor matrix and is used directly in the inverse formula.
- Matrix Inverse: A−1 = (1 / det(A)) · adj(A), valid whenever det(A) ≠ 0, as derived in Emory's linear algebra notes.
- Cramer's Rule: Cofactors enable closed-form solutions to systems of 3 linear equations in 3 unknowns, as shown in Cornell University Lecture 17.
- 3D Vector Cross Products: The cross product of two 3D vectors is computed via cofactor expansion of a symbolic 3×3 determinant with unit vectors i, j, k in the first row.
Reference