According to Buckingham Theorem the rank of $A$ should be $2$ A physical system is described by a law of the form $f(E,P,A)=0$, where $E,P,A$ represent, respectively, energy, pressure and surface area. Find an equivalent physical law that relates suitable dimensionless quantities.
That' what I have tried so far:
1st step:
Choice of  quantities
Mass: $M$
Time: $T$
Length: $L$
So:
$$[E]=M L^2 T^{-2}$$
$$[P]=ML^{-1}T^{-2}$$
$$[A]=L^2$$
2nd step:
Construction of dimonsionless quantities
The matrix of dimensions:
\begin{equation*}
A=\begin{bmatrix}
1 & 1 & 0\\ 
-2 & -2 & 0 \\ 
2 & -1 &2 
\end{bmatrix}
\end{equation*}
I tried to find the rank, determining the smallest $n$ for which $A^n=I$.
\begin{equation*}
\begin{bmatrix}
1 & 1 & 0\\ 
-2 & -2 & 0 \\ 
2 & -1 &2   
\end{bmatrix}\begin{bmatrix}
1 & 1 & 0\\ 
-2 & -2 & 0 \\ 
2 & -1 &2 
\end{bmatrix}=\begin{bmatrix}
-1 & -1 & 0\\ 
2 & 2 & 0 \\ 
8 & 2 &4 
\end{bmatrix}
\end{equation*}
\begin{equation*}
\begin{bmatrix}
-1 & -1 & 0\\ 
2 & 2 & 0 \\ 
8 & 2 &4 
\end{bmatrix}\begin{bmatrix}
1 & 1 & 0\\ 
-2 & -2 & 0 \\ 
2 & -1 &2 
\end{bmatrix}=\begin{bmatrix}
1 & 1 & 0\\ 
-2 & -2 & 0 \\ 
12 & 0 &8
\end{bmatrix}
\end{equation*}
But I saw the solution and there should be only one dimensionless quantity, so according to Buckingham Theorem the rank of $A$ should be $2$. 
Where is my mistake?

You don't need to do $A^n$.
You can see the 1st and 2nd row are multiple of each other, so one of them can be eliminated to $0$. That makes the rank $2$. 
Alternatively, switch the 1st row and last row to make it
$$\pmatrix{2&-1&2\\-2&-2&0\\1&1&0}$$
Then divide the second row by $-2$, and subtract from the last row the resulting 2nd row. The result will be
$$\pmatrix{2&-1&2\\1&1&0\\0&0&0}$$
Or, you can do Gaussian elimination. First add $2$ times the 1st row to the second row, then subtract from 3rd row $2$ times the 1st row:
$$\pmatrix{1&1&0\\0&0&0\\0&-3&2}$$
Switching the last two rows:
$$\pmatrix{1&1&0\\0&-3&2\\0&0&0}$$
