Invent a $$3\times3$$ matrix and calculate its inverse.
Why can it not be any matrix? What condition must be satisfied?
Development:
We define the matrix $$A=\left( \begin{array}{ccc} 1 & 0 & -2 \\ -1 & 1 & 1 \\ 0 & -1 & -2 \end{array} \right)$$
We are going to use the second method
1) Calculating the determinant (using the rule of Sarrus):
$$|A|=\left| \begin{array}{ccc} 1 & 0 & -2 \\ -1 & 1 & 1 \\ 0 & -1 & -2 \end{array} \right|= (1\cdot1\cdot-2)+(-1\cdot-1\cdot-2)+(0)-0-(1\cdot-1\cdot1)-0=-3$$
2) The adjoint matrix is
$$A^{adj}=\left(\begin{array}{ccc} +\left|\begin{array}{cc} 1 & 1 \\ -1 & -2 \end{array} \right| & -\left|\begin{array}{cc} -1 & 1 \\ 0 & -2 \end{array} \right| & +\ldots \\ -\ldots & +\ldots & -\ldots \\ +\ldots & -\ldots & +\left|\begin{array}{cc} 1 & 0 \\ -1 & 1 \end{array} \right| \end{array} \right)= \left( \begin{array}{ccc} -1 & -2 & 1 \\ -2 & -2 & 1 \\ 2 & 1 & 1 \end{array} \right)$$
3) We transpose the adjoint matrix
$$(A^{adj})^t=\left( \begin{array}{ccc} -1 & -2 & 2 \\ -2 & -2 & 1 \\ 1 & 1 & 1 \end{array} \right)$$
4) Finally, the inverse matrix is:
$$A^{-1}=\dfrac{1}{|A|}\cdot(A^{adj})^t=\dfrac{1}{-3}\left( \begin{array}{ccc} -1 & -2 & 2 \\ -2 & -2 & 1 \\ 1 & 1 & 1 \end{array} \right)=\dfrac{1}{3}\left( \begin{array}{ccc} 1 & 2 & -2 \\ 2 & 2 & -1 \\ -1 & -1 & -1 \end{array} \right)$$
Solution:
$$A^{-1}=\dfrac{1}{3}\left( \begin{array}{ccc} 1 & 2 & -2 \\ 2 & 2 & -1 \\ -1 & -1 & -1 \end{array} \right)$$
When dividing by the determinant, it is necessary that the determinant of $$A$$ is nonempty.
That is to say, the condition that the matrix $$A$$ should satisfy so as to be considered invertible.