I’ve followed the instructions, using return A_ref beneath each function to test it, commenting out the rest of the code, and going thru it one by one but I still don’t understand what I’m missing and I haven’t moved onto 5 and 6. I’m following this, or at least I think I am:
MultiplyRow(A, i, j) ----> Ai = j * Ai
AddRows(A, i, j, k) -----> Aj = k * Ai + Aj
SwapRows(A, i, j) ------> Ai = Aj, Aj = Ai

Is there anyone I can privately DM for help? This is also my output:

If it says to swap rows 2 and 10 with the matrix A_ref for example, i wrote it presented in the order of the instruction. if i try reversing it, it doesn’t actually change anything oddly enough lol.

The easiest way to implement SwapRows() is to use vectors to provide the index values. In each vector, you reverse the order of the two rows you are swapping.

If ‘a’ and ‘b’ are the two rows you are to swap, and Q is the matrix, you can do this: Q[[a, b]] = Q[[b, a]]

#swap row 0 and row 1 of matrix A_system (remember that indexing in NumPy array starts from 0)
[my code] #swap row 1 and 3 of the new matrix A_ref
[my code]

Hi, I am creating new matrix to include the new column and go through the stacking etc and can print the new matrix. But then for the next command, it always picks up the original matrix even though I believe that I defined the stacked matrix as a new variable. Would you be able to provide thoughts on what may be going on? Thank you. Ps - did I post this correctly? or is there a post feature vs. an email feature?