for i = 1:size(matrix, 1)
    for j = 1:size(matrix, 1)
        %if j is not i, then multiply row i so that adding
        % it to row j will result in matrix(i, j) being 0
    end
    % multiply row i so that matrix(i, i) is one
end
