Inverse matrix, the [A | I] method and elementary matrices
You learn to find the inverse of a matrix with the 2×2 formula and with Gauss-Jordan on [A | I], to recognize a singular matrix, to solve AX = B and XA = B from the correct side, and to write row operations as products with elementary matrices.
With numbers you solve the equation 3x=6 by multiplying both sides by 3−1. For matrices the same idea is called the inverse matrix: if Ax=b then x=A−1b. But not every matrix has an inverse, and it matters from which side you multiply. On the midterm you will almost certainly get a 2×2 formula question, a 3×3[A∣I] question and an AX=B question from this topic.
Golden rules:
The inverse is defined only for square matrices.
For 2×2 use the formula, for 3×3 the [A∣I] method.
If AX=B then X=A−1B; if XA=B then X=BA−1. Mixing up the side is the most common mistake.
Always check: a row · a column must give 1 or 0.
Definition
For an n×n matrix A, if there is a B with
AB=BA=In
then A is invertible (nonsingular) and B is the inverseA−1 of A. If there is no such B, A is called singular.
The inverse is unique. If B and C are both inverses of A, then B=BI=B(AC)=(BA)C=IC=C.
For square matrices one side is enough: if AB=I then automatically BA=I. That is why the problem book has the question “AB = I ⇒ BA = I”.
The 2×2 formula
A=[acbd],ad−bc=0⇒A−1=ad−bc1[d−c−ba].
Recipe to memorize: swap the diagonal, flip the signs of the other two, divide by ad−bc. If ad−bc=0 there is no inverse. This number is the 2×2 determinant (next week).
Why does it work? All the row operations that take A to I can be thought of as a product: Ek⋯E2E1A=I. This product is exactly A−1. If you apply the same operations to I on the side, you get Ek⋯E1I=A−1.
Recipe:
Write the n×2n matrix: [A∣I].
Reduce the left side to I with Gauss-Jordan. Apply every operation to all2n columns.
If the left side becomes I, the right side is A−1. If a zero row appears on the left, A is singular; stop.
A zero row has appeared on the left side. Whatever you do, there will be no pivot in row 3: S is singular. The fact that the right side is not zero changes nothing; the decision is made by looking at the left side.
Solving a system with the inverse
If A is invertible, Ax=b has a unique solution: x=A−1b. For the A above and b=(1,3,2)T:
If many different b are to be solved with the same A, finding A−1 once speeds things up. For a single system, Gaussian elimination is usually shorter.
Matrix equations. Let A be invertible:
Equation
Solve
Why
AX=B
X=A−1B
multiply by A−1 from the left
XA=B
X=BA−1
multiply by A−1 from the right
AXC=B
X=A−1BC−1
from both sides
PITFALL · there is no “division”. There is no such thing as X=AB. A−1B and BA−1 are generally different (Q6 and Q7 give two different answers with the same matrices).
Properties of the inverse
A, B invertible n×n, c=0:
Property
Note
(A−1)−1=A
(AB)−1=B−1A−1
order reverses, as with the transpose
(AT)−1=(A−1)T
(cA)−1=c1A−1
(Ak)−1=(A−1)k
written as A−k
Check of (AB)−1=B−1A−1: (AB)(B−1A−1)=A(BB−1)A−1=AA−1=I. If the order were not reversed, B and B−1 would not meet in the middle.
The cancellation rule now holds too: if A is invertible, AB=AC⇒B=C (multiply from the left by A−1).
Elementary matrices
An elementary matrixE is a matrix obtained by applying one row operation to the identity matrix. Its magic property: the product EA is the same as applying that row operation to A.
Operation (3×3)
E
E−1
R3←R3−4R1
10−4010001
104010001
R1↔R2
010100001
itself
R2←5R2
diag(1,5,1)
diag(1,51,1)
Every elementary matrix is invertible and its inverse is elementary too: the operation that undoes the operation.
Writing a matrix as a product of elementary matrices.A=[1327]:
Check: [1301][1021]=[1327]. The order of the inverses reversed, because A=(E2E1)−1=E1−1E2−1.
The invertible matrix theorem (first version)
If A is n×n, the following are equivalent (if one is true, all are true):
A is invertible.
Ax=0 has only the trivial solution.
The RREF of A is In.
A is a product of elementary matrices.
Ax=b is consistent with a unique solution for every b.
The list will grow through the semester: detA=0 (week 4), columns independent (week 7), rank =n (week 9), 0 is not an eigenvalue (week 13).
Common mistakes
Wrong
Right
Swapping the off-diagonal entries in 2×2
The diagonal swaps, the off-diagonal entries change sign
Forgetting to divide by ad−bc
The ad−bc1 at the front of the formula
Applying the operation only to the left side in [A∣I]
To all 2n columns
X=BA−1 for AX=B
X=A−1B
(AB)−1=A−1B−1
B−1A−1
Looking for the inverse of a non-square matrix
The inverse exists only for square matrices
Saying “invertible” because the right side has a nonzero row
The decision is made from the left side
(A+B)−1=A−1+B−1
There is no such rule
Test yourself
Exam-style questions. Solve them on paper first, then reveal the answer.
Question 1easy
Find the inverse of A=[2174].
Show answer
[4−1−72]
ad−bc=8−7=1. Swap the diagonal, flip the signs of the other two, divide by 1. Check: [2174][4−1−72]=[8−74−4−14+14−7+8]=I.
Question 2easy
For which values of k is [k24k−2] singular?
Show answer
k=4 or k=−2
A 2×2 matrix is singular if and only if ad−bc=0.k(k−2)−8=k2−2k−8=(k−4)(k+2)=0.
Question 3medium
Use the [A∣I] method to find A−1 for A=101112124.
Show answer
02−1−23−11−21
R3←R3−R1: (0,1,3∣−1,0,1). R3←R3−R2: (0,0,1∣−1,−1,1). Clear above pivot 3: R2←R2−2R3: (0,1,0∣2,3,−2). R1←R1−R3: (1,1,0∣2,1,−1).R1←R1−R2: (1,0,0∣0,−2,1). The left side is I, the right side is A−1. Check: row 1 of A · column 1 of A−1=0+2−1=1.
Question 4medium
With A from the previous question, solve Ax=b for b=(2,1,3)T using A−1.
Is 1232573710 invertible? Justify with row reduction.
Show answer
No, it is singular
R2←R2−2R1: (0,1,1). R3←R3−3R1: (0,1,1). R3←R3−R2: (0,0,0). A zero row appeared on the left side; it cannot be reduced to I. Singular. Intuition: row 3 = row 1 + row 2.
Question 6medium
Let A=[2513] and B=[1201]. Solve AX=B.
Show answer
X=[1−1−12]
detA=6−5=1, A−1=[3−5−12]. If AX=B, multiply from the left by A−1: X=A−1B=[3−2−5+4−12]=[1−1−12].
Question 7medium
With the same A and B, solve XA=B.
Show answer
X=[31−10]
If XA=B, multiply by A−1from the right: X=BA−1.[1201][3−5−12]=[36−5−1−2+2]=[31−10]. Different from the answer to the previous question: matrix multiplication is not commutative.
Question 8medium
Suppose A−1=[1021] and B−1=[3111]. Find (AB)−1.
Show answer
[3173]
(AB)−1=B−1A−1 (the order reverses).[3111][1021]=[316+12+1]=[3173]. Whoever writes A−1B−1 finds a different (wrong) matrix.
Question 9easy
Let A=10−2211034 and B=100215034. Find an elementary matrix E with EA=B, and E−1.
Show answer
E=102010001, E−1=10−2010001
Only row 3 changed: (0,5,4)=(−2,1,4)+2(1,2,0). The operation is R3←R3+2R1.E = this operation applied to I3: a 2 in position (3,1).E−1 undoes the operation: R3←R3−2R1, that is, −2 in position (3,1).
Question 10hard
A square matrix A satisfies A2−3A+I=O. Show that A is invertible and express A−1 in terms of A.
Show answer
A−1=3I−A
A2−3A=−I⇒A(A−3I)=−I⇒A(3I−A)=I. In the same way (3I−A)A=I. So A is invertible and A−1=3I−A. Example: A=[1112] satisfies this equation, A−1=[2−1−11]=3I−A.
Question 11hard
If A−1=[2312], find A and (2AT)−1.
Show answer
A=[2−3−12], (2AT)−1=[11/23/21]
A=(A−1)−1: det=4−3=1, by the formula [2−3−12].(cM)−1=c1M−1 and (AT)−1=(A−1)T: (2AT)−1=21(A−1)T=21[2132].
Question 12hard
True or false: If A and B are invertible n×n matrices, then A+B is invertible.
Show answer
False
Counterexample: A=I, B=−I. Both are invertible but A+B=O, and the zero matrix has no inverse. For the product it is true: AB is invertible and (AB)−1=B−1A−1. There is no such rule for the sum.
Verification: All inverse matrices were found in node by applying the row operations step by step on [A | I] with BigInt fractions and checked with the product A·A⁻¹ = I; in the singular examples the formation of a zero row was shown, and the AX = B / XA = B solutions were verified by multiplying back (verify/MAT1041/03.mjs).
Review card
A⁻¹: AA⁻¹ = A⁻¹A = I. Only for SQUARE matrices; if it exists it is UNIQUE.
2×2: [a b; c d]⁻¹ = 1/(ad-bc) · [d -b; -c a]. ad-bc = 0 → no inverse.
3×3: [A | I] → Gauss-Jordan → [I | A⁻¹]. A zero row on the left → SINGULAR.
Check: row 1 of A · column 1 of A⁻¹ = 1.
Ax = b, A invertible → x = A⁻¹b (unique solution).
AX = B → X = A⁻¹B (from the left). XA = B → X = BA⁻¹ (from the right).
(AB)⁻¹ = B⁻¹A⁻¹, (A⁻¹)⁻¹ = A, (A^T)⁻¹ = (A⁻¹)^T, (cA)⁻¹ = (1/c)A⁻¹, (A^k)⁻¹ = (A⁻¹)^k
(A+B)⁻¹ ≠ A⁻¹ + B⁻¹ ; A+B may not be invertible.
Elementary E = ONE row operation applied to I. EA = apply that operation to A.
E⁻¹ = undo the operation: Ri+cRj ↔ Ri-cRj, cRi ↔ (1/c)Ri, swap ↔ swap.
A invertible ⇔ A ~ I ⇔ Ax=0 only 0 ⇔ Ax=b has a unique solution for every b ⇔ A = product of elementaries.
For square A, if AB = I then BA = I too (one side is enough).