We reduces the augmented matrix row-by-row until its left side reaches the upper-triangular form.
when first element is zero
Sometimes it is not possible to eliminate if the first variable in the first row is 0:
In this case, we can reorder the equations:
Gaussian elimination suffers from the problems of numerical instability and redundant computation, and LU factorization is often a preferred numerical algorithm.