basiclinearalgebrasubroutine