Last verified · v1.0
Calculator · math
Cofactor Calculator (3×3 Matrix)
Calculate cofactor C(i,j) of a 3×3 matrix using cofactor expansion. Enter matrix values and target position to get the signed minor instantly.
Inputs
Cofactor Value
—
Explain my result
Get a plain-English breakdown of your result with practical next steps.
The formula
How the
result is
computed.
What Is a Cofactor? Definition and Core Formula
A cofactor is a signed version of a matrix minor, and it plays a central role in determinant calculation, matrix inversion, and Cramer's Rule. For any element at row i and column j in a matrix A, the cofactor Cij is defined by:
Cij = (−1)i+j · Mij
Here, Mij is the minor — the determinant of the 2×2 submatrix that remains after row i and column j are deleted from the original 3×3 matrix. The factor (−1)i+j applies the alternating sign that distinguishes a cofactor from its corresponding minor.
Variables Explained
- a11 through a33 — The nine elements of the 3×3 input matrix, arranged in three rows and three columns. Each element occupies a unique (i, j) position.
- i, j — The 1-indexed row and column of the target element. These determine which row and column to delete when forming the 2×2 minor submatrix.
- Mij — The minor: the determinant of the 2×2 submatrix obtained by removing row i and column j. For a 2×2 matrix [[p, q],[r, s]], the determinant is ps − qr.
- (−1)i+j — The sign factor. When i + j is even the result is +1; when i + j is odd the result is −1.
- Cij — The cofactor, the final signed minor at position (i, j).
The 3×3 Cofactor Sign Pattern
For a 3×3 matrix, the alternating sign (−1)i+j generates the following checkerboard pattern across all nine positions:
- Row 1: C11 = +M11, C12 = −M12, C13 = +M13
- Row 2: C21 = −M21, C22 = +M22, C23 = −M23
- Row 3: C31 = +M31, C32 = −M32, C33 = +M33
Memorizing this pattern avoids re-evaluating the exponent each time and reduces calculation errors.
Step-by-Step Calculation Method
- Step 1 — Identify the target position (i, j). Choose the row and column of the element whose cofactor is needed.
- Step 2 — Delete row i and column j. Cross out the entire i-th row and j-th column from the 3×3 matrix. The four remaining entries form a 2×2 submatrix.
- Step 3 — Compute the minor Mij. Evaluate the 2×2 determinant using the formula ps − qr, where p, q, r, s are the four remaining entries in reading order.
- Step 4 — Apply the sign factor. Multiply Mij by (−1)i+j. If i + j is even, Cij = Mij. If i + j is odd, Cij = −Mij.
Worked Example
Consider the matrix A = [[3, 1, −2],[0, 4, 5],[−1, 2, 6]]. To find cofactor C12 (row 1, column 2):
- Delete row 1 and column 2. The remaining entries are [[0, 5],[−1, 6]].
- Compute M12 = (0)(6) − (5)(−1) = 0 + 5 = 5.
- Apply the sign: (−1)1+2 = −1. Therefore C12 = −1 × 5 = −5.
To find C22 from the same matrix: delete row 2 and column 2, leaving [[3, −2],[−1, 6]]. Minor M22 = (3)(6) − (−2)(−1) = 18 − 2 = 16. Sign: (−1)4 = +1. So C22 = 16.
Key Applications of Cofactors
- Determinant via Laplace expansion: The determinant of a 3×3 matrix equals ai1Ci1 + ai2Ci2 + ai3Ci3 along any row i. This result is established formally in DET-0050: The Laplace Expansion Theorem (Ximera/OSU) and derived in detail in Cofactor Expansion and Other Properties of Determinants (Cornell University).
- Adjugate and matrix inverse: The adjugate of A is the transpose of the 3×3 cofactor matrix. The inverse is A−1 = (1/det A) · adj(A), valid when det(A) ≠ 0. This relationship is derived in Cofactor Expansions — Interactive Linear Algebra (Georgia Tech).
- Cramer's Rule: Cofactors underpin the closed-form solution to n×n linear systems, as covered in Determinants and Cramer's Rule (University of Utah).
- Characteristic polynomials: Cofactor expansion of the matrix (A − λI) generates the characteristic polynomial whose roots are the eigenvalues of A.
Reference