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. 

$\begin {bmatrix} 2&1&-1\\-2&-2&1\\0&-2&1 \end {bmatrix}$
We can also solve it using determinants-
Calculating determinant of the matrix 
Let $A=2[-2+2]-1[-2]-1[4]$
$=2-4=-2$
Calculating matrix of minors
$\begin {bmatrix} -2+2&&-2-0&&4-0\\1-2&&2-0&&-4-0\\1-2&&2-2&&-4+2 \end {bmatrix}$
$\begin {bmatrix} 0&-2&4\\-1&2&-4\\-1&0&-2 \end {bmatrix}$
Turning matrix of minor into matrix of cofactors.
$\begin {bmatrix} 0&2&4\\1&2&4\\-1&-2&-2 \end {bmatrix}$
Finding adjoint (Franspose) of a matrix.
$\begin {bmatrix} 0&1&-1\\2&2&0\\4&4&-2 \end {bmatrix}$
Finding inverse of matrix
Inverse $=\dfrac{1}{Det\,A}\;Adj\,A$
$\Rightarrow\dfrac{1}{-2}\begin {bmatrix} 0&1&-1\\2&2&0\\4&4&-2 \end {bmatrix}$
$\Rightarrow\begin {bmatrix} 0&&-0.5&&0.5\\-1&&-1&&0\\-2&&-2&&1 \end {bmatrix}$
