The identity matrix is I:
If we switch rows 1 and 3 in I and then do I x m, we switch the corresponding rows in m:
Our real problem today is to find the inverse of M, such that M-1 x M = I. It turns out that if we do a series of transformations of M that end by converting it to I, and then do the same series of transformations on I, we generate M-1!
If T x M = I, then T x I = M-1.
To make things easier to follow, we'll bind our matrix and the identity matrix together:
The first thing we'll do is add -2 x row 3 to both row 1 and row 2. At the same time, we switch row 3 and row 1.
At this point, if we had a system of simultaneous equations, we would have solved the system. The third row allows us to solve for y, plugging y into the second row and we can solve for z, and then into the first and we solve for x. But here, we continue to transform until we get the identity matrix I.
Next, we multiply row 2 by -1/3:
We add -1 x row 2 to row 1:
We multiply row 2 by 5 and add it to three times row 3:
We multiply row 3 by 1/5:
And then subtract row 3 from row 1 and row 2:
Finally, we multiply row 2 by 1/3:
The identity matrix has been transformed into M-1, as you can check:
We could also do the transformations as one long chain:
or multiply the transformation matrices together and keep them: