A simple linear algebra solver