use the Gaussian elimination method
\(\begin{pmatrix}1 &0 &0 &| &1 &0 &0 \\ -1 &1 &0 &| &0 &1 &0 \\1 &1 &1 &| &0 &0 &1\end{pmatrix} \Rightarrow\)
\(\begin{pmatrix}1 &0 &0 &| &1 &0 &0 \\ 0 &1 &0 &| &1 &1 &0 \\ 0 &1 &1 &| &-1 &0 &1\end{pmatrix} \Rightarrow\)
\(\begin{pmatrix}1 &0 &0 &| &1 &0 &0 \\ 0 &1 &0 &| &1 &1 &0 \\0 &0 &1 &| &-2 &-1 &1 \end{pmatrix} \Rightarrow\)
and we read off the inverse as
\(\begin{pmatrix}1 &0 &0 \\ 1 &1 &0 \\ -2 &-1 &1\end{pmatrix} \)
use the Gaussian elimination method
\(\begin{pmatrix}1 &0 &0 &| &1 &0 &0 \\ -1 &1 &0 &| &0 &1 &0 \\1 &1 &1 &| &0 &0 &1\end{pmatrix} \Rightarrow\)
\(\begin{pmatrix}1 &0 &0 &| &1 &0 &0 \\ 0 &1 &0 &| &1 &1 &0 \\ 0 &1 &1 &| &-1 &0 &1\end{pmatrix} \Rightarrow\)
\(\begin{pmatrix}1 &0 &0 &| &1 &0 &0 \\ 0 &1 &0 &| &1 &1 &0 \\0 &0 &1 &| &-2 &-1 &1 \end{pmatrix} \Rightarrow\)
and we read off the inverse as
\(\begin{pmatrix}1 &0 &0 \\ 1 &1 &0 \\ -2 &-1 &1\end{pmatrix} \)