How we can calculate AES Inverse SBox?
S-Box's are invertible. The inverse S-box is simply the S-box run in reverse.

One way to calculate the inverse of an S-box is; all you need to use the S-Box itself to find an element's inverse.

For example; look at the Wikipedia example.


00 maps to 63 in the S-box, 63 maps to 00 in the inverse S-Box
54 maps to 43 in the S-box, 42 maps to 64 in the inverse S-Box


This can be executed by passing only once the elements of the S-Box. The complexity will be $\mathcal{O}(n^2)$ where $n$ is the $row=column$ size of the matrix.