Source: https://fortierq.github.io/assets/teaching/PCSI/gauss1.pdf