Arithmetics and linear algebra with Quaternions