The cofactor matrix calculator above computes every minor and every cofactor of a square matrix, assembles them into the cofactor matrix, transposes that to give the adjugate, and uses the adjugate to build the inverse where one exists. It shows the cofactor expansion of the determinant term by term, so the arithmetic is visible rather than merely asserted.
Arb Digital publishes it because two adjacent tools on this site stop short of it. Our determinant calculator prints the cofactor expansion along the first row and returns a single number — it uses the cofactors but does not report them. Our matrix inverse calculator inverts by Gauss-Jordan elimination, which never computes a cofactor at all. This page's output is the cofactor matrix and the adjugate themselves, which is what a linear algebra course asks for and what neither of the other two produces.
What This Cofactor Matrix Calculator Does
For every position in the matrix it deletes that row and that column, takes the determinant of what remains — the minor — and attaches the sign from the checkerboard pattern to give the cofactor. Those cofactors are laid out in a matrix of the same size as the original. Transposing that matrix gives the adjugate, sometimes called the classical adjoint, and dividing the adjugate by the determinant gives the inverse.
Three views are available. The cofactor matrix is always shown. Alongside it you can display the adjugate, the unsigned minors, or the inverse. The minors view is the one to use when you are checking hand-worked answers, because it separates the two places where errors creep in: computing the sub-determinant, and getting the sign right.
The tool also runs an identity check that most calculators skip. The determinant of the adjugate must equal the determinant of the original raised to the power n minus one. Both figures are reported so you can see them agree, which is a genuine verification of the whole cofactor computation rather than a restatement of it.
How to Use It
- Enter the matrix one row per line, with values separated by spaces, commas or tabs. It must be square.
- Choose the second view — adjugate, unsigned minors, or inverse — depending on what you are checking.
- Read the cofactor matrix, remembering that the entry in position i, j is the cofactor of the original's position i, j and not the adjugate's.
- Check the expansion bars, which show each term of the first-row cofactor expansion and how they sum to the determinant.
- Confirm the adjugate determinant identity in the grid before you rely on any of the numbers.
The Formula and How It Is Calculated
The minor Mij is the determinant of the submatrix left after deleting row i and column j. The cofactor is that minor with a sign attached: Cij = (−1)i+j Mij. Wolfram MathWorld's page on the cofactor gives exactly that definition, describing the cofactor as a signed version of a minor.
The signs form a checkerboard starting with a plus in the top left: plus, minus, plus along the first row, minus, plus, minus along the second, and so on. The exponent i plus j is even in the plus positions and odd in the minus ones, which is all the formula is saying.
Work the default 3×3 through. For the matrix with rows (1, 2, 3), (4, 5, 6) and (7, 8, 10), the cofactor C₁₁ deletes row 1 and column 1, leaving the 2×2 with rows (5, 6) and (8, 10), whose determinant is 50 − 48 = 2. The sign is plus, so C₁₁ = 2. Next, C₁₂ deletes row 1 and column 2, leaving rows (4, 6) and (7, 10), with determinant 40 − 42 = −2; the sign is minus, so C₁₂ = 2. And C₁₃ leaves rows (4, 5) and (7, 8), determinant 32 − 35 = −3, sign plus, so C₁₃ = −3.
Working through all nine gives the cofactor matrix with rows (2, 2, −3), (4, −11, 6) and (−3, 6, −3). The determinant follows from expanding along the first row: 1×2 + 2×2 + 3×(−3) = 2 + 4 − 9 = −3. Transposing the cofactor matrix gives the adjugate with rows (2, 4, −3), (2, −11, 6) and (−3, 6, −3), and dividing by −3 gives the inverse.
The Adjugate and Where the Inverse Comes From
The adjugate is the transpose of the cofactor matrix, and the transpose step is the one people forget. It matters: for a non-symmetric matrix the cofactor matrix and its transpose are different, and using the wrong one produces an "inverse" that fails every check. Wolfram MathWorld's page on the adjugate matrix covers the object and its relationship to the inverse.
The central identity is A × adj(A) = det(A) × I. It holds for every square matrix, including singular ones, which is the striking part: the adjugate exists and satisfies this even when the determinant is zero and no inverse exists. In that case the product is the zero matrix, and the adjugate turns out to have rank at most one. Dividing by the determinant to get the inverse is legitimate only when the determinant is non-zero, which is why the inverse view reports a written explanation for a singular matrix rather than a page of infinities.
Cramer's rule is the same identity in disguise. The solution to a linear system A x = b has each component equal to a ratio of determinants, and those determinants are exactly the entries of the adjugate acting on b. It is elegant and it is almost never the right way to solve a system numerically — our system of equations calculator uses elimination, which is both faster and more stable.
Why No Real Software Inverts This Way
The cofactor route is exact and conceptually clean, and it is also computationally hopeless beyond about 4×4. Computing an n×n determinant by full cofactor expansion takes on the order of n factorial operations, and you need n squared of those to build the cofactor matrix. For a 10×10 matrix that is billions of operations, against a few hundred for Gaussian elimination, which scales with the cube of the size rather than its factorial.
This tool caps at 6×6 for that reason, and it computes the minors by recursive expansion rather than by elimination precisely so that the numbers match what you would get by hand. That is the right trade-off for a teaching tool and the wrong one for production software. Anything that inverts large matrices uses LU or QR factorisation instead — our LU decomposition calculator shows the general factorisation, and our Cholesky decomposition calculator shows the symmetric positive definite special case.
The cofactor formulation earns its place elsewhere. It gives a closed-form expression for the inverse, which is what you need when the entries are symbolic rather than numeric, and it is how the derivative of a determinant is derived. Jacobi's formula, which expresses that derivative in terms of the adjugate, is used throughout continuum mechanics and differential geometry. The construction is worth knowing even though you would rarely evaluate it numerically.
Facts Worth Knowing About the Adjugate
A handful of identities make good checks and are rarely stated together. The determinant of the adjugate equals the determinant of the original raised to the power n minus one — for a 3×3 with determinant −3, that is 9, which the tool reports in the grid. The adjugate of the adjugate is the original matrix scaled by the determinant raised to the power n minus two, so for a 3×3 it returns A times its determinant.
For a 2×2 the adjugate has a memorable closed form: swap the two diagonal entries and negate the two off-diagonal ones. That is the whole of the familiar 2×2 inverse formula once you divide by the determinant, and it is worth recognising as the general construction rather than a special trick.
The adjugate of a symmetric matrix is symmetric, and the adjugate of an orthogonal matrix is its transpose times its determinant. For a singular matrix of rank exactly n minus one, the adjugate has rank exactly one; for rank below that, the adjugate is entirely zero, because every minor of size n minus one vanishes. Our matrix rank calculator will tell you which case you are in, and our matrix calculator will multiply A by the adjugate so you can verify the identity yourself.
Arb Digital builds free tools that show the intermediate steps and run an independent check on the result.
Browse All Free Tools Talk To Our TeamCommon Mistakes to Avoid
- Forgetting to transpose — the adjugate is the transpose of the cofactor matrix, and for a non-symmetric matrix using the untransposed version gives a wrong inverse.
- Getting the checkerboard sign wrong — the sign is minus one raised to the power of the row plus the column, starting with a plus in the top left position.
- Confusing minors with cofactors — the minor is the unsigned sub-determinant; the cofactor is that minor with the checkerboard sign applied.
- Dividing by a zero determinant — the adjugate always exists, but the inverse does not, and a singular matrix has no inverse however carefully the cofactors are computed.
- Using this method on a large matrix — the work grows factorially, so anything beyond about 4×4 belongs to elimination-based methods instead.
Related Free Tools From Arb Digital
Get the determinant with the expansion written out by the determinant calculator, invert by elimination with the matrix inverse calculator, multiply and transpose with the matrix calculator, find the rank with the matrix rank calculator, or compute the spectrum with the eigenvalue calculator. The full free online tools hub lists every linear algebra tool we publish.
Frequently Asked Questions
The determinant of the submatrix left after deleting one row and one column, multiplied by minus one raised to the power of the row index plus the column index. It is a signed minor.
The minor is the unsigned sub-determinant. The cofactor is the same number with the checkerboard sign attached, which alternates plus and minus starting from a plus in the top left.
The transpose of the cofactor matrix. It is also called the classical adjoint, and dividing it by the determinant gives the inverse whenever the determinant is not zero.
Yes. The adjugate is defined for every square matrix and always satisfies A times the adjugate equals the determinant times the identity. For a singular matrix that product is simply the zero matrix.
A determinant calculator uses the cofactors to reach a single number. This page reports the cofactors themselves, laid out as a matrix, along with the adjugate and the inverse built from it.
Because the work grows factorially with the size. Gaussian elimination scales with the cube of the matrix size, so it is dramatically faster and more numerically stable beyond about four by four.
The determinant of the original matrix raised to the power n minus one, where n is the size. The tool reports both figures so you can confirm they agree.
Swap the two diagonal entries and negate the two off-diagonal ones, then transpose. That produces the familiar 2×2 inverse formula once you divide by the determinant.
This page explains a linear algebra construction for educational purposes. Results are computed in double-precision floating point, so a nearly singular matrix may produce an inverse whose entries are dominated by rounding error.