Consider a case where, given an MxM matrix A and a vector b, I want to solve something of the form inv(A @ A.T) @ b
(where I know A is invertible).
As far as I know, it is always faster to use solve_*
rather than inv
. There are also variants for more efficient solving for PSD matrices (which A @ A.T
must be), using Cholesky factorization.
My question - since I'm constructing the matrix A @ A.T
just to immediately throw it away - is there a more specialized procedure for solving linear equations with the gram matrix of A without having to construct it?