I’m taking a crash course in computer graphics and we have just covered 2D transformations and my instructor pointed out that it was computationally more intensive to calculate the inverse of a matrix than its transpose, which is why orthogonal matrices are soo useful in computing (since the transpose of an orthogonal matrix is also it’s inverse). Due to the time constrains, and also the nature of the class, he didn’t go into details on why this is and I was wondering if anyone here would be able to do so.
I’m particularly interested in the difference in CPU/GPU instructions involved in each process, or if I’ve gotten that wrong, then the lowest level in the stack at which the bottleneck is occurring. I’d also be interested in learning of any resources, books, websites, etc, where I can learning more about these sorts of effiencies/bottlenecks.
Transposing an n x n matrix is, at worst, an O(n2) operation, whereas computing the inverse of a general nonsingular n x n matrix is an O(n3) operation. That is just the cost of doing these things.
As an aside, most applications do not compute matrix inverses because the objective is solving a linear system Ax = b, not finding the inverse. It is faster and more accurate to solve this problem using decompositions and triangular solves (see LU decomposition, for general nonsingular matrices, for instance). Matrix inverses can be computed using Gauss-Jordan elimination (as well as other approaches).
As for routines available, you can find LAPACK implementations that can be used for computing an LU decomposition (and probably a matrix inverse).