Complete linear algebra theory and implementation