Matrix Inverse Algorithm

Matrix Inverse Algorithm
Matrix Inverse (2×2)
The inverse of a 2×2 matrix can be found using the following formula:
Note: a 2×2 matrix is invertible if and only if ad−bc=0.
Example
Find the inverse of A=[2−413].
A−1=(2)(3)−(1)(−4)1[3−(−4)−12]=101[34−12]=103102−101101
Matrix Inverse (Any Size)
Use Gauss-Jordan elimination to row reduce A into I. Applying the same EROs to I will give us A−1!
Steps
- Augment the matrix An×n with In: [AI] Example (3×3): a11a21a31a12a22a32a13a23a331 0 0 0 1 0 0 0 1
- Use Gauss-Jordan elimination to row reduce A to I, creating the matrix: [IX] Example (3×3): 1 0 0 0 1 0 0 0 1 x11x21x31x12x22x32x13x23x33
- A−1=X

Example: Matrix Inverse Algorithm
Find the inverse of A=[1235] using the formula for a 2×2 matrix, and using the Gauss-Jordan elimination algorithm.
Using the Formula
A−1=(1)(5)−(3)(2)1[5−2−31]=(−1)[5−2−31]=[−523−1]
Using the Algorithm
[AI]=⟶⟶⟶[12351001]R2−2R1[103−11−201](−1)R2[103 1120−1]R1−3R2[100 1−523−1]=[IA−1]
∴A−1=[−523−1]
Note: You can always check your answer.
AA−1=[1235][−523−1]=[1001]=I✓
A−1A=[−523−1][1235]=[1001]=I✓

Example: Matrix Inverse Algorithm
Find the inverse of the matrix A=102111214, if it exists.
[AI]=⟶⟶⟶ 102 111 214 100 010 001R3−2R1 100 11−1 210 10−2 010 001R1−R2R3+R2 100 010 111 10−2 −111 001R1−R3R2−R3 100 010 001 32−2 −201 −1−11=[IA−1]
Since we were able to reduce A into I, the inverse exists and A−1=32−2−201−1−11.
Exercise: check if AA−1=I and A−1A=I.