This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Step-By-Step Gaussian Elimination on Augmented Matrices | |
# By Tristan Hume | |
require "rational" | |
def reduce_down(mat) | |
# Use each row going down to cancel lower rows | |
# Each iteration of this loop is one step | |
rows = mat.length | |
(0..rows-2).each do |ri1| |