The inverse of a matrix \( A^{-1} \) is a matrix such that when multiplied with the original matrix, it yields the identity matrix. The inverse exists only if the determinant of the matrix is non-zero.
\[ A^{-1} = \frac{1}{|A|} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} \]
This formula gives the inverse of a 2×2 matrix. Here, \( |A| = ad - bc \), and the elements are rearranged with sign changes.
\[ A^{-1} = \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix}^{-1} = \frac{1}{|A|} \begin{bmatrix} A & D & G \\ B & E & H \\ C & F & I \end{bmatrix}^T \]
This is the inverse of a 3×3 matrix using the adjoint and determinant. The matrix of cofactors is transposed to form the adjugate matrix.
\[ |A| = a(ei - fh) - b(id - fg) + c(dh - eg) \]
This is the determinant of the 3×3 matrix, which is used in the denominator of the inverse formula.
\[ A = (ei - fh), \quad D = -(bi - ch), \quad G = (bf - ce) \]
\[ B = -(di - fg), \quad E = (ai - cg), \quad H = -(af - cd) \]
\[ C = (dh - eg), \quad F = -(ah - bg), \quad I = (ae - bd) \]
These are the cofactors of the original 3×3 matrix. They are used to form the adjugate matrix, which is then divided by the determinant.