Femtobytes
Problem type

Inverse of a matrix by row reduction

What it solves
Find the inverse of a 2 by 2 or 3 by 3 matrix by reducing the matrix beside the identity, with every row operation worked entry by entry, then prove the answer by multiplying back. If the matrix has no inverse, see exactly where and why the method stops.
Subject
Linear Algebra
Topic
Determinants and inverses
Also called
invert a matrix, matrix inverse, Gauss Jordan
Your problem

Find the inverse of this matrix, or show that it has none.

A=[1−1−110−2−101]A = \left[ \begin{array}{rrr} 1 & -1 & -1 \\ 1 & 0 & -2 \\ -1 & 0 & 1 \end{array} \right]
The square matrix
Size3
Whole numbers or fractions. 2 by 2 or 3 by 3.
Invent a new one:
The problem

Find the inverse of this matrix, or show that it has none.

A=[1−1−110−2−101]A = \left[ \begin{array}{rrr} 1 & -1 & -1 \\ 1 & 0 & -2 \\ -1 & 0 & 1 \end{array} \right]
The result
A−1=[0−1−2−10−10−1−1]A^{-1} = \left[ \begin{array}{rrr} 0 & -1 & -2 \\ -1 & 0 & -1 \\ 0 & -1 & -1 \end{array} \right]

Checked: multiplying AA by this matrix gives the identity.

checked 66 lines of this solution were evaluated with exact arithmetic before it was shown to you. A solution with a false line is never served.
Picture 1 of 2Step 1: Say what an inverse is, and set up the method
A written beside the identity, which is the whole method
11−1-1−1-11100001100−2-2001100−1-10011000011
On the left the matrix A, on the right the identity, the matrix that changes nothing. Every move made to the left half is made to the right half too. When the left half has become the identity, the right half has become the inverse, because it has had exactly the moves done to it that undo A.
1

Say what an inverse is, and set up the method

Why this step

The inverse of AA is the matrix that UNDOES AA. We could hunt for its entries as unknowns, which for a 3×33 \times 3 matrix means nine unknowns in nine equations. There is a far better idea: every row operation is itself a multiplication by some matrix, so the whole sequence of operations that turns AA into the identity IS, multiplied together, the inverse. We do not need to find those matrices. We only need to apply the same operations to the identity and watch what it turns into.

[1−1−110010−2010−101001]\left[ \begin{array}{rrr|rrr} 1 & -1 & -1 & 1 & 0 & 0 \\ 1 & 0 & -2 & 0 & 1 & 0 \\ -1 & 0 & 1 & 0 & 0 & 1 \end{array} \right]
Write AA and II side by side. We will row reduce the whole block. When the left half becomes II, the right half will have become A−1A^{-1}.
2

Pivot 1: column 1, row 1

Why this step

We work one column at a time, left to right. The goal for a column is a single 11 (the pivot) with zeros everywhere else in it. A column in that state says something very plain: its variable appears in exactly one equation, with nothing in front of it. Each cleared column is one variable pinned down.

Replace row 2 by R2−R1R_{2} - R_{1}. The multiplier is chosen so that the entry under attack, 11, is cancelled exactly by the pivot: 1−1⋅1=01 - 1 \cdot 1 = 0.

columnworkingnew entry
111−1⋅11 - 1 \cdot 100
220−1⋅(−1)0 - 1 \cdot \left( -1 \right)11
33−2−1⋅(−1)-2 - 1 \cdot \left( -1 \right)−1-1
440−1⋅10 - 1 \cdot 1−1-1
551−1⋅01 - 1 \cdot 011
660−1⋅00 - 1 \cdot 000
Row 2, entry by entry: old entry minus the multiple of row 1.
[1−1−110001−1−110−101001]\left[ \begin{array}{rrr|rrr} \boxed{1} & -1 & -1 & 1 & 0 & 0 \\ 0 & 1 & -1 & -1 & 1 & 0 \\ -1 & 0 & 1 & 0 & 0 & 1 \end{array} \right]
The matrix now. The boxed entry is the pivot being worked on. checked

Replace row 3 by R3+R1R_{3} + R_{1}. The multiplier is chosen so that the entry under attack, −1-1, is cancelled exactly by the pivot: −1+1⋅1=0-1 + 1 \cdot 1 = 0.

columnworkingnew entry
11−1+1⋅1-1 + 1 \cdot 100
220+1⋅(−1)0 + 1 \cdot \left( -1 \right)−1-1
331+1⋅(−1)1 + 1 \cdot \left( -1 \right)00
440+1⋅10 + 1 \cdot 111
550+1⋅00 + 1 \cdot 000
661+1⋅01 + 1 \cdot 011
Row 3, entry by entry: old entry plus the multiple of row 1.
[1−1−110001−1−1100−10101]\left[ \begin{array}{rrr|rrr} \boxed{1} & -1 & -1 & 1 & 0 & 0 \\ 0 & 1 & -1 & -1 & 1 & 0 \\ 0 & -1 & 0 & 1 & 0 & 1 \end{array} \right]
The matrix now. The boxed entry is the pivot being worked on. checked
3

Pivot 2: column 2, row 2

4

Pivot 3: column 3, row 3

5

Read off the inverse

6

Prove it by multiplying back