Ask Your Question

Revision history [back]

Change the value of a single element in a matrix

Hi guys I wanna change the value of a singular element in a matrix in sagemath. How do I do this ? I get an error saying vector is immutable

A=matrix([[1,2,-3],[1,4,6],[2,-1,-2]]);B=matrix([[1],[2],[4]]);show(A);show(B); A[1][1]=6

Change the value of a single element in a matrix

Hi guys I wanna change the value of a singular element in a matrix in sagemath. How do I do this ? I get an error saying vector is immutable


    A=matrix([[1,2,-3],[1,4,6],[2,-1,-2]]);B=matrix([[1],[2],[4]]);show(A);show(B);
    A=matrix([[1,2,-3],[1,4,6],[2,-1,-2]])
B=matrix([[1],[2],[4]])
show(A)
show(B)
A[1][1]=6