from sympy import *
from IPython.display import display
init_printing(use_latex='mathjax')
A=Matrix([[1,3,5,0,0,3],[0,0,2,1,2,1],[2,6,12,1,2,7]])
display(A)
A.rref()
B=Matrix(A) #a copy of A
B[2,5]+= 1 #indices start at 0
display(B)
B.rref()
C=Matrix(A) #a copy of A
C[2,2]= 8 #indices start at 0
display(C)
C.rref()