One way to do this is:- Insert the identity matrix in your matrix as follows:
| 3 2 0 1 0 0 |
| -3 -4 5 0 1 0 |
| 3 1 -1 0 0 1 |
- Use elementary row operations to transform this matrix so that the left half become the identity matrix. When this is complete the right half of the matrix will be the inverse you are seeking.
The steps I would use:
Add the first row to the second row and the negative of the first row to the third row:
| 3 2 0 1 0 0 |
| 0 -2 5 1 1 0 |
| 0 -1 -1 -1 0 1 |
Add the second row to the first row and -1/2 the second row to the third row:
| 3 0 5 2 1 0 |
| 0 -2 5 1 1 0 |
| 0 0 -7/2 -3/2 -1/2 1 |
Add 10/7 of the third row to both the first and second rows:
| 3 0 0 -1/7 2/7 10/7 |
| 0 -2 0 -8/7 2/7 10/7 |
| 0 0 -7/2 -3/2 -1/2 1 |
Multiply the first row by 1/3, the second row by -1/2 and the third row by -2/7:
| 1 0 0 -1/21 2/21 10/21 |
| 0 1 0 4/7 -1/7 -5/7 |
| 0 0 1 3/7 1/7 -2/7 |
So your inverse matrix is:
| -1/21 2/21 10/21 |
| 4/7 -1/7 -5/7 |
| 3/7 1/7 -2/7 |