We have written a general purpose code for analytical inversion of large matrices in C language by treating matrices in block forms. We have optimized the computation speed using in-place inversion, dynamic memory handling and recursion techniques. This code is written to adopt with programs which requires the faster and exact solution of system of linear equations in C and Fortran. We have applied it in our study of tau neutrino events at India based Neutrino Observatory (INO). As example, with this program the time required for computing the exact inversion of matrices of order 100, 1000 are 6ms and 6.2s respectively in Intel i7 6700 CPU, 8GB RAM machine. We also present our alternate technique and results of computing inversion of ultra large matrices (of order > $10^4$) using parallel processing in clusters.