Inverse Matrix Calculator: 2×2 to 5×5
Calculate an inverse, determinant, cofactor matrix and Gauss–Jordan row operations using exact fractions.
Enter exactly n² valid values for the chosen size. Use spaces or semicolons between entries; fractions must have nonzero denominators.
Sizes 2×2–5×5. Separate entries with spaces, semicolons or newlines in row order. Decimal point or decimal comma, Unicode minus and fractions such as 1/3 are accepted; no spaces inside a fraction. Blank or malformed entries are errors. Input magnitude is at most 10¹² and reduced denominator at most 10²⁴. Exact rational arithmetic determines singularity. The cofactor matrix C satisfies A⁻¹=Cᵀ/det(A); C is still shown for singular matrices. Decimal results show up to 10 significant digits. Fraction mode also makes row-operation coefficients exact; decimal steps are rounded descriptions.
How the calculation works
A⁻¹=Cᵀ/det(A)
Sizes 2×2–5×5. Separate entries with spaces, semicolons or newlines in row order. Decimal point or decimal comma, Unicode minus and fractions such as 1/3 are accepted; no spaces inside a fraction. Blank or malformed entries are errors. Input magnitude is at most 10¹² and reduced denominator at most 10²⁴. Exact rational arithmetic determines singularity. The cofactor matrix C satisfies A⁻¹=Cᵀ/det(A); C is still shown for singular matrices. Decimal results show up to 10 significant digits. Fraction mode also makes row-operation coefficients exact; decimal steps are rounded descriptions.
Frequently asked questions
How is the result calculated?
A⁻¹=Cᵀ/det(A)
What assumptions apply?
Sizes 2×2–5×5. Separate entries with spaces, semicolons or newlines in row order. Decimal point or decimal comma, Unicode minus and fractions such as 1/3 are accepted; no spaces inside a fraction. Blank or malformed entries are errors. Input magnitude is at most 10¹² and reduced denominator at most 10²⁴. Exact rational arithmetic determines singularity. The cofactor matrix C satisfies A⁻¹=Cᵀ/det(A); C is still shown for singular matrices. Decimal results show up to 10 significant digits. Fraction mode also makes row-operation coefficients exact; decimal steps are rounded descriptions.
How precise are the displayed results?
Sizes 2×2–5×5. Separate entries with spaces, semicolons or newlines in row order. Decimal point or decimal comma, Unicode minus and fractions such as 1/3 are accepted; no spaces inside a fraction. Blank or malformed entries are errors. Input magnitude is at most 10¹² and reduced denominator at most 10²⁴. Exact rational arithmetic determines singularity. The cofactor matrix C satisfies A⁻¹=Cᵀ/det(A); C is still shown for singular matrices. Decimal results show up to 10 significant digits. Fraction mode also makes row-operation coefficients exact; decimal steps are rounded descriptions.
How we verified this calculator
The calculator is checked against 6 reference cases computed independently of its code. Last passed: .
| # | Inputs | Expected result |
|---|---|---|
| 1 |
Matrix size = 2×2
Result format = Decimal approximation
Matrix entries in row order = 1 0; 0 1
|
det(A): 1
|
| 2 |
Matrix size = 2×2
Result format = Exact fractions
Matrix entries in row order = 1 0; 0 1
|
det(A): 1
|
| 3 |
Matrix size = 2×2
Result format = Decimal approximation
Matrix entries in row order = 1 2; 3 4
|
det(A): -2
|
| 4 |
Matrix size = 2×2
Result format = Exact fractions
Matrix entries in row order = 1 2; 3 4
|
det(A): -2
|
| 5 |
Matrix size = 2×2
Result format = Decimal approximation
Matrix entries in row order = 1/2 0; 0 1/3
|
det(A): 0.1666666667
|
| 6 |
Matrix size = 2×2
Result format = Exact fractions
Matrix entries in row order = 1/2 0; 0 1/3
|
det(A): 1/6
|