I have a similarity transformation of matrices from the type $B = P^{-1}AP$. It is known that $A$ and $P$ are invertible matrices, but not orthogonal.
Given that I have the matrices $P$ and $A$ I need to compute $B$ in time $\frac{7}{3}n^{3} + O(n^{2})$. My problem is that given that I use Gauss-Jordan for the computation of $P^{-1}$ it works in $\frac{2}{3}n^{3}$ and then for the multiplications of the matrices I can use something like typical matrix multiplication which in the case is in $O(n^{3})$ or fast matrix multiplication which is in $O(n^{2,807})$ ... Do you have any idea how to compute in the required time?