Basic geometry and linear algebra routines

