import numpy as np
n = 4
Let's create some elimination matrices:
M1 = np.eye(n)
M1[1,0] = 0.5
M1
M2 = np.eye(n)
M2[3,0] = 4
M2
M3 = np.eye(n)
M3[2,1] = 1.3
M3
Now play around with them:
M1.dot(M2)
M2.dot(M1)
M1.dot(M2).dot(M3)
BUT:
M3.dot(M1).dot(M2)