Solving a system of linear equations using the elimination method