Exact linear algebra tool

Advanced 3×3 Matrix Cofactor Calculator

Calculate every minor, cofactor, determinant expansion, adjugate, and inverse. Follow exact steps, verify results, export data, and learn each method clearly.

Selected cofactor
C11 = 24
Minor M11 = 24. The sign is positive.
Determinant
22
Inverse status
Available
Original matrix A
123
045
106
Matrix of minors M
24-5-4
123-2
-254
Cofactor matrix C
245-4
-1232
-2-54
Adjugate adj(A) = Cᵀ
24-12-2
53-5
-424
Inverse matrix A⁻¹
12/11-6/11-1/11
5/223/22-5/22
-2/111/112/11

Matrix classification

Nonsingular Invertible
Transpose matrix Aᵀ
101
240
356

Trace and rank

Trace: 11
Rank: 3

Characteristic polynomial

λ³ − 11λ² + 31λ − 22 = 0

Approximate eigenvalues

Numerical roots of the characteristic polynomial are shown below.

λ1
1.979518 − 0.294345i
λ2
1.979518 + 0.294345i
λ3
7.040965
Eigenvalues are numerical estimates. Cofactors, determinants, adjugates, and inverses remain exact.

Result actions

Copy, export, print, or share this calculation.
Session history enabled
Download CSV Download JSON

Enter your 3×3 matrix

Use integers, decimals, fractions, or scientific notation.

Choose a cofactor

Select any cell to inspect its minor and sign.

Number formatting

Keep exact fractions or switch to decimal presentation.

Presets

Load a useful matrix instantly.

Random generator

Paste or import

Commas, spaces, tabs, semicolons, lines, and LaTeX bmatrix syntax are supported.

Cofactor signs

+
+
+
+
+
Cij = (−1)i+jMij
Shortcut: Ctrl + Enter calculates.
View result area

Step-by-step cofactor calculation

The selected position removes one row and one column. The remaining 2×2 determinant becomes the minor.

Selected position C11

  1. Select row 1 and column 1.
  2. Delete that row and column from matrix A.
  3. Calculate the remaining determinant:
    (4 × 6) − (5 × 0)
  4. Minor value: M11 = 24
  5. Apply sign +: C11 = 24

Surviving 2×2 minor matrix

4 5
0 6

Interactive cofactor walkthrough

Move through the selected calculation one stage at a time.

Step 1: Start with C11 in the original matrix.
Step 2: Remove row 1 and column 1.
Step 3: Form the surviving 2×2 matrix and evaluate (4 × 6) − (5 × 0).
Step 4: The minor equals 24.
Step 5: Apply the positive sign. The cofactor equals 24.
Step 1 of 5

All nine cofactor details

Each card shows its deleted row, deleted column, minor, sign, and final cofactor.

C11

Sign +
Remove row 1 and column 1.
(4 × 6) − (5 × 0)
M11 = 24
C11 = 24

C12

Sign −
Remove row 1 and column 2.
(0 × 6) − (5 × 1)
M12 = -5
C12 = 5

C13

Sign +
Remove row 1 and column 3.
(0 × 0) − (4 × 1)
M13 = -4
C13 = -4

C21

Sign −
Remove row 2 and column 1.
(2 × 6) − (3 × 0)
M21 = 12
C21 = -12

C22

Sign +
Remove row 2 and column 2.
(1 × 6) − (3 × 1)
M22 = 3
C22 = 3

C23

Sign −
Remove row 2 and column 3.
(1 × 0) − (2 × 1)
M23 = -2
C23 = 2

C31

Sign +
Remove row 3 and column 1.
(2 × 5) − (3 × 4)
M31 = -2
C31 = -2

C32

Sign −
Remove row 3 and column 2.
(1 × 5) − (3 × 0)
M32 = 5
C32 = -5

C33

Sign +
Remove row 3 and column 3.
(1 × 4) − (2 × 0)
M33 = 4
C33 = 4

Determinant expansions

Every row and column must produce the same determinant.

Row 1
22
Column 1
22
Row 2
22
Column 2
22
Row 3
22
Column 3
22
Recommended expansion: Row 2. It contains 1 zero value.

Verification and consistency checks

Independent calculations should agree. An invertible matrix must multiply by its inverse to produce the identity matrix.

Expansion agreement

All six expansions agree exactly.

Adjugate construction

The adjugate equals the transpose of the cofactor matrix.

Inverse verification

A × A⁻¹ equals the identity matrix exactly.

Product A × A⁻¹

Verification product
100
010
001

Calculation history

The latest twenty calculations are stored in this browser session.

No saved calculations are available yet.

Example matrices and expected behavior

Use these examples to test signs, exact fractions, singularity, symmetry, triangular structure, and inverse calculations.

Basic integer matrix

[ 1 2 3 ] [ 0 4 5 ] [ 1 0 6 ]

A nonsingular example with varied minors and cofactors.

Identity matrix

[ 1 0 0 ] [ 0 1 0 ] [ 0 0 1 ]

The cofactor matrix, adjugate, and inverse all remain identity.

Singular matrix

[ 1 2 3 ] [ 2 4 6 ] [ 1 1 1 ]

Two dependent rows force the determinant to zero.

Symmetric matrix

[ 2 -1 3 ] [ -1 4 0 ] [ 3 0 5 ]

The matrix equals its transpose and remains easy to verify.

Upper triangular

[ 4 2 -1 ] [ 0 3 5 ] [ 0 0 2 ]

The determinant equals the product of diagonal entries.

Fraction matrix

[ 1/2 2/3 -1/4 ] [ 3/5 7/8 2 ] [ -3/2 4/9 5/6 ]

Exact rational arithmetic avoids decimal rounding.

Decimal matrix

[ 1.25 -2.5 0.75 ] [ 3.1 4.2 -1.6 ] [ 0 2.25 5.5 ]

Finite decimals are converted into exact fractions.

Sparse matrix

[ 5 0 0 ] [ 0 -2 0 ] [ 7 0 3 ]

Zero-heavy rows or columns simplify cofactor expansion.

Skew-symmetric matrix

[ 0 2 -3 ] [ -2 0 4 ] [ 3 -4 0 ]

The transpose equals the negative matrix.

Scalar matrix

[ 4 0 0 ] [ 0 4 0 ] [ 0 0 4 ]

Every diagonal entry matches and off-diagonal entries vanish.

Negative values

[ -2 3 -1 ] [ 4 -5 6 ] [ 7 0 -8 ]

Sign handling is visible across all nine cofactors.

Scientific notation

[ 1e2 2.5e-1 -3e0 ] [ 4e-2 5 6e1 ] [ 7 8e-1 9 ]

Scientific inputs are converted into exact rational values.

Example data table

Example Primary purpose Expected observation
IdentityBaseline verificationDeterminant and every diagonal cofactor equal one.
SingularInverse failureDeterminant equals zero, so no inverse exists.
Upper triangularFast determinant checkDiagonal product matches the cofactor expansion.
Fraction matrixExact arithmeticResults remain rational without floating-point loss.
Sparse matrixExpansion strategyThe zero-heavy row or column is recommended.
Symmetric matrixClassificationThe matrix equals its transpose.

Generic symbolic 3×3 cofactor template

Use this reference when your matrix entries are variables rather than numbers.

A = [[a,b,c],[d,e,f],[g,h,i]]
C₁₁ = ei − fh
C₁₂ = fg − di
C₁₃ = dh − eg
C₂₁ = ch − bi
C₂₂ = ai − cg
C₂₃ = bg − ah
C₃₁ = bf − ce
C₃₂ = cd − af
C₃₃ = ae − bd
det(A) = a(ei − fh) + b(fg − di) + c(dh − eg)

Formula used

A cofactor combines a 2×2 minor determinant with an alternating sign.

Minor formula

Mij = det(A after removing row i and column j)

Cofactor formula

Cij = (−1)i+jMij

2×2 determinant

det([[a,b],[c,d]]) = ad − bc

3×3 determinant

det(A) = ai1Ci1 + ai2Ci2 + ai3Ci3

Adjugate

adj(A) = Cᵀ

Inverse

A⁻¹ = adj(A) / det(A), when det(A) ≠ 0

How to use this calculator

Enter one value into each matrix cell. Fractions such as 3/4 remain exact. Decimal and scientific inputs are also accepted.

Select a cofactor position from the nine buttons. The calculator removes its row and column. It then displays the surviving minor matrix.

Choose an output style before calculating. Exact mode is best for algebra. Decimal mode supports configurable precision and scientific notation.

Press the main calculation button. Results appear above the form. Every minor, cofactor, determinant expansion, and adjugate becomes available.

Check the inverse section when the determinant is nonzero. The calculator multiplies A by A⁻¹. Exact identity confirms the inverse calculation.

Use CSV for spreadsheet analysis. JSON supports development workflows. The print button opens a PDF-ready report through your browser.

Understanding matrix minors

A minor belongs to one matrix position. Remove that position's entire row. Then remove its entire column.

The four surviving entries form a 2×2 matrix. Multiply its main diagonal entries. Subtract the opposite diagonal product.

This determinant becomes Mij. Minors do not include the checkerboard sign. Cofactors apply that sign afterward.

Understanding cofactor signs

The top-left cofactor uses a positive sign. Signs then alternate across every row. The second row begins negatively.

The sign can be found using (−1)i+j. Even exponents give positive one. Odd exponents give negative one.

Sign mistakes are extremely common. This calculator displays the sign matrix. Each detailed card also names its sign.

Determinant expansion choices

A determinant can expand along any row. It can also expand along any column. All six methods must agree.

Choose a row containing many zeros. Zero terms disappear immediately. This often reduces manual calculations significantly.

The calculator evaluates every expansion independently. It compares each result with the first-row determinant. Agreement validates consistency.

Adjugate and inverse relationship

The cofactor matrix keeps each cofactor in place. The adjugate transposes this matrix. Rows become columns during transposition.

The inverse divides every adjugate entry by the determinant. This division requires a nonzero determinant. Singular matrices therefore lack inverses.

Exact fraction output is valuable here. Decimal rounding can hide cancellation. Rational arithmetic preserves the exact algebraic structure.

Precision and formatting

Exact mode returns simplified fractions. Mixed mode converts improper fractions. Decimal mode rounds only the displayed result.

Trailing zeros can be removed automatically. Scientific notation helps with large magnitudes. Negative zero is normalized to zero.

Input decimals are converted to fractions first. This avoids common binary floating-point errors. Calculation steps therefore stay exact.

Verification methods

First compare all determinant expansions. Every row and column should match. A mismatch usually indicates a sign error.

Next verify the adjugate. It must equal the cofactor transpose. Finally multiply A by the proposed inverse.

The product must equal the identity matrix. Exact arithmetic makes this test decisive. No tolerance threshold is required.

Matrix classification

A singular matrix has zero determinant. A nonsingular matrix has nonzero determinant. Only nonsingular matrices are invertible.

A diagonal matrix has zeros outside its diagonal. A scalar matrix also has matching diagonal values. Identity uses diagonal ones.

Symmetric matrices equal their transpose. Skew-symmetric matrices equal the negative transpose. Triangular matrices contain structured zero regions.

Input validation and safe limits

Every matrix cell must contain a valid number. Fraction denominators cannot equal zero. Unsupported symbols trigger clear messages.

The calculator limits very long integers. This protects native integer arithmetic. Use moderately sized exact values for reliable calculations.

Scientific exponents also have practical limits. Very large exponents can exceed server integers. Smaller scaled values remain fully supported.

Copying and exporting results

Copy buttons place matrices on your clipboard. Plain text works in notes. LaTeX works in technical documents.

CSV files contain labeled matrix sections. JSON files preserve nested structures. Both formats include determinant and selected cofactor data.

The share link stores nine input values. Opening that link reloads the matrix. Session history remains private to the current browser session.

Accessibility and keyboard navigation

Every matrix field includes an explicit accessible label. Buttons support normal keyboard activation. Focus indicators remain visible.

Use arrow keys between matrix cells. Press Control and Enter to calculate. Escape returns focus to the first cell.

Responsive layouts adapt across screen sizes. Large screens show three columns. Smaller screens use two or one.

Feature overview

The calculator combines computation, teaching, validation, history, and export capabilities in one page.

Exact fractions

Simplifies rational values throughout every operation.

Decimal mode

Shows configurable precision without changing exact calculations.

Mixed fractions

Displays improper fractions as readable mixed values.

Nine cofactors

Calculates every Cij position in one submission.

Nine minors

Builds each surviving 2×2 minor determinant.

All expansions

Checks three rows and three columns independently.

Adjugate

Transposes the completed cofactor matrix automatically.

Inverse

Builds A⁻¹ whenever the determinant is nonzero.

Identity check

Verifies A multiplied by A⁻¹ exactly.

Classification

Detects singular, symmetric, diagonal, sparse, and triangular forms.

CSV export

Creates spreadsheet-ready labeled result data.

JSON export

Creates structured output for programming workflows.

PDF printing

Uses a dedicated print layout for browser PDF saving.

Share links

Encodes the input matrix inside a reusable URL.

History

Stores the latest calculations during the active session.

Presets

Loads identity, singular, symmetric, decimal, and fraction examples.

Random matrices

Generates values inside a selected integer range.

Paste import

Reads nine values from common separators and lines.

Responsive layout

Uses three, two, or one column automatically.

Accessible labels

Names every cell by row and column for assistive technology.

Keyboard shortcuts

Supports faster navigation and calculation without a mouse.

Error reporting

Identifies invalid numbers and prohibited denominators.

Scientific notation

Accepts and displays powers of ten when requested.

LaTeX copy

Copies publication-friendly matrix syntax.

JSON API mode

Returns direct machine-readable results through query parameters.

Common calculation mistakes

Wrong sign: Minors and cofactors differ on negative checkerboard positions.
Wrong deletion: Remove the selected row and column, not only the selected entry.
Diagonal reversal: A 2×2 determinant uses ad minus bc.
Missing transpose: The adjugate is the cofactor matrix transpose.
Dividing by zero: Singular matrices cannot produce an inverse.
Early rounding: Keep fractions exact until the final display step.
Expansion mismatch: Every row and column must return one determinant.
Index confusion: Matrix positions start with row one and column one.
Input overflow: Extremely large integers can exceed native server limits.

Frequently asked questions

These answers cover cofactor rules, determinant methods, inverse conditions, formatting, exports, and troubleshooting.

What is a cofactor in a 3×3 matrix?

A cofactor is a signed minor. Remove one row and column, calculate the remaining 2×2 determinant, then apply the checkerboard sign.

What is the difference between a minor and a cofactor?

A minor is only the smaller determinant. A cofactor multiplies that minor by positive or negative one using the position sign.

Why do cofactor signs alternate?

The factor (−1) raised to i+j creates alternating signs. Even sums are positive, while odd sums are negative.

Can I expand the determinant along any row?

Yes. Any row or column gives the same determinant when all signs and products are correct.

Which row should I choose manually?

Choose a row or column containing the most zeros. Zero terms vanish and reduce the amount of arithmetic.

When does a 3×3 matrix have an inverse?

An inverse exists exactly when the determinant is nonzero. A zero determinant means the matrix is singular.

How is the adjugate calculated?

First build the full cofactor matrix. Then transpose it by swapping rows and columns.

Why is the inverse formula divided by the determinant?

The adjugate satisfies A times adj(A) equals det(A) times identity. Dividing by det(A) isolates the identity product.

Does the calculator support fractions?

Yes. Enter values such as 2/3 or -7/5. Denominators must not equal zero.

Are decimal inputs exact?

Finite decimals are converted into rational values before calculations. This avoids many floating-point rounding errors.

Can I use scientific notation?

Yes. Inputs such as 1e3, 2.5e-2, and -4E1 are supported within practical integer limits.

Why was my large input rejected?

Native PHP integers have finite limits. Very long digits or extreme exponents can overflow exact arithmetic.

What does singular mean?

A singular matrix has determinant zero. Its rows or columns are linearly dependent, so no inverse exists.

What does nonsingular mean?

A nonsingular matrix has a nonzero determinant. It is invertible and has a unique matrix inverse.

How can I verify the inverse?

Multiply the original matrix by the inverse. The result must equal the 3×3 identity matrix.

Why compare six determinant expansions?

Agreement across three rows and three columns strongly checks sign placement and arithmetic consistency.

Can cofactors be zero?

Yes. A cofactor is zero whenever its 2×2 minor determinant is zero.

Is the cofactor matrix always symmetric?

No. It may be symmetric for special matrices, but symmetry is not guaranteed.

Is the adjugate the same as the cofactor matrix?

Not generally. The adjugate is the transpose of the cofactor matrix.

What is a sparse matrix?

A sparse matrix contains many zero entries. This calculator labels a 3×3 matrix sparse when at least five entries are zero.

What is a diagonal matrix?

A diagonal matrix contains zeros outside the main diagonal. Its determinant is the diagonal product.

What is a scalar matrix?

A scalar matrix is diagonal and has equal diagonal entries. It equals a scalar multiplied by identity.

What is a symmetric matrix?

A symmetric matrix equals its transpose. Entry aij equals entry aji for every position.

What is a skew-symmetric matrix?

A skew-symmetric matrix equals the negative transpose. Its diagonal entries must therefore be zero.

What is an upper triangular matrix?

Every entry below the main diagonal equals zero. Its determinant is the product of diagonal entries.

What is a lower triangular matrix?

Every entry above the main diagonal equals zero. Its determinant also equals the diagonal product.

How do I export results to CSV?

Calculate a valid matrix, then press Download CSV. The file contains labeled input, minor, cofactor, adjugate, and inverse sections.

What does the JSON export contain?

It contains nested matrices, determinant data, selected cofactor data, classifications, expansions, and verification results.

How do I save a PDF?

Press Print or save PDF. Choose your browser's PDF destination in the printing dialog.

How does the share link work?

The link encodes the nine matrix values. Opening it reloads those inputs without storing them on an external service.

How long does history remain?

History is stored in the current PHP session. It can disappear after session expiration or browser data changes.

Can I restore an older matrix?

Yes. Use the Restore button beside any history entry. The saved nine values return to the calculator.

Why is there no inverse result?

The determinant equals zero, or the input was invalid. Review the determinant status and any error message.

Can I calculate one cofactor only?

Select the desired Cij button. The page emphasizes that cofactor while still calculating all values for verification.

Why are exact fractions recommended?

They prevent rounding drift, preserve algebraic cancellation, and make determinant and inverse verification exact.

What does mixed fraction mode do?

It changes only presentation. Improper fractions appear as whole numbers plus proper fractions.

What does trimming zeros do?

Decimal values lose unnecessary ending zeros. For example, 2.500000 becomes 2.5.

What is negative-zero correction?

Rounded results sometimes display as -0. The formatter normalizes that value to ordinary zero.

Can I paste spreadsheet data?

Yes. Paste nine values separated by spaces, tabs, commas, semicolons, vertical bars, or new lines.

What keyboard shortcuts are available?

Control plus Enter calculates. Arrow keys move between matrix fields. Escape returns focus to the first field.

Developer and integration notes

This single file can serve as a standalone educational calculator.

Server requirements

  • PHP 7.4 or newer is recommended.
  • Sessions must be enabled for history and exports.
  • No database is required.
  • No PHP package manager is required.
  • Bootstrap assets are loaded from public CDNs.

Security controls

  • POST actions use a session CSRF token.
  • Displayed values use HTML escaping.
  • Export data comes from validated session results.
  • Share tokens accept exactly nine values.
  • Integer and exponent limits reduce overflow risks.

Progressive enhancement

  • Core calculations run on the server.
  • JavaScript improves selection and copying.
  • The form still submits without advanced scripts.
  • Print rules create a clean report.
  • Responsive controls remain touch friendly.

Possible extensions

  • Add symbolic algebra through a dedicated engine.
  • Store named calculations in a database.
  • Use ?api=1&values=1,2,3,0,4,5,1,0,6 for direct JSON output.
  • Combine ?api=1 with a generated m share token.
  • Add larger matrix dimensions.
  • Generate server-side PDF reports.
Copied to clipboard.

Related Calculators

Average Calculator StatisticsGeometric Mean CalculatorInter Quartile Range CalculatorLower Quartile CalculatorMaximum CalculatorMean Calculator StatisticsMedian Calculator StatisticsMidhinge Calculator StatisticsMid Range Calculator StatisticsMode Calculator Statistics

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.