Algorithm to solve systems of linear equations

Preparation of the system