Skip to content
Family Table Math
Auto

Determinants and Inverse Matrices

With ordinary numbers, you solve 5x=155x = 15 by dividing by 55, which is the same as multiplying by 5−15^{-1}. Matrices have no division, but many square matrices have an inverse that does the same job. The determinant, a single number worked out from a square matrix, tells you whether that inverse exists. Together they let you solve whole systems of equations in one step, and they’re the key to codes, transformations and much more.

For a 2×22 \times 2 matrix, the determinant is “leading diagonal minus the other diagonal”:

A=(abcd)⇒det⁡A=∣A∣=ad−bcA = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \qquad \Rightarrow \qquad \det A = |A| = ad - bc

For example, det⁡(4325)=4(5)−3(2)=14\det \begin{pmatrix} 4 & 3 \\ 2 & 5 \end{pmatrix} = 4(5) - 3(2) = 14.

Only square matrices have determinants. For 3×33 \times 3 and larger matrices, use your GDC’s det⁡\det function: in this course you find those with technology, not by hand.

The inverse of a square matrix AA is the matrix A−1A^{-1} that undoes it:

AA−1=A−1A=IAA^{-1} = A^{-1}A = I

For a 2×22 \times 2 matrix: swap the entries on the leading diagonal, change the signs of the other two, and divide by the determinant.

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

For larger matrices, enter AA in the GDC and use A−1A^{-1} (the x−1x^{-1} key). Many GDCs can show the result as fractions.

If det⁡A=0\det A = 0, the formula would divide by zero, and AA has no inverse. Such a matrix is called singular. A matrix with a non-zero determinant is non-singular (or invertible). For a 2×22 \times 2 matrix, det⁡A=0\det A = 0 means one row is a multiple of the other: for example, (6−43−2)\begin{pmatrix} 6 & -4 \\ 3 & -2 \end{pmatrix} has determinant −12−(−12)=0-12 - (-12) = 0.

Any system of linear equations can be written as one matrix equation. For example,

4x+3y=12x+5y=11⟺(4325)⏟A(xy)⏟X=(111)⏟B\begin{aligned} 4x + 3y &= 1 \\ 2x + 5y &= 11 \end{aligned} \qquad \Longleftrightarrow \qquad \underbrace{\begin{pmatrix} 4 & 3 \\ 2 & 5 \end{pmatrix}}_{A}\underbrace{\begin{pmatrix} x \\ y \end{pmatrix}}_{X} = \underbrace{\begin{pmatrix} 1 \\ 11 \end{pmatrix}}_{B}

AA is the coefficient matrix. If AA is invertible, multiply both sides on the left by A−1A^{-1}:

A−1AX=A−1B⇒IX=A−1B⇒X=A−1BA^{-1}AX = A^{-1}B \quad\Rightarrow\quad IX = A^{-1}B \quad\Rightarrow\quad X = A^{-1}B

Order matters. A−1A^{-1} must go on the left of both sides, so the answer is A−1BA^{-1}B, never BA−1BA^{-1}. (If instead the equation is XA=BXA = B, multiply on the right: X=BA−1X = BA^{-1}.) In IB exams, AA will always be invertible in these questions, so each system has a unique solution.

One classic use: turn letters into numbers (A=1A = 1, B=2B = 2, …, Z=26Z = 26), arrange them in columns of a matrix MM, and multiply by a key matrix KK to get the coded matrix C=KMC = KM. Anyone who knows KK decodes with M=K−1CM = K^{-1}C. The key must be invertible, or the message could never be recovered.

Let A=(4325)A = \begin{pmatrix} 4 & 3 \\ 2 & 5 \end{pmatrix}. Find A−1A^{-1} and check your answer.

Solution. det⁡A=4(5)−3(2)=14≠0\det A = 4(5) - 3(2) = 14 \ne 0, so the inverse exists. Swap 44 and 55, negate 33 and 22, and divide by 1414:

A−1=114(5−3−24)A^{-1} = \frac{1}{14}\begin{pmatrix} 5 & -3 \\ -2 & 4 \end{pmatrix}

Check:

AA−1=114(4(5)+3(−2)4(−3)+3(4)2(5)+5(−2)2(−3)+5(4))=114(140014)=I  ✓AA^{-1} = \frac{1}{14}\begin{pmatrix} 4(5) + 3(-2) & 4(-3) + 3(4) \\ 2(5) + 5(-2) & 2(-3) + 5(4) \end{pmatrix} = \frac{1}{14}\begin{pmatrix} 14 & 0 \\ 0 & 14 \end{pmatrix} = I \;\checkmark

Leaving the 114\dfrac{1}{14} outside keeps the fractions out of the way.

Find the values of kk for which (k62k−1)\begin{pmatrix} k & 6 \\ 2 & k - 1 \end{pmatrix} is singular.

Solution. Set the determinant equal to 00:

k(k−1)−6(2)=0k2−k−12=0(k−4)(k+3)=0\begin{aligned} k(k - 1) - 6(2) &= 0 \\ k^2 - k - 12 &= 0 \\ (k - 4)(k + 3) &= 0 \end{aligned}

So k=4k = 4 or k=−3k = -3. For any other value of kk, the matrix has an inverse.

Check k=4k = 4: (4623)\begin{pmatrix} 4 & 6 \\ 2 & 3 \end{pmatrix}, and the first row is twice the second. ✓

Example 3: Solving a 3 × 3 system with an inverse

Section titled “Example 3: Solving a 3 × 3 system with an inverse”

Write this system as AX=BAX = B and solve it using the inverse matrix.

x+y+z=92x−y+3z=133x+2y−4z=−4\begin{aligned} x + y + z &= 9 \\ 2x - y + 3z &= 13 \\ 3x + 2y - 4z &= -4 \end{aligned}

Solution.

(1112−1332−4)(xyz)=(913−4)\begin{pmatrix} 1 & 1 & 1 \\ 2 & -1 & 3 \\ 3 & 2 & -4 \end{pmatrix}\begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 9 \\ 13 \\ -4 \end{pmatrix}

On the GDC, det⁡A=22\det A = 22, which isn’t 00, so A−1A^{-1} exists:

A−1=122(−26417−7−171−3)A^{-1} = \frac{1}{22}\begin{pmatrix} -2 & 6 & 4 \\ 17 & -7 & -1 \\ 7 & 1 & -3 \end{pmatrix}

Then X=A−1BX = A^{-1}B (calculate A−1BA^{-1}B directly on the GDC):

(xyz)=A−1(913−4)=(234)\begin{pmatrix} x \\ y \\ z \end{pmatrix} = A^{-1}\begin{pmatrix} 9 \\ 13 \\ -4 \end{pmatrix} = \begin{pmatrix} 2 \\ 3 \\ 4 \end{pmatrix}

So x=2x = 2, y=3y = 3, z=4z = 4. Check the third equation: 3(2)+2(3)−4(4)=6+6−16=−43(2) + 2(3) - 4(4) = 6 + 6 - 16 = -4 ✓.

A message is coded by writing letters as numbers (A=1A = 1, …, Z=26Z = 26) in the columns of a 2×22 \times 2 matrix MM, then finding C=KMC = KM with key K=(2132)K = \begin{pmatrix} 2 & 1 \\ 3 & 2 \end{pmatrix}. The coded matrix received is C=(27484176)C = \begin{pmatrix} 27 & 48 \\ 41 & 76 \end{pmatrix}. Decode it. (Read the message down the first column, then down the second.)

Solution. det⁡K=4−3=1\det K = 4 - 3 = 1, so

K−1=11(2−1−32)=(2−1−32)K^{-1} = \frac{1}{1}\begin{pmatrix} 2 & -1 \\ -3 & 2 \end{pmatrix} = \begin{pmatrix} 2 & -1 \\ -3 & 2 \end{pmatrix}

Since C=KMC = KM, we get M=K−1CM = K^{-1}C:

M=(2−1−32)(27484176)=(54−4196−76−81+82−144+152)=(132018)M = \begin{pmatrix} 2 & -1 \\ -3 & 2 \end{pmatrix}\begin{pmatrix} 27 & 48 \\ 41 & 76 \end{pmatrix} = \begin{pmatrix} 54 - 41 & 96 - 76 \\ -81 + 82 & -144 + 152 \end{pmatrix} = \begin{pmatrix} 13 & 20 \\ 1 & 8 \end{pmatrix}

Reading down the columns: 13,1,20,813, 1, 20, 8, which is M,A,T,HM, A, T, H. The message is MATH.

Forgetting to divide by the determinant. (d−b−ca)\begin{pmatrix} d & -b \\ -c & a \end{pmatrix} on its own is not the inverse unless det⁡A=1\det A = 1. Always multiply by 1ad−bc\dfrac{1}{ad - bc}.

Swapping and negating the wrong entries. The leading-diagonal entries (aa and dd) swap places; the other two (bb and cc) stay where they are but change sign. Check by multiplying: AA−1AA^{-1} should be II.

Writing BA⁻¹ instead of A⁻¹B. From AX=BAX = B, the inverse goes on the left: X=A−1BX = A^{-1}B. Usually BA−1BA^{-1} isn’t even defined (a 2×12 \times 1 times a 2×22 \times 2), and when it is, it’s a different answer.

Trying to invert a singular matrix. If det⁡A=0\det A = 0 there is no inverse; your GDC will say “singular matrix”. In a system of equations, that means there’s no unique solution.

Finding the determinant of a non-square matrix. Only square matrices have determinants and inverses. A 2×32 \times 3 matrix has neither.

Entering a system with the variables out of order. Each column of AA belongs to one variable. If an equation is written 3z+x=53z + x = 5, its row is (103)\begin{pmatrix} 1 & 0 & 3 \end{pmatrix} when the variables are in the order x,y,zx, y, z.

1. (Warm-up) Find the determinant of each matrix.

  • (a) (3214)\begin{pmatrix} 3 & 2 \\ 1 & 4 \end{pmatrix}
  • (b) (−253−1)\begin{pmatrix} -2 & 5 \\ 3 & -1 \end{pmatrix}
  • (c) (6−43−2)\begin{pmatrix} 6 & -4 \\ 3 & -2 \end{pmatrix}
Solution

(a) 3(4)−2(1)=12−2=103(4) - 2(1) = 12 - 2 = 10

(b) (−2)(−1)−5(3)=2−15=−13(-2)(-1) - 5(3) = 2 - 15 = -13

(c) 6(−2)−(−4)(3)=−12+12=06(-2) - (-4)(3) = -12 + 12 = 0 (this matrix is singular)

2. (Warm-up) Find the inverse of B=(3−15−2)B = \begin{pmatrix} 3 & -1 \\ 5 & -2 \end{pmatrix}.

Solution

det⁡B=3(−2)−(−1)(5)=−6+5=−1\det B = 3(-2) - (-1)(5) = -6 + 5 = -1.

B−1=1−1(−21−53)=(2−15−3)B^{-1} = \frac{1}{-1}\begin{pmatrix} -2 & 1 \\ -5 & 3 \end{pmatrix} = \begin{pmatrix} 2 & -1 \\ 5 & -3 \end{pmatrix}

Check: BB−1=(6−5−3+310−10−5+6)=IBB^{-1} = \begin{pmatrix} 6 - 5 & -3 + 3 \\ 10 - 10 & -5 + 6 \end{pmatrix} = I ✓.

3. (Warm-up) Which of these matrices are singular?

P=(2814),Q=(3−6−12),R=(5221)P = \begin{pmatrix} 2 & 8 \\ 1 & 4 \end{pmatrix}, \qquad Q = \begin{pmatrix} 3 & -6 \\ -1 & 2 \end{pmatrix}, \qquad R = \begin{pmatrix} 5 & 2 \\ 2 & 1 \end{pmatrix}
Solution

det⁡P=8−8=0\det P = 8 - 8 = 0, det⁡Q=6−6=0\det Q = 6 - 6 = 0, det⁡R=5−4=1\det R = 5 - 4 = 1.

PP and QQ are singular. RR is not (its inverse is (1−2−25)\begin{pmatrix} 1 & -2 \\ -2 & 5 \end{pmatrix}).

4. (Core) By hand, use an inverse matrix to solve:

3x+2y=45x+4y=10\begin{aligned} 3x + 2y &= 4 \\ 5x + 4y &= 10 \end{aligned}
Solution

A=(3254)A = \begin{pmatrix} 3 & 2 \\ 5 & 4 \end{pmatrix}, det⁡A=12−10=2\det A = 12 - 10 = 2, so

A−1=12(4−2−53)A^{-1} = \frac{1}{2}\begin{pmatrix} 4 & -2 \\ -5 & 3 \end{pmatrix}X=A−1B=12(4−2−53)(410)=12(16−20−20+30)=(−25)X = A^{-1}B = \frac{1}{2}\begin{pmatrix} 4 & -2 \\ -5 & 3 \end{pmatrix}\begin{pmatrix} 4 \\ 10 \end{pmatrix} = \frac{1}{2}\begin{pmatrix} 16 - 20 \\ -20 + 30 \end{pmatrix} = \begin{pmatrix} -2 \\ 5 \end{pmatrix}

So x=−2x = -2, y=5y = 5. Check: 3(−2)+2(5)=43(-2) + 2(5) = 4 ✓ and 5(−2)+4(5)=105(-2) + 4(5) = 10 ✓.

5. (Core) A school places three supply orders:

  • 22 binders, 11 pack of pens and 11 ruler: $11.00
  • 11 binder, 33 packs of pens and 22 rulers: $13.75
  • 11 binder, 11 pack of pens and 44 rulers: $12.75

Write this as a matrix equation and use an inverse matrix to find the price of each item.

Solution

Let bb, pp, rr be the prices in dollars.

(211132114)(bpr)=(11.0013.7512.75)\begin{pmatrix} 2 & 1 & 1 \\ 1 & 3 & 2 \\ 1 & 1 & 4 \end{pmatrix}\begin{pmatrix} b \\ p \\ r \end{pmatrix} = \begin{pmatrix} 11.00 \\ 13.75 \\ 12.75 \end{pmatrix}

GDC: det⁡A=16≠0\det A = 16 \ne 0, and

(bpr)=A−1(11.0013.7512.75)=(3.502.251.75)\begin{pmatrix} b \\ p \\ r \end{pmatrix} = A^{-1}\begin{pmatrix} 11.00 \\ 13.75 \\ 12.75 \end{pmatrix} = \begin{pmatrix} 3.50 \\ 2.25 \\ 1.75 \end{pmatrix}

A binder costs $3.50, a pack of pens $2.25 and a ruler $1.75. Check the first order: 7.00+2.25+1.75=11.007.00 + 2.25 + 1.75 = 11.00 ✓.

6. (Core) Let A=(2153)A = \begin{pmatrix} 2 & 1 \\ 5 & 3 \end{pmatrix} and B=(431−2)B = \begin{pmatrix} 4 & 3 \\ 1 & -2 \end{pmatrix}. Find the matrix XX such that XA=BXA = B.

Solution

Multiply both sides on the right by A−1A^{-1}: XAA−1=BA−1XAA^{-1} = BA^{-1}, so X=BA−1X = BA^{-1}.

det⁡A=6−5=1\det A = 6 - 5 = 1, so A−1=(3−1−52)A^{-1} = \begin{pmatrix} 3 & -1 \\ -5 & 2 \end{pmatrix}.

X=(431−2)(3−1−52)=(12−15−4+63+10−1−4)=(−3213−5)X = \begin{pmatrix} 4 & 3 \\ 1 & -2 \end{pmatrix}\begin{pmatrix} 3 & -1 \\ -5 & 2 \end{pmatrix} = \begin{pmatrix} 12 - 15 & -4 + 6 \\ 3 + 10 & -1 - 4 \end{pmatrix} = \begin{pmatrix} -3 & 2 \\ 13 & -5 \end{pmatrix}

Check: XA=(−6+10−3+626−2513−15)=(431−2)=BXA = \begin{pmatrix} -6 + 10 & -3 + 6 \\ 26 - 25 & 13 - 15 \end{pmatrix} = \begin{pmatrix} 4 & 3 \\ 1 & -2 \end{pmatrix} = B ✓.

7. (Core) A four-letter word was coded as in Example 4 (A=1A = 1, …, Z=26Z = 26, letters in the columns of MM, C=KMC = KM), but with key K=(3152)K = \begin{pmatrix} 3 & 1 \\ 5 & 2 \end{pmatrix}. The coded matrix is C=(24174530)C = \begin{pmatrix} 24 & 17 \\ 45 & 30 \end{pmatrix}. Find the word.

Solution

det⁡K=6−5=1\det K = 6 - 5 = 1, so K−1=(2−1−53)K^{-1} = \begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix}.

M=K−1C=(2−1−53)(24174530)=(48−4534−30−120+135−85+90)=(34155)M = K^{-1}C = \begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix}\begin{pmatrix} 24 & 17 \\ 45 & 30 \end{pmatrix} = \begin{pmatrix} 48 - 45 & 34 - 30 \\ -120 + 135 & -85 + 90 \end{pmatrix} = \begin{pmatrix} 3 & 4 \\ 15 & 5 \end{pmatrix}

Down the columns: 3,15,4,53, 15, 4, 5, which is C,O,D,EC, O, D, E. The word is CODE.

8. (Challenge) Let P=(k23k+1)P = \begin{pmatrix} k & 2 \\ 3 & k + 1 \end{pmatrix}.

  • (a) Find the values of kk for which PP has no inverse.
  • (b) Find P−1P^{-1} in terms of kk, for all other values of kk.
  • (c) Use your answer to find P−1P^{-1} when k=3k = 3.
Solution

(a) det⁡P=k(k+1)−6=k2+k−6=(k+3)(k−2)\det P = k(k + 1) - 6 = k^2 + k - 6 = (k + 3)(k - 2). This is 00 when k=−3k = -3 or k=2k = 2.

(b)

P−1=1(k+3)(k−2)(k+1−2−3k),k≠−3, k≠2P^{-1} = \frac{1}{(k + 3)(k - 2)}\begin{pmatrix} k + 1 & -2 \\ -3 & k \end{pmatrix}, \qquad k \ne -3,\ k \ne 2

(c) For k=3k = 3: (k+3)(k−2)=6×1=6(k + 3)(k - 2) = 6 \times 1 = 6, so

P−1=16(4−2−33)P^{-1} = \frac{1}{6}\begin{pmatrix} 4 & -2 \\ -3 & 3 \end{pmatrix}

Check: P=(3234)P = \begin{pmatrix} 3 & 2 \\ 3 & 4 \end{pmatrix}, and 16(3234)(4−2−33)=16(6006)=I\dfrac{1}{6}\begin{pmatrix} 3 & 2 \\ 3 & 4 \end{pmatrix}\begin{pmatrix} 4 & -2 \\ -3 & 3 \end{pmatrix} = \dfrac{1}{6}\begin{pmatrix} 6 & 0 \\ 0 & 6 \end{pmatrix} = I ✓.

9. (Challenge) Let A=(2011)A = \begin{pmatrix} 2 & 0 \\ 1 & 1 \end{pmatrix}.

  • (a) Show that A2=3A−2IA^2 = 3A - 2I.
  • (b) Multiply both sides of this equation by A−1A^{-1} to show that A−1=12(3I−A)A^{-1} = \dfrac{1}{2}(3I - A).
  • (c) Use (b) to find A−1A^{-1}, and check it with the 2×22 \times 2 inverse formula.
Solution

(a)

A2=(2011)(2011)=(4031),3A−2I=(6−2033−2)=(4031)A^2 = \begin{pmatrix} 2 & 0 \\ 1 & 1 \end{pmatrix}\begin{pmatrix} 2 & 0 \\ 1 & 1 \end{pmatrix} = \begin{pmatrix} 4 & 0 \\ 3 & 1 \end{pmatrix}, \qquad 3A - 2I = \begin{pmatrix} 6 - 2 & 0 \\ 3 & 3 - 2 \end{pmatrix} = \begin{pmatrix} 4 & 0 \\ 3 & 1 \end{pmatrix}

They’re equal. ✓

(b) det⁡A=2≠0\det A = 2 \ne 0, so A−1A^{-1} exists. Multiply A2=3A−2IA^2 = 3A - 2I on the left by A−1A^{-1}:

A−1AA=3A−1A−2A−1I⇒A=3I−2A−1A^{-1}AA = 3A^{-1}A - 2A^{-1}I \quad\Rightarrow\quad A = 3I - 2A^{-1}

Rearrange: 2A−1=3I−A2A^{-1} = 3I - A, so A−1=12(3I−A)A^{-1} = \dfrac{1}{2}(3I - A).

(c)

A−1=12(3−20−13−1)=12(10−12)A^{-1} = \frac{1}{2}\begin{pmatrix} 3 - 2 & 0 \\ -1 & 3 - 1 \end{pmatrix} = \frac{1}{2}\begin{pmatrix} 1 & 0 \\ -1 & 2 \end{pmatrix}

Formula: 12(10−12)\dfrac{1}{2}\begin{pmatrix} 1 & 0 \\ -1 & 2 \end{pmatrix}, the same. ✓