How do i find the inverse of a 3 x 3 matrix? $$
       A= \begin{bmatrix}
        2 & 1 & -1 \\
        -2 & -2 & 1 \\
        0 & -2 & 1 \\
        \end{bmatrix}
$$
Can someone show me the best way to approach this? Should I use pivoting? I tried using the formula, but I think that only works for 2 x 2 matrices. 

As an easy-to-understand process, you can note that $A.A^{-1} = I$ and then undertake parallel row operations on $A$ and $I$ to transform this into $I.A^{-1}=X$, where $X$ is the result of the same operations on $I$ that transformed $A$ into $I$. You can check, through considering the action of matrix multiplication, that the effect of row scaling or combinations maintains the equality through each transformation.
For convenience during the elimination process this can be written as an augmented matrix $[A\mid I]$:
$$\begin{align}
& \left[ \begin{array}{ccc|ccc}
2 & 1 & -1 & 1 & 0 & 0 \\
-2 & -2 & 1 & 0 & 1 & 0 \\
0 & -2 & 1 & 0 & 0 & 1 \\
  \end{array} \right] \tag{$A\mid I$}\\
& \left[ \begin{array}{ccc|ccc}
2 & 1 & -1 & 1 & 0 & 0 \\
0 & -1 & 0 & 1 & 1 & 0 \\
0 & -2 & 1 & 0 & 0 & 1 \\
  \end{array} \right] \tag{add r1 to r2}\\
& \left[ \begin{array}{ccc|ccc}
2 & 0 & -1 & 2 & 1 & 0 \\
0 & -1 & 0 & 1 & 1 & 0 \\
0 & -2 & 1 & 0 & 0 & 1 \\
  \end{array} \right] \tag{add r2 to r1}\\
& \left[ \begin{array}{ccc|ccc}
2 & 0 & -1 & 2 & 1 & 0 \\
0 & 1 & 0 & -1 & -1 & 0 \\
0 & -2 & 1 & 0 & 0 & 1 \\
  \end{array} \right] \tag{mult r2 by -1}\\
& \left[ \begin{array}{ccc|ccc}
2 & 0 & -1 & 2 & 1 & 0 \\
0 & 1 & 0 & -1 & -1 & 0 \\
0 & 0 & 1 & -2 & -2 & 1 \\
  \end{array} \right] \tag{add 2xr2 to r3}\\
& \left[ \begin{array}{ccc|ccc}
2 & 0 & 0 & 0 & -1 & 1 \\
0 & 1 & 0 & -1 & -1 & 0 \\
0 & 0 & 1 & -2 & -2 & 1 \\
  \end{array} \right] \tag{add r3 to r1} \\
& \left[ \begin{array}{ccc|ccc}
1 & 0 & 0 & 0 & -0.5 & 0.5 \\
0 & 1 & 0 & -1 & -1 & 0 \\
0 & 0 & 1 & -2 & -2 & 1 \\
  \end{array} \right] \tag{mult r1 by 0.5}\\
\text{so }&A^{-1} = \begin{bmatrix}
 0 & -0.5 & 0.5 \\
 -1 & -1 & 0 \\
-2 & -2 & 1 \\
\end{bmatrix}
\end{align}$$
There are plenty of more sophisticated methods but I think this is a good basic tool to get started with.
