As far as i know theres no formula (and i could be wrong there). A reasonably simple method is the gauss elimination method, it can be used to find the inverse or a matrix of an size as long as it is square. Gauss elimination involves performing certain operations on the rows. The operations you can use are :

1) interchanging two rows

2) multiplying a row by a number (can be fraction or negative number)

3) adding one row to another

4) adding a multiple of a row

Definition of gauss elimination method is: if a sequence of row operations reduces a square matrix, A, down to I of the same size. The same sequence of operations would reduce I down to the inverse of A.

Now although you operate on therows, you work from left to rightalong thecolumnstrying to get all the numbers below the leading diagonal down to zero, and the leading diagonal itself down to 1's so it looks like this:

1 x xOnce you've done this you go from right to left changing the "x's" into zeros while still keeping the rest of the matrix as it was (1's and zeros). Once you've done this it should look like this:

0 1 x

0 0 1

1 0 0Do the same operations you did to get A down to I (the above matrix)- to I and you will get the inverse of A. Its easiest to do them simultaneously.

0 1 0

0 0 1