| 1 | 2 | 3 |
| 0 | 4 | 5 |
| 1 | 0 | 6 |
| 24 | -5 | -4 |
| 12 | 3 | -2 |
| -2 | 5 | 4 |
| 24 | 5 | -4 |
| -12 | 3 | 2 |
| -2 | -5 | 4 |
| 24 | -12 | -2 |
| 5 | 3 | -5 |
| -4 | 2 | 4 |
| 12/11 | -6/11 | -1/11 |
| 5/22 | 3/22 | -5/22 |
| -2/11 | 1/11 | 2/11 |
Matrix classification
| 1 | 0 | 1 |
| 2 | 4 | 0 |
| 3 | 5 | 6 |
Trace and rank
Characteristic polynomial
Approximate eigenvalues
Numerical roots of the characteristic polynomial are shown below.
Result actions
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
- Select row 1 and column 1.
- Delete that row and column from matrix A.
-
Calculate the remaining determinant:
(4 × 6) − (5 × 0)
- Minor value: M11 = 24
- 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.
All nine cofactor details
Each card shows its deleted row, deleted column, minor, sign, and final cofactor.
C11
Sign +C12
Sign −C13
Sign +C21
Sign −C22
Sign +C23
Sign −C31
Sign +C32
Sign −C33
Sign +Determinant expansions
Every row and column must produce the same determinant.
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⁻¹
| 1 | 0 | 0 |
| 0 | 1 | 0 |
| 0 | 0 | 1 |
Calculation history
The latest twenty calculations are stored in this browser session.
Example matrices and expected behavior
Use these examples to test signs, exact fractions, singularity, symmetry, triangular structure, and inverse calculations.
Basic integer matrix
A nonsingular example with varied minors and cofactors.
Identity matrix
The cofactor matrix, adjugate, and inverse all remain identity.
Singular matrix
Two dependent rows force the determinant to zero.
Symmetric matrix
The matrix equals its transpose and remains easy to verify.
Upper triangular
The determinant equals the product of diagonal entries.
Fraction matrix
Exact rational arithmetic avoids decimal rounding.
Decimal matrix
Finite decimals are converted into exact fractions.
Sparse matrix
Zero-heavy rows or columns simplify cofactor expansion.
Skew-symmetric matrix
The transpose equals the negative matrix.
Scalar matrix
Every diagonal entry matches and off-diagonal entries vanish.
Negative values
Sign handling is visible across all nine cofactors.
Scientific notation
Scientific inputs are converted into exact rational values.
Example data table
| Example | Primary purpose | Expected observation |
|---|---|---|
| Identity | Baseline verification | Determinant and every diagonal cofactor equal one. |
| Singular | Inverse failure | Determinant equals zero, so no inverse exists. |
| Upper triangular | Fast determinant check | Diagonal product matches the cofactor expansion. |
| Fraction matrix | Exact arithmetic | Results remain rational without floating-point loss. |
| Sparse matrix | Expansion strategy | The zero-heavy row or column is recommended. |
| Symmetric matrix | Classification | The matrix equals its transpose. |
Generic symbolic 3×3 cofactor template
Use this reference when your matrix entries are variables rather than numbers.
Formula used
A cofactor combines a 2×2 minor determinant with an alternating sign.
Minor formula
Cofactor formula
2×2 determinant
3×3 determinant
Adjugate
Inverse
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
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,6for direct JSON output. - Combine
?api=1with a generatedmshare token. - Add larger matrix dimensions.
- Generate server-side PDF reports.
Generated by the Advanced 3×3 Matrix Cofactor Calculator.