Enter a square matrix, augment it with the identity matrix, and follow the row operations that turn the left side into the identity. If that cannot happen, the matrix is singular.
Result
The determinant is 10, so the inverse exists
A−1=[53−51−10752]
Conditions
A is a 2 by 2 square matrix.
det(A)=10, which is nonzero.
Entries are kept as exact fractions during row reduction.
Steps
Augment A with the identity Place the 2 by 2 identity matrix beside A.[42761001]
Create the first pivot Swap the rows, divide the new first row by 2, then eliminate the entry below its pivot.[103−50121−2]
Create the second pivot Divide the second row by negative 5 and clear the entry above the pivot.[100153−51−10752]
✓
Independent check
Exact multiplication gives AA^{-1}=I_2 and A^{-1}A=I_2, so both the row operations and entry values are checked.
Scope
What this matrix inverse covers
A square matrix has an inverse exactly when its determinant is nonzero. Row reduction transforms the augmented matrix [A | I] into [I | A^{-1}], and multiplying the reported inverse by A checks the result.
Invert 1 by 1 through 4 by 4 matrices
Use exact Gauss-Jordan row operations on a square matrix with integer, finite decimal, or fractional entries.
Examples: 2 by 2 inverse, 3 by 3 inverse, fractional entries
Detect a singular matrix
Stop when the left block cannot acquire a pivot in every column, rather than displaying a divided-by-zero result.
Examples: dependent rows, zero row, determinant zero
Show the augmented matrix after each operation
Keep the left and right blocks aligned so every row swap, scaling, and replacement can be inspected.
Examples: swap rows 1 and 2, replace row 2 by row 2 minus 4 times row 1
Verify both multiplication orders
Multiply the result on the left and right of A. A true inverse produces the identity in both orders.
Examples: AA^{-1}=I, A^{-1}A=I
How to use it
Enter enough information for one clear task
1
Choose one square size
Set the same number of rows and columns. A rectangular matrix cannot have a two-sided matrix inverse.
2
Enter every matrix entry
Use signed integers, finite decimals, or simple fractions. Exact fractions avoid rounding a small pivot to zero.
3
Follow the pivot operations
Read each elementary row operation from [A | I] until the left block becomes I or a missing pivot proves singularity.
4
Check the identity products
Confirm that multiplying in either order gives diagonal ones and off-diagonal zeros.
Worked inputs
Examples to try
Use these examples to recognize the method, compare equivalent forms, and check your own work.
Two by two with integer determinant
Use exact row reduction or the 2 by 2 inverse formula.
A=[4276]
Expected result
A−1=[53−51−10752]
Diagonal matrix
Replace each nonzero diagonal entry by its reciprocal.
D=[200−5]
Expected result
D−1=[2100−51]
Upper triangular matrix
Pivot in each column and clear the entry above the second pivot.
A=[1023]
Expected result
A−1=[10−3231]
Singular matrix
The second row is twice the first, so the second pivot is missing.
A=[1224]
Expected result
det(A)=0⇒A−1 does not exist
Permutation matrix
Swapping twice restores the original order, so P is its own inverse.
P=[0110]
Expected result
P−1=P
Three by three matrix
Use three pivots and clear every nonpivot entry in the left block.
A=100210012
Expected result
A−1=100−2101−2121
Complete example
Invert a matrix without switching to decimals
The determinant is 1, so an inverse exists and every exact row operation stays especially simple.
A=[2513]
1
Build the augmented matrix
Attach the identity matrix to record how the same row operations transform it.
[25131001]
2
Make a unit first pivot
Replace row 2 by row 2 minus twice row 1, then swap the rows.
[1211−2110]
3
Clear the first column
Replace row 2 by row 2 minus twice row 1, then scale it by negative 1.
[1011−2−512]
4
Clear above the second pivot
Subtract row 2 from row 1 to make the left block the identity.
Why it matters: Entrywise reciprocals do not undo the row and column interactions in matrix multiplication.
Better approach: Reduce [A | I] or use a valid inverse formula, then verify by matrix multiplication.
Ignoring a zero determinant
Problem: Continue dividing by a zero pivot until numbers appear.
Why it matters: A missing pivot means the rows are dependent and no two-sided inverse exists.
Better approach: Try a row swap; if no nonzero pivot is available, report the matrix as singular.
Changing only the left block
Problem: Apply row operations to A but leave I unchanged.
Why it matters: The right block records the same transformations and becomes the inverse only when every operation affects the full augmented row.
Better approach: Apply each swap, scale, or row replacement across the separator.
Rounding before the last row operation
Problem: Replace 1/3 by 0.33 and treat a small remainder as zero.
Why it matters: Early rounding can corrupt pivots and the final identity check.
Better approach: Keep exact fractions throughout, then add a decimal approximation only if it is useful.
Trust the result for the right reasons
Checks, assumptions, and limits
How results are checked
Exact Gauss-Jordan operations are replayed on the full augmented matrix.
The left block must equal the identity before the right block is accepted.
Both AA^{-1} and A^{-1}A are recomputed from the original entries.
A separate determinant check identifies singular square matrices.
When to stop and revise the input
Only square matrices from 1 by 1 through 4 by 4 are accepted.
Entries must be finite real integers, decimals, or simple fractions.
Symbolic parameters and complex entries are outside this release.
A nearly singular decimal matrix may be sensitive to rounding; exact input is preferable.
Common questions
Find a matrix inverse step by step FAQ
How do I know whether a matrix has an inverse?
A square matrix is invertible exactly when its determinant is nonzero. In row reduction, the same fact appears as a pivot in every column of the left block.
Why must the matrix be square?
A two-sided inverse must undo a linear transformation in both orders. A rectangular matrix changes dimension, so it cannot multiply with one matrix to produce both required identity matrices.
What is a singular matrix?
A singular matrix is a square matrix with determinant zero. Its rows or columns are dependent, a pivot is missing, and no ordinary inverse exists.
Why check multiplication in both orders?
For square matrices, either identity product is enough in exact theory, but checking both orders is a practical way to catch a transposed entry or row-operation mistake.
Can I enter fractions in the matrix?
Yes. Simple fractions remain exact during elimination, which avoids the rounding drift that can appear when decimal pivots are used.
Sources and curriculum alignment
This page follows standard introductory mathematics notation and learning sequences. Use these references to continue with a complete course treatment.