Type to search, in English or Thai

  1. Home
  2. Articles
  3. Vectors & Linear Algebra
  4. Determinant and inverse

// Article · Linear algebra

How to Find the Determinant and Inverse Matrix (2×2 and 3×3) with Examples

The determinant tells you whether a matrix is invertible, and the inverse is used to solve systems of equations such as the currents in a multi-loop circuit. This article walks through the hand calculations with examples checked by multiplying back.

By Ajarn ModUpdated
30-second summary
  • 2×2: det⁡(abcd)=ad−bc\det\begin{pmatrix}a&b\\c&d\end{pmatrix}=ad-bc
  • 3×3: expand along the first row with cofactors (alternating signs + − ++\,-\,+)
  • Inverse: A−1=1det⁡Aadj⁡(A)A^{-1}=\dfrac{1}{\det A}\operatorname{adj}(A), which exists only when det⁡A≠0\det A\ne0

The 2×2 determinant

det⁡(abcd)=ad−bc\det\begin{pmatrix}a&b\\c&d\end{pmatrix}=ad-bc

Example: det⁡(4726)=4⋅6−7⋅2=24−14=10\det\begin{pmatrix}4&7\\2&6\end{pmatrix}=4\cdot6-7\cdot2=24-14=10

The 3×3 determinant by cofactors

Expand along the first row: multiply each entry by the 2×2 determinant that remains when its row and column are removed, with alternating signs +,−,++,-,+.

det⁡A=a11M11−a12M12+a13M13\det A=a_{11}M_{11}-a_{12}M_{12}+a_{13}M_{13}
Example

A=(2130−14125)A=\begin{pmatrix}2&1&3\\0&-1&4\\1&2&5\end{pmatrix}

  1. det⁡A=2∣−1425∣−1∣0415∣+3∣0−112∣\det A=2\begin{vmatrix}-1&4\\2&5\end{vmatrix}-1\begin{vmatrix}0&4\\1&5\end{vmatrix}+3\begin{vmatrix}0&-1\\1&2\end{vmatrix}
  2. =2(−5−8)−1(0−4)+3(0+1)=−26+4+3=2(-5-8)-1(0-4)+3(0+1)=-26+4+3

det⁡A=−19\det A=-19 (not zero, so the inverse exists)

For 3×3 you can also use the Sarrus rule: copy the first two columns to the right, add the products along the three downward diagonals and subtract the products along the three upward diagonals. The result is the same.

The 2×2 inverse (shortcut formula)

(abcd)−1=1ad−bc(d−b−ca)\begin{pmatrix}a&b\\c&d\end{pmatrix}^{-1}=\frac{1}{ad-bc}\begin{pmatrix}d&-b\\-c&a\end{pmatrix}

Swap aa and dd, change the signs of bb and cc, then divide by the determinant.

Example

N=(4726)N=\begin{pmatrix}4&7\\2&6\end{pmatrix}

  1. N−1=110(6−7−24)=(0.6−0.7−0.20.4)N^{-1}=\frac{1}{10}\begin{pmatrix}6&-7\\-2&4\end{pmatrix}=\begin{pmatrix}0.6&-0.7\\-0.2&0.4\end{pmatrix}
  2. Check: the first row of NN times the first column of N−1N^{-1}

    4(0.6)+7(−0.2)=2.4−1.4=14(0.6)+7(-0.2)=2.4-1.4=1

And 4(−0.7)+7(0.4)=04(-0.7)+7(0.4)=0, 2(0.6)+6(−0.2)=02(0.6)+6(-0.2)=0, 2(−0.7)+6(0.4)=12(-0.7)+6(0.4)=1, so NN−1=INN^{-1}=I ✓

The 3×3 inverse with the adjugate

Steps: (1) find the cofactor matrix CC; (2) swap rows and columns (transpose) to get adj⁡(A)=CT\operatorname{adj}(A)=C^{T}; (3) divide by det⁡A\det A.

Continuing the example AA above

Find A−1A^{-1}

  1. Cofactors Cij=(−1)i+jMijC_{ij}=(-1)^{i+j}M_{ij}

    C=(−134117−37−8−2)C=\begin{pmatrix}-13&4&1\\1&7&-3\\7&-8&-2\end{pmatrix}
  2. Transpose

    adj⁡(A)=CT=(−131747−81−3−2)\operatorname{adj}(A)=C^{T}=\begin{pmatrix}-13&1&7\\4&7&-8\\1&-3&-2\end{pmatrix}
  3. Divide by det⁡A=−19\det A=-19

    A−1=119(13−1−7−4−78−132)A^{-1}=\frac{1}{19}\begin{pmatrix}13&-1&-7\\-4&-7&8\\-1&3&2\end{pmatrix}

Check: the first row of AA times the first column of A−1A^{-1}: 119(2(13)+1(−4)+3(−1))=1919=1\dfrac{1}{19}\big(2(13)+1(-4)+3(-1)\big)=\dfrac{19}{19}=1 ✓ and the first row times the second column: 119(2(−1)+1(−7)+3(3))=0\dfrac{1}{19}\big(2(-1)+1(-7)+3(3)\big)=0 ✓

What it is used for

  • Solving systems of equations: Ax=b⇒x=A−1bA\mathbf{x}=\mathbf{b}\Rightarrow\mathbf{x}=A^{-1}\mathbf{b}, for example the loop currents in a multi-loop electric circuit.
  • Checking for a unique solution: if det⁡A≠0\det A\ne0 the system has exactly one solution.
  • Eigenvalues: found from det⁡(A−λI)=0\det(A-\lambda I)=0, used in the stability analysis of state-space systems.

Keep learning in the library

The full lessons are in Thai, with English technical terms and the same formulas.

Frequently asked questions

What does a zero determinant mean?

The matrix is singular and has no inverse, and the system Ax=bA\mathbf{x}=\mathbf{b} does not have a unique solution: it has either no solution or infinitely many. The rows or columns of the matrix are linearly dependent.

Can the Sarrus rule be used for a 4×4 matrix?

No. The Sarrus rule (drawing diagonals) works only for 3×3. Larger matrices use cofactor expansion or row operations down to a triangular matrix.

Why do we divide by the determinant when finding the inverse?

Because A adj⁡(A)=det⁡(A) IA\,\operatorname{adj}(A)=\det(A)\,I, so we must divide by det⁡(A)\det(A) to get the identity matrix. That is impossible when det⁡(A)=0\det(A)=0.

Which method is preferred for finding an inverse in practice?

By hand, use the shortcut formula for 2×2, and the adjugate or row operations (Gauss–Jordan) for 3×3. In computer programs one usually solves Ax=bA\mathbf{x}=\mathbf{b} by factorisation without forming the inverse explicitly, for better accuracy.

All 7 articles in Vectors & Linear Algebra → · All articles