3.5 Matrix Inverses¶
Only a square matrix \(A\) can only have an inverse, since by definition a matrix \(B\) is the inverse of \(A\) only if
Both the inner and outer dimensions must match since the multiplication must be legal in both cases, so only \(n\times n\) matrices can be invertible.
Warning
Many square matrices are not invertible.
Inverses and row reduction¶
If we row reduce an invertible matrix \(A\) augmented with the identity matrix all the way to RREF, then the result will give us \(A^{-1}\).
Example¶
Determine if \(A\) is invertible. If so, find \(A^{-1}\).
We augment \(A\) with the \(3\times 3\) identity matrix \(I_3\).
When the left side of the augmented matrix is in RREF form, we will either have \(I_3\) or fewer than three pivots. If \(A\) row reduces to \(I\), then \(A\) is invertible and its inverse appears on the right side of the row-reduced augmented matrix.
A = [ -1 -1 0 ; 3 4 -1; 1 2 2 ]
A =
-1 -1 0
3 4 -1
1 2 2
As usual, we will use a lower-case letter while doing our row operations. Let’s create the augmented matrix
a = [A,eye(3)]
a =
-1 -1 0 1 0 0
3 4 -1 0 1 0
1 2 2 0 0 1
Row reduce¶
a([1 3],:) = a([3 1],:)
a =
1 2 2 0 0 1
3 4 -1 0 1 0
-1 -1 0 1 0 0
a(2,:) = a(2,:) - 3 * a(1,:)
a =
1 2 2 0 0 1
0 -2 -7 0 1 -3
-1 -1 0 1 0 0
a(3,:) = a(3,:) + a(1,:)
a =
1 2 2 0 0 1
0 -2 -7 0 1 -3
0 1 2 1 0 1
a([2 3],:) = a([3 2],:)
a =
1 2 2 0 0 1
0 1 2 1 0 1
0 -2 -7 0 1 -3
a(3,:) = a(3,:) + 2 * a(2,:)
a =
1 2 2 0 0 1
0 1 2 1 0 1
0 0 -3 2 1 -1
a(3,:) = a(3,:) / -3
a =
1.0000 2.0000 2.0000 0 0 1.0000
0 1.0000 2.0000 1.0000 0 1.0000
0 0 1.0000 -0.6667 -0.3333 0.3333
a(2,:) = a(2,:) - 2 * a(3,:)
a =
1.0000 2.0000 2.0000 0 0 1.0000
0 1.0000 0 2.3333 0.6667 0.3333
0 0 1.0000 -0.6667 -0.3333 0.3333
a(1,:) = a(1,:) - 2 * a(3,:)
a =
1.0000 2.0000 0 1.3333 0.6667 0.3333
0 1.0000 0 2.3333 0.6667 0.3333
0 0 1.0000 -0.6667 -0.3333 0.3333
a(1,:) = a(1,:) - 2 * a(2,:)
a =
1.0000 0 0 -3.3333 -0.6667 -0.3333
0 1.0000 0 2.3333 0.6667 0.3333
0 0 1.0000 -0.6667 -0.3333 0.3333
rats(a)
ans =
3x84 char array
' 1 0 0 -10/3 -2/3 -1/3 '
' 0 1 0 7/3 2/3 1/3 '
' 0 0 1 -2/3 -1/3 1/3 '
Since the left-hand side of the augmented matrix is \(I_3\), the right side is \(A^{-1}\).