Use SMW and determinant lemma to speed linear algebra calculations