┌ ┐ │ 2 -1 3 │ A = │ 1 -1 1 │ │ 4 -5 2 │ └ ┘
To compute the inverse using row operations, place the unitary matrix to the right of the matrix A. Perform elementary row operations to both matrices until turning A into the unit matrix. The most convenient procedure is using the entries on the main diagonal, turning into zeros all the entries above and below them, using elementary row operations of the third kind. Then use elementary row operations of the second kind to turn the entries on the main diagonal into 1 by multiplying the row where they are located by the inverse of its value. If one of the entries of the main diagonal turns into zero, stop the process.
┌ ┐ │ 2 -1 3 | 1 0 0 │ │ 1 -1 1 | 0 1 0 │ │ 4 -5 2 | 0 0 1 │ └ ┘
r1 <———> r2 ┌ ┐ │ 1 -1 1 | 0 1 0 │ │ 2 -1 3 | 1 0 0 │ │ 4 -5 2 | 0 0 1 │ └ ┘ r2 <———> r2 - 2•r1 r3 <———> r3 - 4•r1 ┌ ┐ │ 1 -1 1 | 0 1 0 │ │ 0 1 1 | 1 -2 0 │ │ 0 -1 -2 | 0 -4 1 │ └ ┘ r3 <———> r3 + r2 ┌ ┐ │ 1 -1 1 | 0 1 0 │ │ 0 1 1 | 1 -2 0 │ │ 0 0 -1 | 1 -6 1 │ └ ┘
r2 <———> r2 + r3 r1 <———> r1 + r3 ┌ ┐ │ 1 -1 0 | 1 -5 1 │ │ 0 1 0 | 2 -8 1 │ │ 0 0 -1 | 1 -6 1 │ └ ┘ r1 <———> r1 + r2 ┌ ┐ │ 1 0 0 | 3 -13 2 │ │ 0 1 0 | 2 -8 1 │ │ 0 0 -1 | 1 -6 1 │ └ ┘
r3 <———> -r3 ┌ ┐ │ 1 0 0 | 3 -13 2 │ │ 0 1 0 | 2 -8 1 │ │ 0 0 1 | -1 6 -1 │ └ ┘
┌ ┐ │ 3 -13 2 │ Inv(A) = │ 2 -8 1 │ │ -1 6 -1 │ └ ┘