A course in linear algebra with applications