Basic linear algebra primitives