CodeMathFusion
☰

🟣 Matrix Algebra: 3x3 Determinants & Inverses

Level up your matrix skills! Master the complexity of 3x3 determinants and inverses for advanced applications.

πŸ” Introduction to 3x3 Matrices

Welcome to Part 4 of Matrix Algebra! In Part 3, we covered determinants and inverses for $2 \times 2$ matrices. Now, we step up to the challenge of $3 \times 3$ matrices. While the concepts remain the same, the calculations become more intricate, requiring systematic methods.

In this topic, we will cover:

  • Calculating the Determinant of a 3x3 Matrix using cofactor expansion
  • Determining if a $3 \times 3$ matrix is invertible using its determinant
  • Finding the Inverse of a 3x3 Matrix using the adjugate formula
  • Working through examples and practice problems to solidify your skills

Let's tackle the world of $3 \times 3$ matrices and expand our matrix algebra abilities! πŸš€

πŸ” Determinant of a 3x3 Matrix

Calculating the determinant of a $3 \times 3$ matrix is more complex than for a $2 \times 2$ matrix. We will use a method called cofactor expansion (or expansion by minors).

2.1 Cofactor Expansion Method

For a $3 \times 3$ matrix $A = \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix}$, the determinant can be calculated by expanding along any row or column. Let's expand along the first row. The formula is:

$$\det(A) = a \cdot C_{11} + b \cdot C_{12} + c \cdot C_{13}$$

Where $C_{ij}$ is the cofactor of the element in the $i^{th}$ row and $j^{th}$ column. The cofactor $C_{ij}$ is calculated as $C_{ij} = (-1)^{i+j} M_{ij}$, and $M_{ij}$ is the determinant of the $2 \times 2$ matrix obtained by deleting the $i^{th}$ row and $j^{th}$ column of $A$. $M_{ij}$ is called the minor.

Let's break down the cofactors for the first row expansion:

  • For element $a$ (position 1,1): $C_{11} = (+1) \cdot \det \begin{bmatrix} e & f \\ h & i \end{bmatrix} = (ei - fh)$
  • For element $b$ (position 1,2): $C_{12} = (-1) \cdot \det \begin{bmatrix} d & f \\ g & i \end{bmatrix} = -(di - fg)$
  • For element $c$ (position 1,3): $C_{13} = (+1) \cdot \det \begin{bmatrix} d & e \\ g & h \end{bmatrix} = (dh - eg)$

So, $\det(A) = a(ei - fh) - b(di - fg) + c(dh - eg)$

Example 1: Determinant of a 3x3 Matrix

Calculate the determinant of matrix $A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix}$.

Solution: Expand along the first row.

  • $C_{11} = \det \begin{bmatrix} 5 & 6 \\ 8 & 9 \end{bmatrix} = 45 - 48 = -3$
  • $C_{12} = -\det \begin{bmatrix} 4 & 6 \\ 7 & 9 \end{bmatrix} = -(36 - 42) = 6$
  • $C_{13} = \det \begin{bmatrix} 4 & 5 \\ 7 & 8 \end{bmatrix} = 32 - 35 = -3$

$\det(A) = (1)(-3) + (2)(6) + (3)(-3) = -3 + 12 - 9 = 0$

Answer: The determinant is 0.

Example 2: Determinant with Negative Elements

Calculate the determinant of $B = \begin{bmatrix} 2 & -1 & 0 \\ 3 & 0 & -2 \\ -2 & 1 & 1 \end{bmatrix}$.

Solution: Expand along the first row.

  • $C_{11} = \det \begin{bmatrix} 0 & -2 \\ 1 & 1 \end{bmatrix} = 0 - (-2) = 2$
  • $C_{12} = -\det \begin{bmatrix} 3 & -2 \\ -2 & 1 \end{bmatrix} = -(3 - 4) = 1$
  • $C_{13} = \det \begin{bmatrix} 3 & 0 \\ -2 & 1 \end{bmatrix} = 3 - 0 = 3$

$\det(B) = (2)(2) + (-1)(1) + (0)(3) = 4 - 1 + 0 = 3$

Answer: The determinant is 3.

Example 3: Determinant of a Triangular Matrix

Calculate $\det(T)$ for $T = \begin{bmatrix} 2 & 5 & 1 \\ 0 & 3 & 4 \\ 0 & 0 & 4 \end{bmatrix}$.

Solution:

For a triangular matrix (upper or lower), the determinant is simply the product of the diagonal elements!

$\det(T) = 2 \times 3 \times 4 = 24$

Let's verify with expansion along column 1:

$2 \cdot \det \begin{bmatrix} 3 & 4 \\ 0 & 4 \end{bmatrix} - 0 + 0 = 2(12 - 0) = 24$

Answer: 24

2.2 Choosing Rows or Columns

You can expand along any row or column. It's strategic to choose a row or column with the most zeros to simplify calculations, as zero times any cofactor is zero.

⏫ Inverse of a 3x3 Matrix

Similar to $2 \times 2$ matrices, the inverse of a $3 \times 3$ matrix $A$, denoted as $A^{-1}$, exists if and only if $\det(A) \neq 0$. The formula involves the adjugate matrix.

3.1 Adjugate and Inverse Formula

The adjugate (adj) of a matrix $A$ is the transpose of the matrix of cofactors of $A$. If $C$ is the cofactor matrix, then $\text{adj}(A) = C^T$.

Inverse Formula:

$$A^{-1} = \frac{1}{\det(A)} \text{adj}(A)$$

Steps to Find Inverse

  1. Calculate determinant $\det(A)$. If 0, no inverse exists.
  2. Calculate all 9 cofactors $C_{ij}$.
  3. Form the cofactor matrix $C$.
  4. Transpose $C$ to get $\text{adj}(A)$.
  5. Multiply $\text{adj}(A)$ by $\frac{1}{\det(A)}$.

Example 4: Finding the Inverse of a 3x3 Matrix

Find the inverse of $B = \begin{bmatrix} 2 & -1 & 0 \\ 3 & 0 & -2 \\ -2 & 1 & 1 \end{bmatrix}$.

Step 1: Determinant

From Example 2, $\det(B) = 3$. Inverse exists.

Step 2: Cofactors

$C_{11}=2, C_{12}=1, C_{13}=3$ (from Ex 2)

$C_{21} = -\det\begin{bmatrix}-1&0\\1&1\end{bmatrix} = -(-1)=1$

$C_{22} = \det\begin{bmatrix}2&0\\-2&1\end{bmatrix} = 2$

$C_{23} = -\det\begin{bmatrix}2&-1\\-2&1\end{bmatrix} = 0$

$C_{31} = \det\begin{bmatrix}-1&0\\0&-2\end{bmatrix} = 2$

$C_{32} = -\det\begin{bmatrix}2&0\\3&-2\end{bmatrix} = 4$

$C_{33} = \det\begin{bmatrix}2&-1\\3&0\end{bmatrix} = 3$

Step 3 & 4: Adjugate

Cofactor Matrix $C = \begin{bmatrix} 2 & 1 & 3 \\ 1 & 2 & 0 \\ 2 & 4 & 3 \end{bmatrix}$

$\text{adj}(B) = C^T = \begin{bmatrix} 2 & 1 & 2 \\ 1 & 2 & 4 \\ 3 & 0 & 3 \end{bmatrix}$

Step 5: Inverse

$B^{-1} = \frac{1}{3} \begin{bmatrix} 2 & 1 & 2 \\ 1 & 2 & 4 \\ 3 & 0 & 3 \end{bmatrix} = \begin{bmatrix} \frac{2}{3} & \frac{1}{3} & \frac{2}{3} \\ \frac{1}{3} & \frac{2}{3} & \frac{4}{3} \\ 1 & 0 & 1 \end{bmatrix}$

Example 5: Solving a System with Inverse

Solve the system using the inverse found in Example 4:

$2x - y = 3$

$3x - 2z = 4$

$-2x + y + z = 1$

Solution:

Matrix form $BX = Y$, where $B$ is the matrix from Ex 4, $Y = \begin{bmatrix} 3 \\ 4 \\ 1 \end{bmatrix}$.

$X = B^{-1}Y = \frac{1}{3} \begin{bmatrix} 2 & 1 & 2 \\ 1 & 2 & 4 \\ 3 & 0 & 3 \end{bmatrix} \begin{bmatrix} 3 \\ 4 \\ 1 \end{bmatrix}$

$= \frac{1}{3} \begin{bmatrix} 6+4+2 \\ 3+8+4 \\ 9+0+3 \end{bmatrix} = \frac{1}{3} \begin{bmatrix} 12 \\ 15 \\ 12 \end{bmatrix} = \begin{bmatrix} 4 \\ 5 \\ 4 \end{bmatrix}$

Answer: $x=4, y=5, z=4$

🌍 Real-World Applications

1️⃣ 3D Computer Graphics

3x3 matrices are essential for rotating and scaling 3D objects in video games and CGI. The inverse matrix is used to reverse these transformations (e.g., moving the camera back).

2️⃣ Cryptography

Advanced encryption algorithms often use larger matrix inverses to encode and decode secure data, similar to the Hill cipher but more complex.

3️⃣ Physics Simulations

Simulating rigid body dynamics and systems of forces often requires solving systems of linear equations using matrix inverses.

4️⃣ Economics

Leontief Input-Output models use inverses of large matrices to analyze relationships between different sectors of an economy.

🎯 Practice Questions

Master 3x3 matrices!

1
Calculate determinant of $A = \begin{bmatrix} 2 & 0 & 1 \\ 1 & 2 & -1 \\ -1 & 1 & 0 \end{bmatrix}$
2
Calculate determinant of $B = \begin{bmatrix} 1 & -2 & 3 \\ 0 & 4 & -1 \\ 2 & -3 & 5 \end{bmatrix}$
3
Calculate determinant of $C = \begin{bmatrix} 3 & 2 & 1 \\ -1 & 0 & 2 \\ 4 & -2 & 3 \end{bmatrix}$
4
Is matrix $A$ from Q1 invertible? Why?
5
Find cofactor $C_{12}$ for matrix $B$ from Q2.
6
Find cofactor $C_{23}$ for matrix $C$ from Q3.
7
Find inverse of $D = \begin{bmatrix} 1 & 2 & 1 \\ 0 & 1 & 0 \\ 2 & 1 & 1 \end{bmatrix}$
8
Find inverse of $E = \begin{bmatrix} 2 & 1 & 0 \\ 1 & 1 & 1 \\ 0 & 1 & -1 \end{bmatrix}$
9
Verify your inverse for $D$ by calculating $D \times D^{-1}$.
10
Calculate determinant of Identity Matrix $I_3$. What do you notice?

πŸ”₯ Challenge Questions

Push your limits!

1
Calculate determinant of $\begin{bmatrix} x & y & 1 \\ 1 & 2 & 1 \\ 2 & 3 & 1 \end{bmatrix}$. For what values of $x, y$ is it 0?
2
Find determinants of diagonal matrix $B$ and upper triangular matrix $C$. Any pattern?
3
If $\det(A) = 4$ for a 3x3 matrix, find $\det(2A)$. (Hint: scalar multiplication effect)
4
Explain why a matrix with a row of zeros has determinant 0.
5
Solve the system: $2x+y+z=5, x-y+z=1, 3x+y-z=4$ using matrix inverse.