Check that the matrix is square
Verify that the determinant is nonzero
For a 2×2 matrix (begin{bmatrix} a & b \ c & d end{bmatrix}), use (;A^{-1}=frac{1}{ad-bc}begin{bmatrix} d & -b \ -c & a end{bmatrix})
For larger matrices, form the augmented matrix ([A mid I])
Apply row operations to transform (A) into the identity matrix
Apply the same row operations to (I)
The transformed right side becomes (A^{-1})
Alternatively, compute (A^{-1}=frac{1}{det(A)}operatorname{adj}(A))
Find the matrix of cofactors
Transpose the cofactor matrix to get the adjugate
Divide the adjugate by (det(A))
Confirm the result by checking (AA^{-1}=I) and (A^{-1}A=I)
